diff options
Diffstat (limited to 'archaeological_warehouse/forms.py')
| -rw-r--r-- | archaeological_warehouse/forms.py | 11 | 
1 files changed, 10 insertions, 1 deletions
| diff --git a/archaeological_warehouse/forms.py b/archaeological_warehouse/forms.py index a7b6c575e..e03918965 100644 --- a/archaeological_warehouse/forms.py +++ b/archaeological_warehouse/forms.py @@ -259,14 +259,23 @@ class ContainerForm(CustomForm, ManageOldType, forms.Form):      form_admin_name = _(u"Container - 010 - General")      form_slug = "container-010-general"      file_upload = True -    extra_form_modals = ["warehouse", "organization", "person"] +    extra_form_modals = ["warehouse", "organization", "person", "container"]      associated_models = {'container_type': models.ContainerType,                           'location': models.Warehouse, +                         'parent': models.Container,                           'responsible': models.Warehouse}      reference = forms.CharField(label=_(u"Ref."), max_length=200)      old_reference = forms.CharField(label=_(u"Old reference"), required=False,                                      max_length=200)      container_type = forms.ChoiceField(label=_(u"Container type"), choices=[]) +    parent = forms.IntegerField( +        label=_("Parent container"), +        widget=widgets.JQueryAutoComplete( +            reverse_lazy('autocomplete-container'), +            associated_model=models.Container, new=True), +        validators=[valid_id(models.Container)], +        required=False +    )      responsible = forms.IntegerField(          label=_(u"Responsible warehouse"),          widget=widgets.JQueryAutoComplete( | 
