2010-03-02 20:56:03 +00:00
|
|
|
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
|
|
|
|
|
2010-03-26 21:58:00 +00:00
|
|
|
<%@ page import="java.util.List" %>
|
|
|
|
<%@ page import="java.util.ArrayList" %>
|
|
|
|
<%@ page import="java.util.Arrays" %>
|
|
|
|
|
2010-01-29 22:12:41 +00:00
|
|
|
<%@ page import="com.hp.hpl.jena.rdf.model.Literal"%>
|
|
|
|
<%@ page import="com.hp.hpl.jena.rdf.model.Model"%>
|
2010-03-26 20:19:17 +00:00
|
|
|
<%@ page import="com.hp.hpl.jena.vocabulary.XSD" %>
|
|
|
|
|
2010-01-29 22:12:41 +00:00
|
|
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.Individual"%>
|
|
|
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary"%>
|
2010-03-26 20:19:17 +00:00
|
|
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.EditConfiguration"%>
|
2010-01-29 22:12:41 +00:00
|
|
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory"%>
|
2010-03-26 20:19:17 +00:00
|
|
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest"%>
|
|
|
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.web.MiscWebUtils"%>
|
2010-04-15 21:43:34 +00:00
|
|
|
<%@page import="edu.cornell.mannlib.vitro.webapp.edit.n3editing.StartYearBeforeEndYear"%>
|
2010-09-01 21:06:17 +00:00
|
|
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder.JavaScript" %>
|
|
|
|
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder.Css" %>
|
2010-01-29 22:12:41 +00:00
|
|
|
|
2010-03-29 15:41:45 +00:00
|
|
|
<%@ page import="org.apache.commons.logging.Log" %>
|
|
|
|
<%@ page import="org.apache.commons.logging.LogFactory" %>
|
|
|
|
|
2010-01-29 22:12:41 +00:00
|
|
|
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
|
|
|
|
<%@ taglib prefix="v" uri="http://vitro.mannlib.cornell.edu/vitro/tags" %>
|
|
|
|
|
2010-03-29 15:41:45 +00:00
|
|
|
<%!
|
|
|
|
public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.edit.forms.personHasPositionHistory.jsp");
|
|
|
|
%>
|
2010-01-29 22:12:41 +00:00
|
|
|
<%
|
2010-03-26 22:33:55 +00:00
|
|
|
VitroRequest vreq = new VitroRequest(request);
|
2010-04-01 21:35:39 +00:00
|
|
|
WebappDaoFactory wdf = vreq.getWebappDaoFactory();
|
|
|
|
vreq.setAttribute("defaultNamespace", ""); //empty string triggers default new URI behavior
|
2010-03-26 22:33:55 +00:00
|
|
|
|
2010-03-26 20:19:17 +00:00
|
|
|
request.setAttribute("stringDatatypeUriJson", MiscWebUtils.escape(XSD.xstring.toString()));
|
|
|
|
request.setAttribute("gYearDatatypeUriJson", MiscWebUtils.escape(XSD.gYear.toString()));
|
2010-01-29 22:12:41 +00:00
|
|
|
%>
|
|
|
|
|
2010-03-29 17:14:24 +00:00
|
|
|
<c:set var="vivoCore" value="http://vivoweb.org/ontology/core#" />
|
2010-03-29 15:41:45 +00:00
|
|
|
<c:set var="rdfs" value="<%= VitroVocabulary.RDFS %>" />
|
|
|
|
<c:set var="label" value="${rdfs}label" />
|
2010-03-29 17:14:24 +00:00
|
|
|
<c:set var="positionClass" value="${vivoCore}Position" />
|
|
|
|
<c:set var="orgClass" value="http://xmlns.com/foaf/0.1/Organization" />
|
2010-01-29 22:12:41 +00:00
|
|
|
|
2010-09-01 21:06:17 +00:00
|
|
|
<%-- Define predicates used in n3 assertions and sparql queries --%>
|
2010-03-29 17:14:24 +00:00
|
|
|
<c:set var="titlePred" value="${vivoCore}titleOrRole" />
|
2010-09-01 21:06:17 +00:00
|
|
|
<c:set var="startYearPred" value="${vivoCore}startYear" />
|
|
|
|
<c:set var="endYearPred" value="${vivoCore}endYear" />
|
|
|
|
<c:set var="positionInOrgPred" value="${vivoCore}positionInOrganization" />
|
|
|
|
<c:set var="orgForPositionPred" value="${vivoCore}organizationForPosition" />
|
|
|
|
|
|
|
|
<%-- Assertions for adding a new role --%>
|
|
|
|
|
|
|
|
<v:jsonset var="orgTypeAssertion">
|
|
|
|
?org a ?orgType .
|
2010-01-29 22:12:41 +00:00
|
|
|
</v:jsonset>
|
|
|
|
|
2010-09-01 21:06:17 +00:00
|
|
|
<v:jsonset var="orgLabelAssertion">
|
|
|
|
?org <${label}> ?orgLabel .
|
2010-01-29 22:12:41 +00:00
|
|
|
</v:jsonset>
|
|
|
|
|
2010-09-01 21:06:17 +00:00
|
|
|
<v:jsonset var="positionTitleAssertion" >
|
|
|
|
?position <${titlePred}> ?positionTitle ;
|
|
|
|
<${label}> ?positionTitle .
|
2010-01-29 22:12:41 +00:00
|
|
|
</v:jsonset>
|
2010-09-01 21:06:17 +00:00
|
|
|
|
|
|
|
<v:jsonset var="positionTypeAssertion">
|
|
|
|
?position a ?positionType .
|
2010-01-29 22:12:41 +00:00
|
|
|
</v:jsonset>
|
|
|
|
|
2010-09-01 21:06:17 +00:00
|
|
|
<v:jsonset var="startYearAssertion" >
|
|
|
|
?position <${startYearPred}> ?startYear .
|
2010-01-29 22:12:41 +00:00
|
|
|
</v:jsonset>
|
2010-09-01 21:06:17 +00:00
|
|
|
|
2010-01-29 22:12:41 +00:00
|
|
|
<v:jsonset var="endYearAssertion" >
|
2010-09-01 21:06:17 +00:00
|
|
|
?position <${endYearPred}> ?endYear .
|
2010-01-29 22:12:41 +00:00
|
|
|
</v:jsonset>
|
|
|
|
|
2010-09-01 21:06:17 +00:00
|
|
|
<v:jsonset var="n3ForNewPosition">
|
|
|
|
@prefix core: <${vivoCore}> .
|
|
|
|
|
|
|
|
?person core:personInPosition ?position .
|
|
|
|
|
|
|
|
?position a ?positionType ;
|
|
|
|
core:positionForPerson ?person ;
|
|
|
|
<${positionInOrgPred}> ?org .
|
|
|
|
|
|
|
|
?org <${orgForPositionPred}> ?position .
|
2010-03-29 15:41:45 +00:00
|
|
|
</v:jsonset>
|
|
|
|
|
2010-09-01 21:06:17 +00:00
|
|
|
<v:jsonset var="n3ForPositionToOrg" >
|
|
|
|
?position <${positionInOrgPred}> ?org .
|
|
|
|
?org <${orgForPositionPred}> ?position .
|
2010-03-29 18:12:22 +00:00
|
|
|
</v:jsonset>
|
2010-09-01 21:06:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
<%-- Queries for editing an existing role --%>
|
|
|
|
|
|
|
|
<v:jsonset var="orgQuery" >
|
|
|
|
SELECT ?existingOrg WHERE {
|
|
|
|
?position <${positionInOrgPred}> ?existingOrg . }
|
2010-03-29 18:12:22 +00:00
|
|
|
</v:jsonset>
|
|
|
|
|
2010-09-01 21:06:17 +00:00
|
|
|
<v:jsonset var="orgLabelQuery" >
|
|
|
|
SELECT ?existingOrgLabel WHERE {
|
|
|
|
?position <${positionInOrgPred}> ?existingOrg .
|
|
|
|
?existingOrg <${label}> ?existingOrgLabel .
|
|
|
|
}
|
2010-03-29 15:41:45 +00:00
|
|
|
</v:jsonset>
|
2010-09-01 21:06:17 +00:00
|
|
|
|
|
|
|
<v:jsonset var="orgTypeQuery" >
|
|
|
|
SELECT ?existingOrgType WHERE {
|
|
|
|
?position <${positionInOrgPred}> ?existingOrg .
|
|
|
|
?existingOrg a ?existingOrgType .
|
|
|
|
}
|
2010-01-29 22:12:41 +00:00
|
|
|
</v:jsonset>
|
|
|
|
|
2010-09-01 21:06:17 +00:00
|
|
|
<v:jsonset var="positionTitleQuery" >
|
|
|
|
SELECT ?existingPositionTitle WHERE {
|
|
|
|
?position <${titlePred}> ?existingPositionTitle . }
|
|
|
|
</v:jsonset>
|
2010-01-29 22:12:41 +00:00
|
|
|
|
2010-09-01 21:06:17 +00:00
|
|
|
<v:jsonset var="positionTypeQuery">
|
|
|
|
SELECT ?existingPositionType WHERE {
|
|
|
|
?position a ?existingPositionType . }
|
2010-03-29 15:41:45 +00:00
|
|
|
</v:jsonset>
|
|
|
|
|
2010-09-01 21:06:17 +00:00
|
|
|
<v:jsonset var="startYearQuery" >
|
|
|
|
SELECT ?existingStartYear WHERE {
|
|
|
|
?position <${startYearPred}> ?existingStartYear . }
|
|
|
|
</v:jsonset>
|
2010-04-12 21:26:09 +00:00
|
|
|
|
2010-09-01 21:06:17 +00:00
|
|
|
<v:jsonset var="endYearQuery" >
|
|
|
|
SELECT ?existingEndYear WHERE {
|
|
|
|
?position <${endYearPred}> ?existingEndYear . }
|
2010-04-12 21:26:09 +00:00
|
|
|
</v:jsonset>
|
2010-01-29 22:12:41 +00:00
|
|
|
|
2010-03-29 17:14:24 +00:00
|
|
|
<v:jsonset var="positionClassUriJson">${positionClass}</v:jsonset>
|
|
|
|
<v:jsonset var="orgClassUriJson">${orgClass}</v:jsonset>
|
2010-01-29 22:12:41 +00:00
|
|
|
|
|
|
|
<c:set var="editjson" scope="request">
|
|
|
|
{
|
|
|
|
"formUrl" : "${formUrl}",
|
|
|
|
"editKey" : "${editKey}",
|
|
|
|
"urlPatternToReturnTo" : "/entity",
|
|
|
|
|
|
|
|
"subject" : ["person", "${subjectUriJson}" ],
|
|
|
|
"predicate" : ["predicate", "${predicateUriJson}" ],
|
2010-09-01 21:06:17 +00:00
|
|
|
"object" : ["position", "${objectUriJson}", "URI" ],
|
2010-01-29 22:12:41 +00:00
|
|
|
|
2010-09-01 21:06:17 +00:00
|
|
|
"n3required" : [ "${n3ForNewPosition}", "${positionTitleAssertion}", "${positionTypeAssertion}", "${startYearAssertion}" ],
|
2010-03-29 15:41:45 +00:00
|
|
|
|
2010-09-01 21:06:17 +00:00
|
|
|
"n3optional" : [ "${orgLabelAssertion}", "${orgTypeAssertion}", "${endYearAssertion}" ],
|
|
|
|
|
|
|
|
"newResources" : { "position" : "${defaultNamespace}",
|
|
|
|
"org" : "${defaultNamespace}" },
|
2010-03-29 15:41:45 +00:00
|
|
|
|
2010-01-29 22:12:41 +00:00
|
|
|
"urisInScope" : { },
|
|
|
|
"literalsInScope": { },
|
2010-09-01 21:06:17 +00:00
|
|
|
"urisOnForm" : [ "org", "orgType", "positionType" ],
|
|
|
|
"literalsOnForm" : [ "positionTitle", "orgLabel", "startYear", "endYear" ],
|
2010-01-29 22:12:41 +00:00
|
|
|
"filesOnForm" : [ ],
|
|
|
|
"sparqlForLiterals" : { },
|
|
|
|
"sparqlForUris" : { },
|
|
|
|
"sparqlForExistingLiterals" : {
|
2010-09-01 21:06:17 +00:00
|
|
|
"orgLabel" : "${orgLabelQuery}",
|
|
|
|
"positionTitle" : "${positionTitleQuery}",
|
|
|
|
"startYear" : "${startYearQuery}",
|
|
|
|
"endYear" : "${endYearQuery}"
|
2010-01-29 22:12:41 +00:00
|
|
|
},
|
|
|
|
"sparqlForExistingUris" : {
|
2010-09-01 21:06:17 +00:00
|
|
|
"org" : "${orgQuery}",
|
|
|
|
"orgType" : "${orgTypeQuery}",
|
|
|
|
"positionType" : "${positionTypeQuery}"
|
2010-01-29 22:12:41 +00:00
|
|
|
},
|
|
|
|
"fields" : {
|
2010-09-01 21:06:17 +00:00
|
|
|
"positionTitle" : {
|
2010-01-29 22:12:41 +00:00
|
|
|
"newResource" : "false",
|
|
|
|
"validators" : [ "nonempty" ],
|
|
|
|
"optionsType" : "UNDEFINED",
|
|
|
|
"literalOptions" : [ ],
|
|
|
|
"predicateUri" : "",
|
|
|
|
"objectClassUri" : "",
|
2010-03-30 14:13:23 +00:00
|
|
|
"rangeDatatypeUri" : "${stringDatatypeUriJson}",
|
2010-01-29 22:12:41 +00:00
|
|
|
"rangeLang" : "",
|
2010-09-01 21:06:17 +00:00
|
|
|
"assertions" : [ "${positionTitleAssertion}" ]
|
2010-01-29 22:12:41 +00:00
|
|
|
},
|
2010-03-29 17:14:24 +00:00
|
|
|
"positionType" : {
|
|
|
|
"newResource" : "false",
|
2010-04-05 17:51:17 +00:00
|
|
|
"validators" : [ "nonempty" ],
|
2010-03-29 17:14:24 +00:00
|
|
|
"optionsType" : "CHILD_VCLASSES_WITH_PARENT",
|
|
|
|
"literalOptions" : [ "Select one" ],
|
|
|
|
"predicateUri" : "",
|
|
|
|
"objectClassUri" : "${positionClassUriJson}",
|
|
|
|
"rangeDatatypeUri" : "",
|
|
|
|
"rangeLang" : "",
|
2010-03-29 18:12:22 +00:00
|
|
|
"assertions" : [ "${positionTypeAssertion}" ]
|
2010-03-29 17:14:24 +00:00
|
|
|
},
|
2010-09-01 21:06:17 +00:00
|
|
|
"org" : {
|
2010-01-29 22:12:41 +00:00
|
|
|
"newResource" : "false",
|
|
|
|
"validators" : [ ],
|
|
|
|
"optionsType" : "INDIVIDUALS_VIA_VCLASS",
|
2010-03-26 22:33:55 +00:00
|
|
|
"literalOptions" : [ "Select one" ],
|
2010-01-29 22:12:41 +00:00
|
|
|
"predicateUri" : "",
|
2010-03-29 17:14:24 +00:00
|
|
|
"objectClassUri" : "${orgClassUriJson}",
|
2010-01-29 22:12:41 +00:00
|
|
|
"rangeDatatypeUri" : "",
|
|
|
|
"rangeLang" : "",
|
2010-09-01 21:06:17 +00:00
|
|
|
"assertions" : [ "${n3ForPositionToOrg}" ]
|
2010-01-29 22:12:41 +00:00
|
|
|
},
|
2010-09-01 21:06:17 +00:00
|
|
|
"orgLabel" : {
|
2010-03-30 14:13:23 +00:00
|
|
|
"newResource" : "false",
|
2010-01-29 22:12:41 +00:00
|
|
|
"validators" : [ ],
|
|
|
|
"optionsType" : "UNDEFINED",
|
|
|
|
"literalOptions" : [ ],
|
|
|
|
"predicateUri" : "",
|
|
|
|
"objectClassUri" : "",
|
2010-03-26 20:19:17 +00:00
|
|
|
"rangeDatatypeUri" : "${stringDatatypeUriJson}",
|
2010-01-29 22:12:41 +00:00
|
|
|
"rangeLang" : "",
|
2010-09-01 21:06:17 +00:00
|
|
|
"assertions" : [ "${orgLabelAssertion}" ]
|
2010-01-29 22:12:41 +00:00
|
|
|
},
|
2010-09-01 21:06:17 +00:00
|
|
|
"orgType" : {
|
2010-03-29 15:41:45 +00:00
|
|
|
"newResource" : "false",
|
|
|
|
"validators" : [ ],
|
2010-03-30 01:03:57 +00:00
|
|
|
"optionsType" : "CHILD_VCLASSES",
|
2010-03-29 15:41:45 +00:00
|
|
|
"literalOptions" : [ "Select one" ],
|
|
|
|
"predicateUri" : "",
|
2010-03-30 01:03:57 +00:00
|
|
|
"objectClassUri" : "${orgClassUriJson}",
|
2010-03-29 15:41:45 +00:00
|
|
|
"rangeDatatypeUri" : "",
|
|
|
|
"rangeLang" : "",
|
2010-09-01 21:06:17 +00:00
|
|
|
"assertions" : [ "${orgTypeAssertion}" ]
|
2010-03-29 15:41:45 +00:00
|
|
|
},
|
2010-01-29 22:12:41 +00:00
|
|
|
"startYear" : {
|
|
|
|
"newResource" : "false",
|
2010-03-26 20:19:17 +00:00
|
|
|
"validators" : [ "nonempty", "datatype:${gYearDatatypeUriJson}" ],
|
2010-01-29 22:12:41 +00:00
|
|
|
"optionsType" : "UNDEFINED",
|
|
|
|
"literalOptions" : [ ],
|
|
|
|
"predicateUri" : "",
|
|
|
|
"objectClassUri" : "",
|
2010-03-26 20:19:17 +00:00
|
|
|
"rangeDatatypeUri" : "${gYearDatatypeUriJson}",
|
2010-01-29 22:12:41 +00:00
|
|
|
"rangeLang" : "",
|
|
|
|
"assertions" : ["${startYearAssertion}"]
|
|
|
|
},
|
|
|
|
"endYear" : {
|
|
|
|
"newResource" : "false",
|
2010-03-26 20:19:17 +00:00
|
|
|
"validators" : [ "datatype:${gYearDatatypeUriJson}" ],
|
2010-01-29 22:12:41 +00:00
|
|
|
"optionsType" : "UNDEFINED",
|
|
|
|
"literalOptions" : [ ],
|
|
|
|
"predicateUri" : "",
|
|
|
|
"objectClassUri" : "",
|
2010-03-26 20:19:17 +00:00
|
|
|
"rangeDatatypeUri" : "${gYearDatatypeUriJson}",
|
2010-01-29 22:12:41 +00:00
|
|
|
"rangeLang" : "",
|
|
|
|
"assertions" : ["${endYearAssertion}"]
|
2010-02-05 20:02:47 +00:00
|
|
|
}
|
2010-01-29 22:12:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</c:set>
|
|
|
|
<%
|
2010-03-29 15:41:45 +00:00
|
|
|
log.debug(request.getAttribute("editjson"));
|
2010-01-29 22:12:41 +00:00
|
|
|
|
2010-03-26 22:33:55 +00:00
|
|
|
EditConfiguration editConfig = EditConfiguration.getConfigFromSession(session,request);
|
|
|
|
if (editConfig == null) {
|
2010-03-29 15:41:45 +00:00
|
|
|
editConfig = new EditConfiguration((String) request.getAttribute("editjson"));
|
2010-03-26 22:33:55 +00:00
|
|
|
EditConfiguration.putConfigInSession(editConfig,session);
|
|
|
|
}
|
|
|
|
|
2010-04-14 18:48:12 +00:00
|
|
|
editConfig.addValidator(new StartYearBeforeEndYear("startYear","endYear") );
|
2010-09-01 21:06:17 +00:00
|
|
|
|
2010-03-26 22:33:55 +00:00
|
|
|
Model model = (Model) application.getAttribute("jenaOntModel");
|
|
|
|
String objectUri = (String) request.getAttribute("objectUri");
|
2010-03-29 15:41:45 +00:00
|
|
|
if (objectUri != null) { // editing existing
|
2010-03-26 22:33:55 +00:00
|
|
|
editConfig.prepareForObjPropUpdate(model);
|
2010-03-29 15:41:45 +00:00
|
|
|
} else { // adding new
|
2010-03-26 22:33:55 +00:00
|
|
|
editConfig.prepareForNonUpdate(model);
|
|
|
|
}
|
|
|
|
|
|
|
|
String subjectName = ((Individual) request.getAttribute("subject")).getName();
|
2010-03-29 15:41:45 +00:00
|
|
|
%>
|
|
|
|
|
|
|
|
<c:set var="subjectName" value="<%= subjectName %>" />
|
|
|
|
<%
|
|
|
|
if (objectUri != null) { // editing existing entry
|
|
|
|
%>
|
2010-09-01 21:06:17 +00:00
|
|
|
<c:set var="editMode" value="edit" />
|
|
|
|
<c:set var="titleVerb" value="Edit" />
|
|
|
|
<c:set var="submitButtonText" value="Edit Position" />
|
|
|
|
<c:set var="disabledVal" value="disabled" />
|
2010-03-29 15:41:45 +00:00
|
|
|
<%
|
|
|
|
} else { // adding new entry
|
|
|
|
%>
|
2010-09-01 21:06:17 +00:00
|
|
|
<c:set var="editMode" value="add" />
|
|
|
|
<c:set var="titleVerb" value="Create" />
|
|
|
|
<c:set var="submitButtonText" value="Position" />
|
|
|
|
<c:set var="disabledVal" value="" />
|
2010-03-29 15:41:45 +00:00
|
|
|
<% }
|
2010-09-01 21:06:17 +00:00
|
|
|
|
|
|
|
List<String> customJs = new ArrayList<String>(Arrays.asList(JavaScript.JQUERY_UI.path(),
|
|
|
|
JavaScript.CUSTOM_FORM_UTILS.path(),
|
|
|
|
"/edit/forms/js/customFormWithAutocomplete.js"
|
|
|
|
));
|
2010-03-26 22:33:55 +00:00
|
|
|
request.setAttribute("customJs", customJs);
|
2010-03-26 23:06:38 +00:00
|
|
|
|
2010-09-01 21:06:17 +00:00
|
|
|
List<String> customCss = new ArrayList<String>(Arrays.asList(Css.JQUERY_UI.path(),
|
|
|
|
Css.CUSTOM_FORM.path(),
|
|
|
|
"/edit/forms/css/autocomplete.css",
|
|
|
|
"/edit/forms/css/customFormWithAutocomplete.css"
|
|
|
|
));
|
|
|
|
request.setAttribute("customCss", customCss);
|
2010-01-29 22:12:41 +00:00
|
|
|
%>
|
|
|
|
|
2010-03-30 01:03:57 +00:00
|
|
|
<c:set var="requiredHint" value="<span class='requiredHint'> *</span>" />
|
2010-09-01 21:06:17 +00:00
|
|
|
<c:set var="yearHint" value="<span class='hint'>(YYYY)</span>" />
|
2010-03-30 01:03:57 +00:00
|
|
|
|
2010-03-26 21:58:00 +00:00
|
|
|
<jsp:include page="${preForm}" />
|
2010-01-29 22:12:41 +00:00
|
|
|
|
2010-09-01 21:06:17 +00:00
|
|
|
<h2>${titleVerb} position entry for <%= subjectName %></h2>
|
2010-03-30 19:33:54 +00:00
|
|
|
|
2010-09-02 15:39:56 +00:00
|
|
|
<form action="<c:url value="/edit/processRdfForm2.jsp"/>" >
|
2010-03-29 15:41:45 +00:00
|
|
|
|
2010-09-01 21:06:17 +00:00
|
|
|
<p class="inline"><v:input type="select" label="Organization Type ${requiredHint}" name="orgType" disabled="${disabledVal}" id="typeSelector" /></p>
|
|
|
|
|
|
|
|
<div class="fullViewOnly">
|
|
|
|
|
|
|
|
<p><v:input type="text" id="relatedIndLabel" name="orgLabel" label="Name ${requiredHint}" cssClass="acSelector" disabled="${disabledVal}" size="50" /></p>
|
|
|
|
|
|
|
|
<%-- Store these values in hidden fields, because the displayed fields are disabled and don't submit. This ensures that when
|
|
|
|
returning from a validation error, we retain the values. --%>
|
|
|
|
<c:if test="${editMode == 'edit'}">
|
|
|
|
<v:input type="hidden" id="orgType" />
|
|
|
|
<v:input type="hidden" id="orgLabel" />
|
|
|
|
</c:if>
|
|
|
|
|
|
|
|
<div class="acSelection">
|
|
|
|
<%-- RY maybe make this a label and input field. See what looks best. --%>
|
|
|
|
<p class="inline"><label></label><span class="acSelectionInfo"></span> <a href="<c:url value="/individual?uri=" />" class="verifyMatch">(Verify this match)</a></p>
|
|
|
|
<v:input type="hidden" id="org" cssClass="acUriReceiver" /> <!-- Field value populated by JavaScript -->
|
2010-04-02 22:30:09 +00:00
|
|
|
</div>
|
2010-09-01 21:06:17 +00:00
|
|
|
|
|
|
|
<v:input type="text" label="Position Title ${requiredHint}" name="positionTitle" id="newIndLabel" size="30" />
|
2010-03-30 01:03:57 +00:00
|
|
|
<v:input type="select" label="Position Type ${requiredHint}" id="positionType" />
|
2010-03-26 21:58:00 +00:00
|
|
|
|
2010-09-01 21:06:17 +00:00
|
|
|
<v:input type="text" label="Start Year ${requiredHint} <span class='hint'>(YYYY)</span>" id="startYear" size="4" />
|
|
|
|
<v:input type="text" label="End Year <span class='hint'>(YYYY)</span>" id="endYear" size="4" />
|
2010-03-29 15:41:45 +00:00
|
|
|
|
2010-09-01 21:06:17 +00:00
|
|
|
</div>
|
2010-04-02 23:21:42 +00:00
|
|
|
|
2010-09-01 21:06:17 +00:00
|
|
|
<p class="submit"><v:input type="submit" id="submit" value="${submitButtonText}" cancel="true"/></p>
|
2010-03-30 01:03:57 +00:00
|
|
|
|
|
|
|
<p id="requiredLegend" class="requiredHint">* required fields</p>
|
2010-01-29 22:12:41 +00:00
|
|
|
</form>
|
|
|
|
|
2010-09-01 21:06:17 +00:00
|
|
|
<c:url var="acUrl" value="/autocomplete?tokenize=true&stem=true" />
|
2010-01-29 22:12:41 +00:00
|
|
|
|
2010-09-01 21:06:17 +00:00
|
|
|
<script type="text/javascript">
|
|
|
|
var customFormData = {
|
|
|
|
acUrl: '${acUrl}',
|
|
|
|
editMode: '${editMode}',
|
|
|
|
submitButtonTextType: 'compound'
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<jsp:include page="${postForm}"/>
|