diff options
Diffstat (limited to 'ishtar_common/static/forms/container.js')
| -rw-r--r-- | ishtar_common/static/forms/container.js | 13 | 
1 files changed, 13 insertions, 0 deletions
| diff --git a/ishtar_common/static/forms/container.js b/ishtar_common/static/forms/container.js new file mode 100644 index 000000000..517b3b86d --- /dev/null +++ b/ishtar_common/static/forms/container.js @@ -0,0 +1,13 @@ +$(document).ready(function(){ +    var location_changed = false; + +    $("#id_select_responsible").on("autocompleteselect", function(event, ui) { +        if (location_changed) return; +        $("#id_select_location").val(ui.item.label); +        $("#id_location").val(ui.item.id); +    }); + +    $("#id_select_location").on("autocompleteselect", function(event, ui){ +        location_changed = true; +    }); +}); | 
