NIHVIVO-1024 When returning from validation error in educational background form (and roles form in repair mode), hide org name validation error if org name field is hidden.

This commit is contained in:
rjy7 2010-09-03 19:32:35 +00:00
parent 762a32045e
commit 243073d7a2

View file

@ -145,12 +145,7 @@ var customForm = {
// autocomplete type can be determined. If a type selection has been made,
// unhide the acSelector field.
} else if (this.typeSelector.length) {
if (this.typeSelector.val()) {
this.acSelectorWrapper.show()
}
else {
this.acSelectorWrapper.hide();
}
this.typeSelector.val() ? this.acSelectorWrapper.show() : this.hideFields(this.acSelectorWrapper);
}
},
@ -323,9 +318,8 @@ var customForm = {
showAutocompleteSelection: function(label, uri) {
this.acSelectorWrapper.hide();
//this.acSelector.attr('disabled', 'disabled');
this.hideFields(this.acSelectorWrapper);
// If form has a type selector, add type name to label. If form has no type selector,
// type name is coded into the html.
if (this.typeSelector.length) {