summaryrefslogtreecommitdiff
path: root/archaeological_finds/forms_treatments.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2024-11-19 11:58:15 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2025-02-19 14:45:56 +0100
commite7dfaffc372292d8467da8a8be872e9ac9456618 (patch)
tree0cac7d0f5fcaf03d07062fc35a18a43b0aaa7cae /archaeological_finds/forms_treatments.py
parent225f4356ca145d7f634aa8050d936de2dbd1cfec (diff)
downloadIshtar-e7dfaffc372292d8467da8a8be872e9ac9456618.tar.bz2
Ishtar-e7dfaffc372292d8467da8a8be872e9ac9456618.zip
✨ base exhibition views
Diffstat (limited to 'archaeological_finds/forms_treatments.py')
-rw-r--r--archaeological_finds/forms_treatments.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/archaeological_finds/forms_treatments.py b/archaeological_finds/forms_treatments.py
index d5e353a53..88b26905d 100644
--- a/archaeological_finds/forms_treatments.py
+++ b/archaeological_finds/forms_treatments.py
@@ -705,13 +705,22 @@ class TreatmentFileFormSelectionMultiple(MultiSearchForm):
validators=[valid_ids(models.TreatmentFile)])
+class ExhibitionFormSelection(TreatmentFileFormSelection):
+ pk = forms.CharField(
+ label="", required=False,
+ widget=widgets.DataTable(
+ reverse_lazy('get-exhibition'),
+ TreatmentFileSelect, models.TreatmentFile,
+ ),
+ validators=[valid_ids(models.TreatmentFile)])
+
+
class TreatmentFileForm(CustomForm, ManageOldType):
form_label = _("Treatment request")
base_models = ['treatment_type_type']
associated_models = {
'type': models.TreatmentFileType, 'in_charge': Person,
'applicant': Person, 'applicant_organisation': Organization,
- 'associated_basket': models.FindBasket
}
need_user_for_initialization = True
@@ -745,7 +754,7 @@ class TreatmentFileForm(CustomForm, ManageOldType):
reverse_lazy('autocomplete-organization'),
associated_model=Organization, new=True),
validators=[valid_id(Organization)], required=False)
- associated_basket = forms.IntegerField(
+ associated_basket_id = forms.IntegerField(
label=_("Associated basket"),
widget=widgets.JQueryAutoComplete(
reverse_lazy('autocomplete-findbasket'),