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.py18
1 files changed, 16 insertions, 2 deletions
diff --git a/archaeological_finds/forms_treatments.py b/archaeological_finds/forms_treatments.py
index 08744ed0b..c9dcdea86 100644
--- a/archaeological_finds/forms_treatments.py
+++ b/archaeological_finds/forms_treatments.py
@@ -33,8 +33,9 @@ from archaeological_warehouse.models import Warehouse, Container
from bootstrap_datepicker.widgets import DatePicker
from ishtar_common import widgets
from ishtar_common.forms import reverse_lazy, TableSelect, FinalForm, \
- ManageOldType, CustomForm, FieldType, IshtarForm, HistorySelect
-from ishtar_common.models import Person, valid_id, Organization, \
+ ManageOldType, CustomForm, FieldType, IshtarForm, HistorySelect, \
+ MultiSearchForm
+from ishtar_common.models import Person, valid_id, valid_ids, Organization, \
get_current_profile
logger = logging.getLogger(__name__)
@@ -670,6 +671,19 @@ class TreatmentFileFormSelection(forms.Form):
validators=[valid_id(models.TreatmentFile)])
+class TreatmentFileFormSelectionMultiple(MultiSearchForm):
+ form_label = _("Treatment request search")
+ associated_models = {'pks': models.TreatmentFile}
+ pk = forms.CharField(
+ label="", required=False,
+ widget=widgets.DataTable(
+ reverse_lazy('get-treatmentfile'),
+ TreatmentFileSelect, models.TreatmentFile,
+ multiple_select=True
+ ),
+ validators=[valid_ids(models.TreatmentFile)])
+
+
class TreatmentFileForm(ManageOldType):
form_label = _(u"Treatment request")
base_models = ['treatment_type_type']