From ca5bf52968fd51e936a5dc02a178b1d9f0f7e4e0 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 28 Oct 2013 01:36:29 +0100 Subject: Operation: easily add all parcel related to an archaeological file (refs #1444) --- ishtar_common/templates/ishtar/wizard/parcels_wizard.html | 4 +--- ishtar_common/wizards.py | 6 ++---- 2 files changed, 3 insertions(+), 7 deletions(-) (limited to 'ishtar_common') diff --git a/ishtar_common/templates/ishtar/wizard/parcels_wizard.html b/ishtar_common/templates/ishtar/wizard/parcels_wizard.html index fdce51cdb..1d54cf1d3 100644 --- a/ishtar_common/templates/ishtar/wizard/parcels_wizard.html +++ b/ishtar_common/templates/ishtar/wizard/parcels_wizard.html @@ -20,6 +20,7 @@ ({% trans "all"%} ) {% inline_formset 'Parcels' wizard.form.forms False %} +{% if add_all %}

{% endif %}

{{ previous_fields|safe }} @@ -27,7 +28,4 @@ {% if next_steps %}{% endif %} - {% endblock %} diff --git a/ishtar_common/wizards.py b/ishtar_common/wizards.py index 534671972..f0302d70f 100644 --- a/ishtar_common/wizards.py +++ b/ishtar_common/wizards.py @@ -518,10 +518,8 @@ class Wizard(NamedUrlWizardView): - validate and end: nextstep = last step """ request = self.request - if (request.POST.has_key('formset_modify') \ - and request.POST['formset_modify']) \ - or (request.POST.has_key('formset_add') \ - and request.POST['formset_add']) \ + if request.POST.get('formset_modify') \ + or request.POST.get('formset_add') \ or [key for key in request.POST.keys() if key.endswith('DELETE') and request.POST[key]]: return self.render(form) -- cgit v1.2.3