diff options
| author | Étienne Loks <etienne.loks@proxience.com> | 2015-11-03 00:39:23 +0100 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@proxience.com> | 2015-11-03 00:39:23 +0100 | 
| commit | df3a0564362e1e4c43424af0d3034aeb0000c418 (patch) | |
| tree | f6005f71f8d14dfcedc8c4a67eeacf3ce8aca0b1 | |
| parent | 9a14870b96ced509d9fc5f3625e8ade08c0f04b9 (diff) | |
| download | Ishtar-df3a0564362e1e4c43424af0d3034aeb0000c418.tar.bz2 Ishtar-df3a0564362e1e4c43424af0d3034aeb0000c418.zip  | |
Archaeologicla files: display and allow modifications of town planning service address
| -rw-r--r-- | archaeological_files_pdl/forms.py | 6 | ||||
| -rw-r--r-- | archaeological_files_pdl/templates/ishtar/blocks/JQueryPersonOrga.js | 1 | ||||
| -rw-r--r-- | ishtar_common/templates/ishtar/organization_form.html | 1 | 
3 files changed, 6 insertions, 2 deletions
diff --git a/archaeological_files_pdl/forms.py b/archaeological_files_pdl/forms.py index 659d22d68..d17797a0b 100644 --- a/archaeological_files_pdl/forms.py +++ b/archaeological_files_pdl/forms.py @@ -253,13 +253,15 @@ class FileFormPlanningService(forms.Form):      planning_service = forms.IntegerField(          label=_("Planning service"),          required=False, -        widget=widgets.JQueryAutoComplete( +        widget=widgets.JQueryPersonOrganization(              reverse_lazy('autocomplete-organization',                           args=[RESPONSIBLE_PLANNING_SERVICE_ORGA.pk]), +            reverse_lazy('organization_create'), +            model=models.Organization,              limit={                  'organization_type': [RESPONSIBLE_PLANNING_SERVICE_ORGA.pk]              }, -            associated_model=models.Organization, +            js_template='ishtar/blocks/JQueryCorporationPerson.js',              new=True),          validators=[valid_id(models.Organization)]      ) diff --git a/archaeological_files_pdl/templates/ishtar/blocks/JQueryPersonOrga.js b/archaeological_files_pdl/templates/ishtar/blocks/JQueryPersonOrga.js index be1faabfe..4a3943d3c 100644 --- a/archaeological_files_pdl/templates/ishtar/blocks/JQueryPersonOrga.js +++ b/archaeological_files_pdl/templates/ishtar/blocks/JQueryPersonOrga.js @@ -39,6 +39,7 @@ $(function() {                  if(ui.item){                      url = {{edit_source}}+ui.item.id;                      $('#id_{{field_id}}').val(ui.item.id); +                    $('#id_{{field_id}}').change();                  } else {                      $('#id_{{field_id}}').val(null);                  } diff --git a/ishtar_common/templates/ishtar/organization_form.html b/ishtar_common/templates/ishtar/organization_form.html index 3a2d37846..28415ab88 100644 --- a/ishtar_common/templates/ishtar/organization_form.html +++ b/ishtar_common/templates/ishtar/organization_form.html @@ -67,6 +67,7 @@ person_save_callback = function(){          $( "#div-"+parent_id ).html( data );          var lbl = $('#hidden_organization_lbl').val();          $('#id_select_' + parent_id).val(lbl); +        $('#id_' +parent_id).change();      });  };  | 
