|
|
@@ -142,6 +142,7 @@ def search():
|
|
|
@login_required
|
|
|
def detail():
|
|
|
focus = None
|
|
|
+ form = BidForm()
|
|
|
|
|
|
# Collects details of the listing based on the
|
|
|
# focus pointer of the user
|
|
|
@@ -156,15 +157,14 @@ def detail():
|
|
|
item_bid_hist = collector.item_bid_hist(current_user.focus)
|
|
|
|
|
|
# New Bid
|
|
|
- form = BidForm()
|
|
|
-
|
|
|
if form.validate_on_submit():
|
|
|
user_bid = form.price.data
|
|
|
# checking if bid is at buyout price or more
|
|
|
if user_bid and user_bid >= focus[8]:
|
|
|
dispatch.enter_bid(user_bid, focus)
|
|
|
dispatch.tx_exchange(current_user.focus, focus[6], user_bid)
|
|
|
- flash('You Bought this piece out! WOAH!', category='success')
|
|
|
+ dispatch.clean_bid_table(current_user.focus)
|
|
|
+ flash('You Bought this piece out! Congratulations!', category='success')
|
|
|
return redirect(url_for('dashboards.profile'))
|
|
|
# checking if bid is higher than minimum bidding price
|
|
|
elif user_bid and user_bid > focus[7]:
|