summaryrefslogtreecommitdiff
path: root/archaeological_finds/forms_treatments.py
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_finds/forms_treatments.py')
-rw-r--r--archaeological_finds/forms_treatments.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/archaeological_finds/forms_treatments.py b/archaeological_finds/forms_treatments.py
index b5daf146f..a61e56f5e 100644
--- a/archaeological_finds/forms_treatments.py
+++ b/archaeological_finds/forms_treatments.py
@@ -32,13 +32,13 @@ from archaeological_operations.models import ActType, AdministrativeAct
from archaeological_warehouse.models import Warehouse, Container
import models
-from archaeological_operations.forms import AdministrativeActOpeForm, \
+from archaeological_operations.forms import AdministrativeActForm, \
AdministrativeActOpeFormSelection, AdministrativeActModifForm
from ishtar_common.forms import reverse_lazy, TableSelect, FinalForm, \
ManageOldType, get_form_selection, CustomForm, FieldType, IshtarForm
from ishtar_common.forms_common import SourceSelect, BaseImageForm, \
- BaseImageFormset
+ BaseImageFormset, SourceForm
from ishtar_common import widgets
from bootstrap_datepicker.widgets import DatePicker
@@ -386,7 +386,7 @@ class AdministrativeActTreatmentFormSelection(
validators=[valid_id(AdministrativeAct)])
-class AdministrativeActTreatmentForm(AdministrativeActOpeForm):
+class AdministrativeActTreatmentForm(AdministrativeActForm):
form_admin_name = _(u"Treatment - Administrative act - General")
form_slug = "treatment-adminact-general"
act_type = forms.ChoiceField(label=_(u"Act type"), choices=[])
@@ -647,7 +647,7 @@ class AdministrativeActTreatmentFileFormSelection(
validators=[valid_id(AdministrativeAct)])
-class AdministrativeActTreatmentFileForm(AdministrativeActOpeForm):
+class AdministrativeActTreatmentFileForm(AdministrativeActForm):
form_admin_name = _(u"Treatment request - Administrative act - General")
form_slug = "treatmentfile-adminact-general"
act_type = forms.ChoiceField(label=_(u"Act type"), choices=[])
@@ -700,6 +700,10 @@ TreatmentSourceFormSelection = get_form_selection(
_(u"You should select a document."))
+class TreatmentSourceForm(SourceForm):
+ form_slug = "treatmentsource-general"
+
+
class TreatmentFileSourceSelect(SourceSelect):
treatment_file__name = forms.CharField(
label=_(u"Treatment request name"), max_length=200)
@@ -724,3 +728,7 @@ TreatmentFileSourceFormSelection = get_form_selection(
'TreatmentFileSourceFormSelection', _(u"Documentation search"), 'pk',
models.TreatmentFileSource, TreatmentFileSourceSelect,
'get-treatmentfilesource', _(u"You should select a document."))
+
+
+class TreatmentFileSourceForm(SourceForm):
+ form_slug = "treatmentfilesource-general"