From 9417a7f43faa2a3c972b023981f72ee9da142e9e Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 16 Jan 2018 12:43:47 +0100 Subject: UI: more explicit layout for search --- archaeological_operations/forms.py | 7 ++++--- ishtar_common/templates/base.html | 4 ++-- ishtar_common/templates/ishtar/wizard/default_wizard.html | 3 +++ ishtar_common/templates/ishtar/wizard/wizard_done.html | 14 ++++++++++++-- 4 files changed, 21 insertions(+), 7 deletions(-) diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py index 00b99ea2b..ce87685a2 100644 --- a/archaeological_operations/forms.py +++ b/archaeological_operations/forms.py @@ -620,6 +620,7 @@ class OperationSelect(TableSelect): class OperationFormSelection(IshtarForm): + SEARCH = True form_label = _(u"Operation search") associated_models = {'pk': models.Operation} currents = {'pk': models.Operation} @@ -782,12 +783,12 @@ class OperationFormGeneral(CustomForm, ManageOldType): max_length=500, widget=OAWidget, required=False) + operation_type = forms.ChoiceField(label=_(u"Operation type"), + choices=[]) common_name = forms.CharField(label=_(u"Generic name"), required=False, max_length=500, widget=forms.Textarea) address = forms.CharField(label=_(u"Address / Locality"), required=False, max_length=500, widget=forms.Textarea) - operation_type = forms.ChoiceField(label=_(u"Operation type"), - choices=[]) year = forms.IntegerField(label=_(u"Year"), initial=lambda: datetime.datetime.now().year, validators=[validators.MinValueValidator(1000), @@ -921,7 +922,7 @@ class OperationFormGeneral(CustomForm, ManageOldType): fields = OrderedDict() ope_code = self.fields.pop('operation_code') for key, value in self.fields.items(): - if key == 'year': + if key == 'old_code': fields['operation_code'] = ope_code fields[key] = value self.fields = fields diff --git a/ishtar_common/templates/base.html b/ishtar_common/templates/base.html index b1523a2bf..7091fffaf 100644 --- a/ishtar_common/templates/base.html +++ b/ishtar_common/templates/base.html @@ -66,14 +66,14 @@
+ {% block top_content %}{% endblock %}
{% if warnings %}{% for warning in warnings %} diff --git a/ishtar_common/templates/ishtar/wizard/default_wizard.html b/ishtar_common/templates/ishtar/wizard/default_wizard.html index 7ba87c44d..1a774ad49 100644 --- a/ishtar_common/templates/ishtar/wizard/default_wizard.html +++ b/ishtar_common/templates/ishtar/wizard/default_wizard.html @@ -36,6 +36,9 @@ {% block "footer" %}