diff --git a/productMods/edit/forms/addClinicalRoleToPerson.jsp b/productMods/edit/forms/addClinicalRoleToPerson.jsp index 2390270d..5eb41709 100644 --- a/productMods/edit/forms/addClinicalRoleToPerson.jsp +++ b/productMods/edit/forms/addClinicalRoleToPerson.jsp @@ -1,7 +1,8 @@ <%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%> - + + diff --git a/productMods/edit/forms/addEditorRoleToPerson.jsp b/productMods/edit/forms/addEditorRoleToPerson.jsp index d5c7842a..3d873084 100644 --- a/productMods/edit/forms/addEditorRoleToPerson.jsp +++ b/productMods/edit/forms/addEditorRoleToPerson.jsp @@ -1,11 +1,12 @@ <%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%> - + + - + \ No newline at end of file diff --git a/productMods/edit/forms/addHeadOfRoleToPerson.jsp b/productMods/edit/forms/addHeadOfRoleToPerson.jsp index 89b67b13..db3cb930 100644 --- a/productMods/edit/forms/addHeadOfRoleToPerson.jsp +++ b/productMods/edit/forms/addHeadOfRoleToPerson.jsp @@ -1,13 +1,14 @@ <%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%> - + + - + + - + \ No newline at end of file diff --git a/productMods/edit/forms/addOrganizerRoleToPerson.jsp b/productMods/edit/forms/addOrganizerRoleToPerson.jsp index c9beec5c..8576efc8 100644 --- a/productMods/edit/forms/addOrganizerRoleToPerson.jsp +++ b/productMods/edit/forms/addOrganizerRoleToPerson.jsp @@ -1,12 +1,14 @@ <%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%> - + + + - + + - - + + + diff --git a/productMods/edit/forms/addResearcherRoleToPerson.jsp b/productMods/edit/forms/addResearcherRoleToPerson.jsp index 00096a0f..141b1805 100644 --- a/productMods/edit/forms/addResearcherRoleToPerson.jsp +++ b/productMods/edit/forms/addResearcherRoleToPerson.jsp @@ -1,7 +1,8 @@ <%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%> - + + diff --git a/productMods/edit/forms/addReviewerRoleToPerson.jsp b/productMods/edit/forms/addReviewerRoleToPerson.jsp index 302f9c66..a5631376 100644 --- a/productMods/edit/forms/addReviewerRoleToPerson.jsp +++ b/productMods/edit/forms/addReviewerRoleToPerson.jsp @@ -1,11 +1,13 @@ <%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%> - + + + - + \ No newline at end of file diff --git a/productMods/edit/forms/addRoleToPersonTwoStage.jsp b/productMods/edit/forms/addRoleToPersonTwoStage.jsp index 32738bf4..521c4b5d 100644 --- a/productMods/edit/forms/addRoleToPersonTwoStage.jsp +++ b/productMods/edit/forms/addRoleToPersonTwoStage.jsp @@ -58,35 +58,39 @@ <%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.Field"%> <%@ page import="edu.cornell.mannlib.vitro.webapp.edit.elements.DateTimeWithPrecision"%> -<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.DateTimeIntervalValidation"%> +<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.validators.DateTimeIntervalValidation"%> <%! public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.edit.forms.addRoleToPersonTwoStage.jsp"); %> - -<%-- - These are the parameters that MUST be set of this form: - role type - predicate inverse - role activity type label (should be singular) - super type of role types for roleActivityType select list generation - - These are optional parameters: - roleToActivityPredicate (default value is http://vivoweb.org/ontology/core#roleIn) - activityToRolePredicate (default value is http://vivoweb.org/ontology/core#relatedRole) ---%> +<%-- REQUIRED PARAMETERS --%> -${param.roleActivityTypeLabel} -${! empty param.buttonLabel ? param.buttonLabel : param.roleActivityTypeLabel} -${param.roleType} +${param.roleDescriptor} <%-- Used in textual references to the role --%> +${param.roleType} <%-- uri of role individual type --%> + +<%-- For creating the role activity type select list: --%> ${param.roleActivityType_optionsType} ${param.roleActivityType_objectClassUri} ${param.roleActivityType_literalOptions} + + +<%-- OPTIONAL PARAMETERS --%> + + <%-- label for type selector field --%> + ${! empty param.typeSelectorLabel ? param.typeSelectorLabel : param.roleDescriptor} + + + ${! empty param.buttonText ? param.buttonText : param.roleDescriptor} + + + ${! empty param.roleToActivityPredicate ? param.roleToActivityPredicate : "http://vivoweb.org/ontology/core#roleIn"} + + + ${! empty param.activityToRolePredicate ? param.activityToRolePredicate : "http://vivoweb.org/ontology/core#relatedRole"} + ${! empty param.numDateFields ? param.numDateFields : 2 } -${! empty param.roleToActivityPredicate ? param.roleToActivityPredicate : "http://vivoweb.org/ontology/core#roleIn"} -${! empty param.activityToRolePredicate ? param.activityToRolePredicate : "http://vivoweb.org/ontology/core#relatedRole"} <% VitroRequest vreq = new VitroRequest(request); @@ -106,9 +110,10 @@ public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp. vreq.setAttribute("gYearDatatypeUriJson", MiscWebUtils.escape(XSD.gYear.toString())); - vreq.setAttribute("roleActivityTitleCase", TitleCase.toTitleCase(vreq.getParameter("roleActivityTypeLabel"))); - String buttonLabel = (String) vreq.getAttribute("buttonLabel"); - vreq.setAttribute("buttonLabel", TitleCase.toTitleCase(buttonLabel)); + vreq.setAttribute("typeSelectorLabelTitleCase", + TitleCase.toTitleCase( (String)vreq.getAttribute("typeSelectorLabel"), false)); + String buttonText = (String) vreq.getAttribute("buttonText"); + vreq.setAttribute("buttonText", TitleCase.toTitleCase(buttonText)); ObjectProperty op = wdf.getObjectPropertyDao().getObjectPropertyByURI( predicateUri ); if( op != null && op.getURIInverse() != null ){ @@ -468,13 +473,13 @@ request.setAttribute("typeQuery", getActivityTypeQuery(vreq)); <%-- Includes edit AND repair mode --%> "> - + ${editMode == "repair" ? "" : "disabled" } - + @@ -487,15 +492,15 @@ request.setAttribute("typeQuery", getActivityTypeQuery(vreq)); <% if( mode == EditMode.ERROR ){ %>
This form is unable to handle the editing of this role because it is associated with - multiple ${param.roleActivityTypeLabel} individuals.
+ multiple ${param.roleDescriptor} individuals. <% }else{ %> -

${titleVerb} ${roleActivityTypeLabel} entry for <%= subjectName %>

+

${titleVerb} ${roleDescriptor} entry for <%= subjectName %>

<%-- DO NOT CHANGE IDS, CLASSES, OR HTML STRUCTURE IN THIS FORM WITHOUT UNDERSTANDING THE IMPACT ON THE JAVASCRIPT! --%>
" > -

+

diff --git a/productMods/edit/forms/addServiceProviderRoleToPerson.jsp b/productMods/edit/forms/addServiceProviderRoleToPerson.jsp index ccab85c6..f39a975a 100644 --- a/productMods/edit/forms/addServiceProviderRoleToPerson.jsp +++ b/productMods/edit/forms/addServiceProviderRoleToPerson.jsp @@ -1,13 +1,14 @@ <%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%> - + + - + + diff --git a/productMods/edit/forms/js/customFormWithAutocomplete.js b/productMods/edit/forms/js/customFormWithAutocomplete.js index 91ae75c1..597388b0 100644 --- a/productMods/edit/forms/js/customFormWithAutocomplete.js +++ b/productMods/edit/forms/js/customFormWithAutocomplete.js @@ -456,7 +456,7 @@ var customForm = { getTypeNameForLabels: function() { // If this.acType is empty, we are either in a one-step form with no type yet selected, // or in repair mode in a two-step form with no type selected. Use the default type - // name specified in the form data (this.typeName is 'Select one'). + // name specified in the form data. return this.acType ? this.typeName : this.capitalize(this.defaultTypeName); },