Added a rough textarea for someone to copy embedding iframe for widget
parent
e09cf8186d
commit
78339e3de5
|
@ -9,8 +9,11 @@
|
|||
<p>Status: {{campaign.status}}</p>
|
||||
<p>ISBN: {{campaign.work.editions.all.0.isbn_10}} | {{campaign.work.editions.all.0.isbn_13}} </p>
|
||||
<p><a href="{% url widget isbn=campaign.work.editions.all.0.isbn_10 %}">Widget Link</a></p>
|
||||
<p>Embed a widget:</p>
|
||||
<textarea rows="2" cols="80"><iframe src="{{base_url}}/api/widget/{{campaign.work.editions.all.0.isbn_13}}/" width="150" height="360" frameborder="0"></iframe></textarea>
|
||||
<p>PayPal receiver: {{campaign.paypal_receiver}}</p>
|
||||
<p>Current total (pledged/authorized): {{campaign.current_total}}</p>
|
||||
<p>Base URL: {{base_url}}</p>
|
||||
<form method="POST" action="{% url campaign_by_id pk=campaign.id %}">
|
||||
{% csrf_token %}
|
||||
{{form.as_p}}
|
||||
|
|
|
@ -376,9 +376,12 @@ class CampaignFormView(FormView):
|
|||
pk = self.kwargs["pk"]
|
||||
campaign = models.Campaign.objects.get(id=int(pk))
|
||||
context = super(CampaignFormView, self).get_context_data(**kwargs)
|
||||
base_url = self.request.build_absolute_uri("/")[:-1]
|
||||
context.update({
|
||||
'campaign': campaign
|
||||
'campaign': campaign,
|
||||
'base_url':base_url
|
||||
})
|
||||
|
||||
return context
|
||||
|
||||
def form_valid(self,form):
|
||||
|
|
Loading…
Reference in New Issue