diff --git a/productMods/edit/forms/js/addConcept.js b/productMods/edit/forms/js/addConcept.js index 61292aba..ce49fe8a 100644 --- a/productMods/edit/forms/js/addConcept.js +++ b/productMods/edit/forms/js/addConcept.js @@ -95,11 +95,6 @@ var addConceptForm = { //Also clear the search input this.searchTerm.val(""); this.cancel.unbind('click'); - this.cancel.bind('click', function() { - //show only list of existing terms and hide adding term form - addConceptForm.showConceptListOnlyView(); - return false; - }); // Show the form this.form.show(); @@ -124,6 +119,10 @@ var addConceptForm = { this.createOwn.show(); this.submit.show(); }, + showSpanAndCreateOption:function() { + this.orSpan.show(); + this.createOwn.show(); + }, showConceptListOnlyView: function() { this.hideForm(); this.showFormButtonWrapper.show(); @@ -132,6 +131,7 @@ var addConceptForm = { //Get value of search term var searchValue = this.searchTerm.val(); var checkedVocabSource = $('input:radio[name="source"]:checked'); + var createLink = this.createOwn; if(!checkedVocabSource.length) { addConceptForm.showUncheckedSourceError(); return; @@ -172,7 +172,12 @@ var addConceptForm = { } if(htmlAdd.length) { $('#selectedConcept').html(htmlAdd); - addConceptForm.showHiddenElements(); + if (htmlAdd.indexOf("No search results") >= 0) { + addConceptForm.showSpanAndCreateOption(); + } + else { + addConceptForm.showHiddenElements(); + } } }); return true; @@ -249,7 +254,7 @@ var addConceptForm = { validateConceptSelection:function(checkedElements) { var numberElements = checkedElements.length; if(numberElements < 1) { - addConceptForm.errors.html("

Please select at least one term from search results to add or click cancel.

"); + addConceptForm.errors.html("

Please select at least one term from the search search results.

"); return false; } return true; diff --git a/productMods/templates/freemarker/edit/forms/addAssociatedConcept.ftl b/productMods/templates/freemarker/edit/forms/addAssociatedConcept.ftl index b68a3f26..76c9be88 100644 --- a/productMods/templates/freemarker/edit/forms/addAssociatedConcept.ftl +++ b/productMods/templates/freemarker/edit/forms/addAssociatedConcept.ftl @@ -105,11 +105,15 @@

- or Cancel +

-

Can't find the concept you want? Create your own. +

+ Can't find the concept you want? Create your own. +
- +

+ or Return to Profile Page +

diff --git a/src/edu/cornell/mannlib/vitro/webapp/utils/ConceptSearchService/ConceptSearchServiceUtils.java b/src/edu/cornell/mannlib/vitro/webapp/utils/ConceptSearchService/ConceptSearchServiceUtils.java index 8fdc42d7..bdb88ebf 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/utils/ConceptSearchService/ConceptSearchServiceUtils.java +++ b/src/edu/cornell/mannlib/vitro/webapp/utils/ConceptSearchService/ConceptSearchServiceUtils.java @@ -40,7 +40,7 @@ public class ConceptSearchServiceUtils { map.put(UMLSVocabSource, new VocabSourceDescription("UMLS", UMLSVocabSource, "http://www.nlm.nih.gov/research/umls/", "Unified Medical Language System")); //Commenting out agrovoc for now until implementation is updated // map.put(AgrovocVocabSource, new VocabSourceDescription("AGROVOC", AgrovocVocabSource, "www.fao.org/agrovoc/", "Agricultural Vocabulary")); - map.put(GemetVocabSource, new VocabSourceDescription("GEMET", GemetVocabSource, "http://www.eionet.europa.eu/gemet", "GEneral Multilingual Environmental Thesaurus")); + map.put(GemetVocabSource, new VocabSourceDescription("GEMET", GemetVocabSource, "http://www.eionet.europa.eu/gemet", "General Multilingual Environmental Thesaurus")); return map; }