forgot to set status in new_edition
parent
4109778855
commit
b8409a815b
|
@ -1,6 +1,6 @@
|
||||||
<div class="clearfix">
|
<div class="clearfix">
|
||||||
{% if edition.ebook_form %}
|
{% if edition.ebook_form %}
|
||||||
{% ifnotequal status 'ACTIVE' %}
|
{% if show_ebook_form %}
|
||||||
<div id="add_ebook">
|
<div id="add_ebook">
|
||||||
|
|
||||||
{% if edition.ebooks.all.0 %}
|
{% if edition.ebooks.all.0 %}
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div> Uploads are disabled for this work.</div>
|
<div> Uploads are disabled for this work.</div>
|
||||||
{% endifnotequal %}
|
{% endif %}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
|
@ -616,9 +616,13 @@ def new_edition(request, work_id, edition_id, by=None):
|
||||||
if edition.pk:
|
if edition.pk:
|
||||||
edition.ebook_form = EbookForm( instance= models.Ebook(user = request.user, edition = edition, provider = 'x' ), prefix = 'ebook_%d'%edition.id)
|
edition.ebook_form = EbookForm( instance= models.Ebook(user = request.user, edition = edition, provider = 'x' ), prefix = 'ebook_%d'%edition.id)
|
||||||
form = EditionForm(instance=edition, initial=initial)
|
form = EditionForm(instance=edition, initial=initial)
|
||||||
|
try:
|
||||||
|
show_ebook_form = edition.work.last_campaign().status not in ['ACTIVE','INITIALIZED']
|
||||||
|
except:
|
||||||
|
show_ebook_form = True
|
||||||
return render(request, 'new_edition.html', {
|
return render(request, 'new_edition.html', {
|
||||||
'form': form, 'edition': edition, 'admin':admin, 'alert':alert
|
'form': form, 'edition': edition, 'admin':admin, 'alert':alert,
|
||||||
|
'show_ebook_form':show_ebook_form,
|
||||||
})
|
})
|
||||||
|
|
||||||
def campaign_results(request, campaign):
|
def campaign_results(request, campaign):
|
||||||
|
|
Loading…
Reference in New Issue