From 55a6ad52047d0cce224f45fdefdfe5c8f19035df Mon Sep 17 00:00:00 2001 From: Tim Worrall Date: Wed, 18 Jun 2014 16:34:23 -0400 Subject: [PATCH] fixed autocomplete issue with adding organizations to authorships --- .../edit/forms/js/addAuthorsToInformationResource.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/productMods/templates/freemarker/edit/forms/js/addAuthorsToInformationResource.js b/productMods/templates/freemarker/edit/forms/js/addAuthorsToInformationResource.js index 83f2c5be..55151aba 100644 --- a/productMods/templates/freemarker/edit/forms/js/addAuthorsToInformationResource.js +++ b/productMods/templates/freemarker/edit/forms/js/addAuthorsToInformationResource.js @@ -581,6 +581,10 @@ var addAuthorForm = { this.labelField.val(name); } + // If user selected org via autocomplete, clear the org name field + if ( this.orgUriField.val() != '' ) { + this.orgName.val(""); + } }, @@ -765,6 +769,7 @@ var addAuthorForm = { if ( authType == "org" ) { this.personSection.hide(); this.orgSection.show(); + this.orgNameWrapper.show(); // person fields this.personRadio.attr('checked', false); // needed for reset when cancel button is clicked this.acSelector.removeClass("acSelector");