Merge pull request #206 from Gluejar/preview_pledge
looks right -- Se tests run ok -- so worth doing the merge to see what jenkins thinks. (Remove pledge form error when campaign is not active. [#56565596])pull/1/head
commit
789c9623d4
|
@ -69,6 +69,11 @@
|
|||
<br /> You can modify your pledge below.
|
||||
</div>
|
||||
{% 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 %}
|
||||
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
|
||||
work = None
|
||||
premiums = None
|
||||
data = None
|
||||
data = {}
|
||||
|
||||
def get_preapproval_amount(self):
|
||||
preapproval_amount = self.request.REQUEST.get('preapproval_amount', None)
|
||||
|
@ -1042,7 +1042,7 @@ class PledgeView(FormView):
|
|||
'work':self.work,
|
||||
'campaign':self.campaign,
|
||||
'premiums':self.premiums,
|
||||
'premium_id':self.data['premium_id'],
|
||||
'premium_id':self.data.get('premium_id',None),
|
||||
'faqmenu': 'modify' if self.transaction else 'pledge',
|
||||
'transaction': self.transaction,
|
||||
'tid': self.transaction.id if self.transaction else None,
|
||||
|
|
Loading…
Reference in New Issue