(Arrays.asList(JavaScript.JQUERY_UI.path(),
JavaScript.CUSTOM_FORM_UTILS.path(),
"/js/browserUtils.js",
@@ -237,11 +252,28 @@ SPARQL queries for existing values. --%>
request.setAttribute("customCss", customCss);
%>
+<%-- Configure add vs. edit --%>
+
+
+
+
+
+
+
+
+
+
+
-Create publication entry for <%= subjectName %>
+<% if( mode == EditMode.ERROR ){ %>
+ This form is unable to handle the editing of this position because it is associated with
+ multiple Position individuals.
+<% }else{ %>
+
+${titleVerb} publication entry for <%= subjectName %>
<%@ include file="unsupportedBrowserMessage.jsp" %>
@@ -261,7 +293,7 @@ SPARQL queries for existing values. --%>
-
+
* required fields
@@ -279,7 +311,12 @@ var customFormData = {
sparqlForAcFilter: '${sparqlForAcFilter}',
sparqlQueryUrl: '${sparqlQueryUrl}',
acUrl: '${acUrl}',
- submitButtonTextType: 'simple'
+ submitButtonTextType: 'simple',
+ editMode: '${editMode}',
+ defaultTypeName: 'publication' // used in repair mode to generate button text
};
+
+<% } %>
+
\ No newline at end of file
diff --git a/productMods/edit/forms/js/customFormWithAutocomplete.js b/productMods/edit/forms/js/customFormWithAutocomplete.js
index d174c730..91ae75c1 100644
--- a/productMods/edit/forms/js/customFormWithAutocomplete.js
+++ b/productMods/edit/forms/js/customFormWithAutocomplete.js
@@ -439,8 +439,9 @@ var customForm = {
// e.g., 'Create Grant & Principal Investigator'
buttonText = 'Create ' + typeText + ' & ' + baseButtonText;
} else {
- // e.g., 'Create Publication'
- buttonText = 'Create ' + baseButtonText;
+ // In repair mode, baseButtonText is "Edit X". Keep that for this case.
+ // In add mode, baseButtonText is "X", so we get, e.g., "Create Publication"
+ buttonText = this.editMode == 'repair' ? baseButtonText : 'Create ' + baseButtonText;
}
}
// Using existing related individual
diff --git a/productMods/edit/forms/personHasEducationalTraining.jsp b/productMods/edit/forms/personHasEducationalTraining.jsp
index f88b51e1..f5229a31 100644
--- a/productMods/edit/forms/personHasEducationalTraining.jsp
+++ b/productMods/edit/forms/personHasEducationalTraining.jsp
@@ -492,7 +492,6 @@ type is returned and we don't get a match to the select element options. --%>
-
${editMode == "repair" ? "" : "disabled" }
@@ -513,7 +512,7 @@ This goes to an experimental FM based form:
multiple Position individuals.
<% }else{ %>
-${titleVerb} education and training entry for <%= subjectName %>
+${titleVerb} education and training entry for ${subjectName}
" >