From 1982bda0ee8525c3362243077bacae7cf2910f96 Mon Sep 17 00:00:00 2001 From: hjkhjk54 Date: Wed, 7 Dec 2011 15:32:16 +0000 Subject: [PATCH] updates for autocomplete --- .../edit/forms/js/customFormWithAutocomplete.js | 16 ++++++++++------ .../edit/forms/autoCompleteObjectPropForm.ftl | 3 ++- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/productMods/edit/forms/js/customFormWithAutocomplete.js b/productMods/edit/forms/js/customFormWithAutocomplete.js index 936c86cc..8ada5c74 100644 --- a/productMods/edit/forms/js/customFormWithAutocomplete.js +++ b/productMods/edit/forms/js/customFormWithAutocomplete.js @@ -107,7 +107,7 @@ var customForm = { } else if (this.findValidationErrors()) { this.initFormWithValidationErrors(); - } else if(this.supportEdit && this.editMode == 'edit') { + } else if(this.supportEdit) { this.initFormWithSupportEdit(); } // If type is already selected when the page loads (Firefox retains value @@ -176,11 +176,15 @@ var customForm = { }, initFormWithSupportEdit: function() { - this.initFormWithValidationErrors(); - //Hide verify match when edit mode - this.verifyMatch.hide(); + if(this.editMode == 'edit') { + this.initFormWithValidationErrors(); + //Hide verify match when edit mode + this.verifyMatch.hide(); + } else { + this.initFormFullView(); + } //Disable submit button until selection made - this.button.attr('disabled', true); + this.button.attr('disabled', 'disabled'); }, // Bind event listeners that persist over the life of the page. Event listeners @@ -407,7 +411,7 @@ var customForm = { //Resetting so disable submit button again for object property autocomplete if(this.supportEdit) { - this.button.attr('disabled', true); + //this.button.attr('disabled', 'disabled'); } } diff --git a/productMods/templates/freemarker/edit/forms/autoCompleteObjectPropForm.ftl b/productMods/templates/freemarker/edit/forms/autoCompleteObjectPropForm.ftl index 04193f4b..c8ea8e49 100644 --- a/productMods/templates/freemarker/edit/forms/autoCompleteObjectPropForm.ftl +++ b/productMods/templates/freemarker/edit/forms/autoCompleteObjectPropForm.ftl @@ -58,7 +58,8 @@

- + + or Cancel