diff options
Diffstat (limited to 'archaeological_finds/forms.py')
-rw-r--r-- | archaeological_finds/forms.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/archaeological_finds/forms.py b/archaeological_finds/forms.py index fe717515e..541778d5c 100644 --- a/archaeological_finds/forms.py +++ b/archaeological_finds/forms.py @@ -784,6 +784,18 @@ class ModifyTreatmentForm(BaseTreatmentForm): return cleaned_data +class TreatmentFormFileChoice(forms.Form): + form_label = _(u"Associated file") + associated_models = {'file': models.TreatmentFile, } + currents = {'file': models.TreatmentFile} + file = forms.IntegerField( + label=_(u"Treatment file"), + widget=widgets.JQueryAutoComplete( + reverse_lazy('autocomplete-treatmentfile'), + associated_model=models.TreatmentFile), + validators=[valid_id(models.TreatmentFile)], required=False) + + class TreatmentDeletionForm(FinalForm): confirm_msg = _( u"Are you sure you want to delete this treatment? All modification " @@ -885,6 +897,11 @@ class ModifyTreatmentFileForm(TreatmentFileForm): return cleaned_data +class TreatmentFileDeletionForm(FinalForm): + confirm_msg = _(u"Are you sure you want to delete this treatment file?") + confirm_end_msg = _(u"Would you like to delete this treatment file?") + + """ #################################### # Source management for treatments # |