From 5575bda92922c3b67846fdedec361e4de21c3df0 Mon Sep 17 00:00:00 2001 From: tworrall Date: Fri, 23 May 2014 12:23:09 -0400 Subject: [PATCH] VIVO-737: allow for entry of full orcid id/url --- .../freemarker/edit/forms/js/addOrcidIdToPersonUtils.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/productMods/templates/freemarker/edit/forms/js/addOrcidIdToPersonUtils.js b/productMods/templates/freemarker/edit/forms/js/addOrcidIdToPersonUtils.js index b979c348..17464953 100644 --- a/productMods/templates/freemarker/edit/forms/js/addOrcidIdToPersonUtils.js +++ b/productMods/templates/freemarker/edit/forms/js/addOrcidIdToPersonUtils.js @@ -29,8 +29,13 @@ var addOrcidIdToPersonUtils = { var orcidBase = "http://orcid.org/"; var orcidIdVal = ""; if ( this.orcidIdDisplay.val().length > 0 ) { - orcidIdVal = orcidBase + this.orcidIdDisplay.val(); - this.orcidId.val(orcidIdVal); + if ( this.orcidIdDisplay.val().substring(0,17) == "http://orcid.org/" ) { + orcidIdVal = this.orcidIdDisplay.val(); + } + else { + orcidIdVal = orcidBase + this.orcidIdDisplay.val(); + this.orcidId.val(orcidIdVal); + } } },