diff --git a/project/static/js/dialogs.js b/project/static/js/dialogs.js index 061c727..6befcde 100644 --- a/project/static/js/dialogs.js +++ b/project/static/js/dialogs.js @@ -25,18 +25,11 @@ $(document).ready(function() { if (data.success) { if (form[0].id == 'client-edit-form') { - var autocomplete = $('#id_client_text').yourlabsAutocomplete(); $('#id_client_text').val(data.name); - var choices = autocomplete.box.find(autocomplete.choiceSelector); - autocomplete.refresh(); - autocomplete.show = function(html) { - yourlabs.Autocomplete.prototype.show.call(this, html) - var choices = this.box.find(this.choiceSelector); - - if (choices.length == 1) { - this.input.trigger('selectChoice', [choices, this]); - } - } + $('#id_client_text').hide() + $('#id_client-deck').html('X' + data.name + ''); + + $('#id_client').html(''); } form.dialog('close'); form.clearForm();