summaryrefslogtreecommitdiff
path: root/ishtar_common
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common')
-rw-r--r--ishtar_common/templates/ishtar/wizard/parcels_wizard.html4
-rw-r--r--ishtar_common/wizards.py6
2 files changed, 3 insertions, 7 deletions
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 @@
<tr><td>({% trans "all"%} <input type='checkbox' name='check-all' class='check-all'/>)</td></tr>
{% inline_formset 'Parcels' wizard.form.forms False %}
</table>
+{% if add_all %}<p><input type='checkbox' name='add_all_parcels' id='add_all_parcels'> <label for='add_all_parcels'>{% trans "Add all parcels from the archaeological file" %}</label></p>{% endif %}
<p><button name="formset_modify" value="{{wizard.steps.current}}">{% trans "Add/Modify" %}</button></p>
<input type="hidden" name="{{ step_field }}" value="{{ step0 }}" />
{{ previous_fields|safe }}
@@ -27,7 +28,4 @@
{% if next_steps %}<input type="submit" id="submit_end_form" name='validate_and_end' value="{% trans "Validate and end" %}"/>{% endif %}
</div>
</form>
-<script type='text/javascript'>
-
-</script>
{% 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)