diff options
Diffstat (limited to 'archaeological_finds/forms_treatments.py')
-rw-r--r-- | archaeological_finds/forms_treatments.py | 13 |
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'), |