Remove pledge form error when campaign is not active. [#56565596]
parent
5c8b67a1c9
commit
63f0ee3794
|
@ -69,6 +69,11 @@
|
||||||
<br /> You can modify your pledge below.
|
<br /> You can modify your pledge below.
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% ifnotequal work.last_campaign.status 'ACTIVE' %}
|
||||||
|
<div class="clearfix"><h4>Campaign NOT ACTIVE</h4>
|
||||||
|
This pledge form is not functional because the campaign is NOT ACTIVE.<br /><br /><br />
|
||||||
|
</div>
|
||||||
|
{% endifnotequal %}
|
||||||
|
|
||||||
{% comment %}
|
{% comment %}
|
||||||
Even there is a CampaignPledgeForm in frontend/forms.py , the "widget" for premium_id is implemented in HTML here for now.
|
Even there is a CampaignPledgeForm in frontend/forms.py , the "widget" for premium_id is implemented in HTML here for now.
|
||||||
|
|
|
@ -965,7 +965,7 @@ class PledgeView(FormView):
|
||||||
campaign = None
|
campaign = None
|
||||||
work = None
|
work = None
|
||||||
premiums = None
|
premiums = None
|
||||||
data = None
|
data = {}
|
||||||
|
|
||||||
def get_preapproval_amount(self):
|
def get_preapproval_amount(self):
|
||||||
preapproval_amount = self.request.REQUEST.get('preapproval_amount', None)
|
preapproval_amount = self.request.REQUEST.get('preapproval_amount', None)
|
||||||
|
@ -1042,7 +1042,7 @@ class PledgeView(FormView):
|
||||||
'work':self.work,
|
'work':self.work,
|
||||||
'campaign':self.campaign,
|
'campaign':self.campaign,
|
||||||
'premiums':self.premiums,
|
'premiums':self.premiums,
|
||||||
'premium_id':self.data['premium_id'],
|
'premium_id':self.data.get('premium_id',None),
|
||||||
'faqmenu': 'modify' if self.transaction else 'pledge',
|
'faqmenu': 'modify' if self.transaction else 'pledge',
|
||||||
'transaction': self.transaction,
|
'transaction': self.transaction,
|
||||||
'tid': self.transaction.id if self.transaction else None,
|
'tid': self.transaction.id if self.transaction else None,
|
||||||
|
|
Loading…
Reference in New Issue