summaryrefslogtreecommitdiff
path: root/archaeological_finds/forms.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2016-12-08 20:41:59 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2016-12-08 20:41:59 +0100
commit34c7816addf4d24480cb5ad833cf2b70ab7e45a8 (patch)
tree7ec49e588438080c5a542123f5f7cee617df9999 /archaeological_finds/forms.py
parent349fd863a1850e7e342a71c3ca38c96593609a5f (diff)
downloadIshtar-34c7816addf4d24480cb5ad833cf2b70ab7e45a8.tar.bz2
Ishtar-34c7816addf4d24480cb5ad833cf2b70ab7e45a8.zip
Manage file association for treatments
Diffstat (limited to 'archaeological_finds/forms.py')
-rw-r--r--archaeological_finds/forms.py17
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 #