diff --git a/productMods/edit/forms/addGrantRoleToPerson.jsp b/productMods/edit/forms/addGrantRoleToPerson.jsp index 1a7bf54c..cd44f3d1 100644 --- a/productMods/edit/forms/addGrantRoleToPerson.jsp +++ b/productMods/edit/forms/addGrantRoleToPerson.jsp @@ -20,7 +20,6 @@ This is intended to create a set of statements like: <%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Individual" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.EditConfiguration" %> -<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.PersonHasPublicationValidator" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest" %> <%@ page import="edu.cornell.mannlib.vitro.webapp.web.MiscWebUtils" %> @@ -54,18 +53,22 @@ This is intended to create a set of statements like: - -<% // set role type based on predicate +<% // set role type based on predicate +String subjectName = ((Individual) request.getAttribute("subject")).getName(); if ( ((String)request.getAttribute("predicateUri")).endsWith("hasPrincipalInvestigatorRole") ) { %> - ${vivoOnt}#PrincipalInvestigatorRole + http://vivoweb.org/ontology/core#PrincipalInvestigatorRole + Create principal investigator + Create a new principal investigator entry for <%= subjectName %> <% }else{ %> - ${vivoOnt}#hasCo-PrincipalInvestigatorRole + http://vivoweb.org/ontology/core#CoPrincipalInvestigatorRole + Create co-principal investigator + Create a new co-principal investigator entry for <%= subjectName %> <% } %> @prefix core: <${vivoCore}> . @prefix rdf: <${rdf}> . - + ?person ?rolePredicate ?role. ?role rdf:type ?roleType ; core:relatedRole ?grant . @@ -159,8 +162,7 @@ PREFIX core: <${vivoCore}> SELECT ?grantURI WHERE {<${subjectUri}> core:hasPrinc editConfig.setEntityToReturnTo("?grant"); String subjectUri = vreq.getParameter("subjectUri"); - String predicateUri = vreq.getParameter("predicateUri"); - String subjectName = ((Individual) request.getAttribute("subject")).getName(); + String predicateUri = vreq.getParameter("predicateUri"); List customJs = new ArrayList(Arrays.asList(JavaScript.JQUERY_UI.path(), JavaScript.UTILS.path(), @@ -192,20 +194,19 @@ var customFormData = { } -

Create a new principal investigator entry for <%= subjectName %>

+

${formHeading}

" >
- <%-- RY maybe make this a label and input field. See what looks best. --%>

<%-- bdc34: for some odd reason id and name should not be grant in this input element. --%> - +
-

+

* required fields