diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-06-03 00:42:55 +0200 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-06-03 00:42:55 +0200 | 
| commit | cd874041d1761f24b984be0d1a524afd5bd4b116 (patch) | |
| tree | e6547966d9f7c649e1403a546eeabcc9563d46a6 /archaeological_warehouse/forms.py | |
| parent | 3d24c80255484ea205caff491daf2a1164df70d2 (diff) | |
| download | Ishtar-cd874041d1761f24b984be0d1a524afd5bd4b116.tar.bz2 Ishtar-cd874041d1761f24b984be0d1a524afd5bd4b116.zip | |
Warehouse: work on packaging
Diffstat (limited to 'archaeological_warehouse/forms.py')
| -rw-r--r-- | archaeological_warehouse/forms.py | 12 | 
1 files changed, 7 insertions, 5 deletions
| diff --git a/archaeological_warehouse/forms.py b/archaeological_warehouse/forms.py index fb36d6c18..080467e55 100644 --- a/archaeological_warehouse/forms.py +++ b/archaeological_warehouse/forms.py @@ -1,6 +1,6 @@  #!/usr/bin/env python  # -*- coding: utf-8 -*- -# Copyright (C) 2010-2013  Étienne Loks  <etienne.loks_AT_peacefrogsDOTnet> +# Copyright (C) 2010-2016  Étienne Loks  <etienne.loks_AT_peacefrogsDOTnet>  # This program is free software: you can redistribute it and/or modify  # it under the terms of the GNU Affero General Public License as @@ -22,12 +22,13 @@ from django.conf import settings  from django.utils.translation import ugettext_lazy as _  from ishtar_common.models import Person, valid_id -from archaeological_finds.models import TreatmentType +from archaeological_finds.models import TreatmentType, FindBasket  import models  from ishtar_common import widgets  from ishtar_common.forms import name_validator, reverse_lazy, \      get_form_selection, TableSelect -from archaeological_finds.forms import FindMultipleFormSelection +from archaeological_finds.forms import FindMultipleFormSelection, \ +    SelectFindBasketForm  def get_warehouse_field(label=_(u"Warehouse"), required=True): @@ -137,11 +138,12 @@ ContainerFormSelection = get_form_selection(      new_message=_(u"Add a new container")) -class BasePackagingForm(forms.Form): +class BasePackagingForm(SelectFindBasketForm):      form_label = _(u"Packaging")      associated_models = {'treatment_type': TreatmentType,                           'person': Person, -                         'location': models.Warehouse} +                         'location': models.Warehouse, +                         'basket': FindBasket}      treatment_type = forms.IntegerField(label="", widget=forms.HiddenInput)      person = forms.IntegerField(          label=_(u"Packager"), | 
