diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2026-06-29 19:04:11 +0200 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2026-06-29 19:07:06 +0200 |
| commit | 0ca2f38eb046ea1eee14d12e7918440a06e30d1a (patch) | |
| tree | 66c622fe1693a46374677972934619d31835008d | |
| parent | 56b593c92adbf25e6f96cc75f5a54959d8ccbf28 (diff) | |
| download | Ishtar-0ca2f38eb046ea1eee14d12e7918440a06e30d1a.tar.bz2 Ishtar-0ca2f38eb046ea1eee14d12e7918440a06e30d1a.zip | |
✨ finds form: improve field order
| -rw-r--r-- | archaeological_finds/forms.py | 66 | ||||
| -rw-r--r-- | archaeological_finds/forms_treatments.py | 2 | ||||
| -rw-r--r-- | archaeological_finds/models_finds.py | 4 |
3 files changed, 39 insertions, 33 deletions
diff --git a/archaeological_finds/forms.py b/archaeological_finds/forms.py index e57069da0..e02ad9441 100644 --- a/archaeological_finds/forms.py +++ b/archaeological_finds/forms.py @@ -491,6 +491,7 @@ class BasicFindForm(MuseumForm, CustomForm, ManageOldType): comparanda = forms.CharField( label=_("Comparanda"), widget=forms.Textarea, required=False ) + HEADERS["get_first_base_find__discovery_method"] = FormHeader(_("Discovery")) get_first_base_find__discovery_method = forms.ChoiceField( label=_("Discovery method"), required=False, choices=[] ) @@ -529,6 +530,7 @@ class BasicFindForm(MuseumForm, CustomForm, ManageOldType): iconography_notes = forms.CharField( label=_("Iconography notes"), widget=forms.Textarea, required=False ) + HEADERS["find_number"] = FormHeader(_("Quantities and dimensions")) find_number = forms.IntegerField(label=_("Number of remains"), required=False) min_number_of_individuals = forms.IntegerField( label=_("Minimum number of individuals (MNI)"), required=False @@ -567,7 +569,6 @@ class BasicFindForm(MuseumForm, CustomForm, ManageOldType): model=QualifiedBiographicalNote, label=_("Actors"), required=False, remote=True, new=True, remote_filter='qualification_type__F-A') - HEADERS["length"] = FormHeader(_("Dimensions")) length = FloatField( label=_("Length (cm)"), widget=widgets.CentimeterMeterWidget, required=False ) @@ -725,8 +726,8 @@ class FindForm(BasicFindForm): "denomination", "previous_id", "get_first_base_find__excavation_id", - "title", "laboratory_id", + "title", "museum_id", "seal_number", "museum_inventory_marking_presence", @@ -740,7 +741,9 @@ class FindForm(BasicFindForm): "museum_custodian_institution", "museum_depositor_inventory_number", "museum_collection_entry_mode", + "museum_purchase_price", "museum_entry_mode_comment", + "museum_allocation_date", "museum_entry_date", "museum_entry_date_end", "museum_entry_date_comment", @@ -751,19 +754,17 @@ class FindForm(BasicFindForm): "museum_inventory_conformity", "museum_conformity_comment", "museum_original_repro", - "museum_purchase_price", - "workshop_movement_style", - "museum_allocation_date", - "museum_inventory_transcript", - "description", - "comparanda", - "public_description", "get_first_base_find__discovery_method", "get_first_base_find__comment", "get_first_base_find__discovery_date", "get_first_base_find__discovery_date_taq", "get_first_base_find__context_record_comment", + "get_first_base_find__topographic_localisation", "get_first_base_find__batch", + "museum_inventory_transcript", + "description", + "public_description", + "comment", "is_complete", "material_type", "material_type_quality", @@ -773,22 +774,23 @@ class FindForm(BasicFindForm): "object_type_quality", "functional_area", "technical_area", - "iconographic_pattern", - "iconography_notes", - "find_number", - "min_number_of_individuals", - "museum_inventory_quantity", - "museum_observed_quantity", - "quantity_comment", "inscription", "decoration", + "iconographic_pattern", + "iconography_notes", "manufacturing_place", + "workshop_movement_style", + "comparanda", "communicabilitie", "cultural_attribution", - "comment", "period", "dating_comment", "actor", + "find_number", + "min_number_of_individuals", + "museum_inventory_quantity", + "museum_observed_quantity", + "quantity_comment", "length", "width", "height", @@ -830,15 +832,14 @@ class FindForm(BasicFindForm): label=_("Details on context record"), required=False, widget=forms.Textarea ) - get_first_base_find__batch = forms.ChoiceField( - label=_("Batch/object"), choices=[], required=False - ) - - HEADERS["get_first_base_find__topographic_localisation"] = FormHeader(_("Topography")) get_first_base_find__topographic_localisation = forms.CharField( label=_("Point of topographic reference"), required=False, max_length=120 ) + get_first_base_find__batch = forms.ChoiceField( + label=_("Batch/object"), choices=[], required=False + ) + TYPES = BasicFindForm.TYPES + [ FieldType("get_first_base_find__batch", models.BatchType), ] @@ -1294,9 +1295,9 @@ class QAFindFormMulti(MuseumForm, QAForm): qa_remarkabilities = widgets.Select2MultipleField( label=_("Remarkability"), required=False ) - qa_alterations = widgets.Select2MultipleField(label=_("Alteration"), required=False) + qa_alterations = widgets.Select2MultipleField(label=_("Alterations"), required=False) qa_alteration_causes = widgets.Select2MultipleField( - label=_("Alteration cause"), required=False + label=_("Alteration causes"), required=False ) qa_conservatory_states = widgets.Select2MultipleField(label=_("Conservatory states"), required=False) qa_treatment_emergency = forms.ChoiceField( @@ -1674,18 +1675,14 @@ class PreservationForm(CustomForm, ManageOldType): label=_("Conservatory state details"), required=False, widget=forms.Textarea ) - conservation_recommendations = forms.CharField( - label=_("Conservation recommendations"), required=False, - widget=forms.Textarea - ) alteration = forms.MultipleChoiceField( - label=_("Alteration"), + label=_("Alterations"), choices=[], widget=widgets.Select2Multiple, required=False, ) alteration_cause = forms.MultipleChoiceField( - label=_("Alteration cause"), + label=_("Alteration causes"), choices=[], widget=widgets.Select2Multiple, required=False, @@ -1718,6 +1715,10 @@ class PreservationForm(CustomForm, ManageOldType): widget=widgets.Select2Multiple, required=False, ) + conservation_recommendations = forms.CharField( + label=_("Conservation recommendations"), required=False, + widget=forms.Textarea + ) conservatory_comment = forms.CharField( label=_("Conservatory comment"), required=False, widget=forms.Textarea ) @@ -2062,6 +2063,7 @@ class FindSelect(MuseumForm, GeoItemSelect, DatingSelect): min_number_of_individuals = forms.IntegerField( label=_("Minimum number of individuals (MNI)") ) + quantity_comment = forms.CharField(label=_("Comment on quantity")) museum_inventory_quantity = forms.IntegerField(label=_("Inventory quantity")) museum_observed_quantity = forms.IntegerField(label=_("Observed quantity")) @@ -2119,8 +2121,8 @@ class FindSelect(MuseumForm, GeoItemSelect, DatingSelect): conservation_recommendations = forms.CharField( label=_("Conservation recommendations") ) - alterations = forms.ChoiceField(label=_("Alteration"), choices=[]) - alteration_causes = forms.ChoiceField(label=_("Alteration cause"), choices=[]) + alterations = forms.ChoiceField(label=_("Alterations"), choices=[]) + alteration_causes = forms.ChoiceField(label=_("Alteration causes"), choices=[]) alteration_comment = forms.CharField(label=_("Details regards alterations")) recommended_treatments = forms.ChoiceField( choices=[], label=_("Recommended treatments") diff --git a/archaeological_finds/forms_treatments.py b/archaeological_finds/forms_treatments.py index 8832426f5..dd52fbfe5 100644 --- a/archaeological_finds/forms_treatments.py +++ b/archaeological_finds/forms_treatments.py @@ -1364,7 +1364,7 @@ class QAStatementCondition(ManageOldType, forms.Form): label=_("Comment on conformity"), widget=forms.Textarea, required=False ) - HEADERS["qa_find_number"] = FormHeader(_("Dimensions / Quantities")) + HEADERS["qa_find_number"] = FormHeader(_("Quantities and dimensions")) qa_find_number = forms.IntegerField(label=_("Number of remains"), required=False) qa_museum_inventory_quantity = forms.IntegerField(label=_("Inventory quantity"), required=False, max_value=32000) qa_museum_observed_quantity = forms.IntegerField( diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py index ab6427d20..f17bd34b8 100644 --- a/archaeological_finds/models_finds.py +++ b/archaeological_finds/models_finds.py @@ -1808,6 +1808,10 @@ class Find( pgettext_lazy("key for text search", "min-number-of-individuals"), "min_number_of_individuals", ), + "quantity_comment": SearchAltName( + pgettext_lazy("key for text search", "quantity-comment"), + "quantity_comment__iexact", + ), "decoration": SearchAltName( pgettext_lazy("key for text search", "decoration"), "decoration__iexact" ), |
