VIVO-112: ISF changes relating to vcard classes
This commit is contained in:
parent
80ff85385e
commit
c5d0bc21e8
39 changed files with 1611 additions and 831 deletions
42
productMods/config/listViewConfig-additionalEmail.xml
Normal file
42
productMods/config/listViewConfig-additionalEmail.xml
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
|
||||
|
||||
<list-view-config>
|
||||
<query-select>
|
||||
PREFIX vcard: <http://www.w3.org/2006/vcard/ns#>
|
||||
|
||||
SELECT DISTINCT ?vcard ?email
|
||||
?emailAddress
|
||||
WHERE {
|
||||
?subject ?property ?vcard .
|
||||
?vcard vcard:hasEmail ?email
|
||||
OPTIONAL { ?email vcard:email ?emailAddress }
|
||||
MINUS {?email a vcard:Work}
|
||||
}
|
||||
</query-select>
|
||||
|
||||
<query-construct>
|
||||
PREFIX vcard: <http://www.w3.org/2006/vcard/ns#>
|
||||
CONSTRUCT {
|
||||
?subject ?property ?vcard .
|
||||
?vcard vcard:hasEmail ?email .
|
||||
?email ?emailProperty ?emailValue
|
||||
} WHERE {
|
||||
{
|
||||
?subject ?property ?vcard
|
||||
} UNION {
|
||||
?subject ?property ?vcard .
|
||||
?vcard vcard:hasEmail ?email
|
||||
} UNION {
|
||||
?subject ?property ?vcard .
|
||||
?vcard vcard:hasEmail ?email .
|
||||
?email ?emailProperty ?emailValue
|
||||
}
|
||||
}
|
||||
</query-construct>
|
||||
|
||||
<template>propStatement-emailAddress.ftl</template>
|
||||
<postprocessor>edu.cornell.mannlib.vitro.webapp.web.templatemodels.individual.MaintainDuplicatesObjectPropertyDataPostProcessor</postprocessor>
|
||||
</list-view-config>
|
46
productMods/config/listViewConfig-fullName.xml
Normal file
46
productMods/config/listViewConfig-fullName.xml
Normal file
|
@ -0,0 +1,46 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
|
||||
|
||||
<list-view-config>
|
||||
<query-select>
|
||||
PREFIX vcard: <http://www.w3.org/2006/vcard/ns#>
|
||||
|
||||
SELECT DISTINCT ?vcard ?fullName
|
||||
?firstName
|
||||
?middleName
|
||||
?lastName
|
||||
WHERE {
|
||||
?subject ?property ?vcard .
|
||||
?vcard vcard:hasName ?fullName
|
||||
OPTIONAL { ?fullName vcard:givenName ?firstName }
|
||||
OPTIONAL { ?fullName vcard:middleName ?middleName }
|
||||
OPTIONAL { ?fullName vcard:familyName ?lastName }
|
||||
|
||||
}
|
||||
</query-select>
|
||||
|
||||
<query-construct>
|
||||
PREFIX vcard: <http://www.w3.org/2006/vcard/ns#>
|
||||
CONSTRUCT {
|
||||
?subject ?property ?vcard .
|
||||
?vcard vcard:hasName ?fullName .
|
||||
?fullName ?fullNameProperty ?fullNameValue
|
||||
} WHERE {
|
||||
{
|
||||
?subject ?property ?vcard
|
||||
} UNION {
|
||||
?subject ?property ?vcard .
|
||||
?vcard vcard:hasName ?fullName
|
||||
} UNION {
|
||||
?subject ?property ?vcard .
|
||||
?vcard vcard:hasName ?fullName .
|
||||
?fullName ?fullNameProperty ?fullNameValue
|
||||
}
|
||||
}
|
||||
</query-construct>
|
||||
|
||||
<template>propStatement-fullName.ftl</template>
|
||||
<postprocessor>edu.cornell.mannlib.vitro.webapp.web.templatemodels.individual.MaintainDuplicatesObjectPropertyDataPostProcessor</postprocessor>
|
||||
</list-view-config>
|
|
@ -1,71 +1,51 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
|
||||
|
||||
<list-view-config>
|
||||
<query-select>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#>
|
||||
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
||||
PREFIX vivo: <http://vivoweb.org/ontology/core#>
|
||||
|
||||
SELECT DISTINCT ?subclass
|
||||
?address
|
||||
?localName
|
||||
?label
|
||||
?street1
|
||||
?street2
|
||||
?street3
|
||||
?city
|
||||
?state
|
||||
?postalCode
|
||||
?country
|
||||
|
||||
WHERE {
|
||||
?subject ?property ?address
|
||||
LET ( ?localName := afn:localname(?address) )
|
||||
OPTIONAL { ?address rdfs:label ?label }
|
||||
OPTIONAL { ?address vivo:address1 ?street1 }
|
||||
OPTIONAL { ?address vivo:address2 ?street2 }
|
||||
OPTIONAL { ?address vivo:address3 ?street3 }
|
||||
OPTIONAL { ?address vivo:addressCity ?city }
|
||||
OPTIONAL { ?address vivo:addressState ?state }
|
||||
OPTIONAL { ?address vivo:addressPostalCode ?postalCode }
|
||||
OPTIONAL { ?address vivo:addressCountry ?country }
|
||||
|
||||
OPTIONAL { ?address vitro:mostSpecificType ?subclass .
|
||||
?subclass rdfs:subClassOf vivo:Address
|
||||
}
|
||||
|
||||
} ORDER BY ?country ?label
|
||||
</query-select>
|
||||
|
||||
<query-construct>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
PREFIX vivo: <http://vivoweb.org/ontology/core#>
|
||||
CONSTRUCT {
|
||||
?subclass rdfs:subClassOf vivo:Address
|
||||
} WHERE {
|
||||
?subclass rdfs:subClassOf vivo:Address
|
||||
}
|
||||
</query-construct>
|
||||
|
||||
<query-construct>
|
||||
PREFIX vivo: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
CONSTRUCT {
|
||||
?subject ?property ?address .
|
||||
?address ?addressProperty ?addressValue
|
||||
} WHERE {
|
||||
{
|
||||
?subject ?property ?address
|
||||
} UNION {
|
||||
?subject ?property ?address .
|
||||
?address ?addressProperty ?addressValue
|
||||
}
|
||||
}
|
||||
</query-construct>
|
||||
|
||||
<template>propStatement-mailingAddress.ftl</template>
|
||||
</list-view-config>
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
|
||||
|
||||
<list-view-config>
|
||||
<query-select>
|
||||
PREFIX vcard: <http://www.w3.org/2006/vcard/ns#>
|
||||
|
||||
SELECT DISTINCT ?vcard ?address
|
||||
?street
|
||||
?locality
|
||||
?region
|
||||
?postalCode
|
||||
?country
|
||||
|
||||
WHERE {
|
||||
?subject ?property ?vcard .
|
||||
?vcard vcard:hasAddress ?address
|
||||
OPTIONAL { ?address vcard:streetAddress ?street }
|
||||
OPTIONAL { ?address vcard:locality ?locality }
|
||||
OPTIONAL { ?address vcard:region ?region }
|
||||
OPTIONAL { ?address vcard:postalCode ?postalCode }
|
||||
OPTIONAL { ?address vcard:country ?country }
|
||||
|
||||
} ORDER BY ?country ?region ?street
|
||||
</query-select>
|
||||
|
||||
<query-construct>
|
||||
PREFIX vcard: <http://www.w3.org/2006/vcard/ns#>
|
||||
CONSTRUCT {
|
||||
?subject ?property ?vcard .
|
||||
?vcard vcard:hasAddress ?address .
|
||||
?address ?addressProperty ?addressValue
|
||||
} WHERE {
|
||||
{
|
||||
?subject ?property ?vcard
|
||||
} UNION {
|
||||
?subject ?property ?vcard .
|
||||
?vcard vcard:hasAddress ?address
|
||||
} UNION {
|
||||
?subject ?property ?vcard .
|
||||
?vcard vcard:hasAddress ?address .
|
||||
?address ?addressProperty ?addressValue
|
||||
}
|
||||
}
|
||||
</query-construct>
|
||||
|
||||
<template>propStatement-mailingAddress.ftl</template>
|
||||
<postprocessor>edu.cornell.mannlib.vitro.webapp.web.templatemodels.individual.MaintainDuplicatesObjectPropertyDataPostProcessor</postprocessor>
|
||||
</list-view-config>
|
||||
|
|
46
productMods/config/listViewConfig-primaryEmail.xml
Normal file
46
productMods/config/listViewConfig-primaryEmail.xml
Normal file
|
@ -0,0 +1,46 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
|
||||
|
||||
<list-view-config>
|
||||
<query-select>
|
||||
PREFIX vcard: <http://www.w3.org/2006/vcard/ns#>
|
||||
|
||||
SELECT DISTINCT ?vcard ?email
|
||||
?emailAddress
|
||||
WHERE {
|
||||
?subject ?property ?vcard .
|
||||
?vcard vcard:hasEmail ?email .
|
||||
?email a vcard:Work
|
||||
OPTIONAL { ?email vcard:email ?emailAddress }
|
||||
|
||||
}
|
||||
</query-select>
|
||||
|
||||
<query-construct>
|
||||
PREFIX vcard: <http://www.w3.org/2006/vcard/ns#>
|
||||
CONSTRUCT {
|
||||
?subject ?property ?vcard .
|
||||
?vcard vcard:hasEmail ?email .
|
||||
?email a vcard:Work .
|
||||
?email ?emailProperty ?emailValue
|
||||
} WHERE {
|
||||
{
|
||||
?subject ?property ?vcard
|
||||
} UNION {
|
||||
?subject ?property ?vcard .
|
||||
?vcard vcard:hasEmail ?email .
|
||||
?email a vcard:Work
|
||||
} UNION {
|
||||
?subject ?property ?vcard .
|
||||
?vcard vcard:hasEmail ?email .
|
||||
?email a vcard:Work .
|
||||
?email ?emailProperty ?emailValue
|
||||
}
|
||||
}
|
||||
</query-construct>
|
||||
|
||||
<template>propStatement-emailAddress.ftl</template>
|
||||
<postprocessor>edu.cornell.mannlib.vitro.webapp.web.templatemodels.individual.MaintainDuplicatesObjectPropertyDataPostProcessor</postprocessor>
|
||||
</list-view-config>
|
42
productMods/config/listViewConfig-telephoneNumber.xml
Normal file
42
productMods/config/listViewConfig-telephoneNumber.xml
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<!-- See guidelines in vitro/doc/list_view_configuration_guidelines.txt -->
|
||||
|
||||
<list-view-config>
|
||||
<query-select>
|
||||
PREFIX vcard: <http://www.w3.org/2006/vcard/ns#>
|
||||
|
||||
SELECT DISTINCT ?vcard ?phone
|
||||
?number
|
||||
WHERE {
|
||||
?subject ?property ?vcard .
|
||||
?vcard vcard:hasTelephone ?phone
|
||||
OPTIONAL { ?phone vcard:telephone ?number }
|
||||
|
||||
}
|
||||
</query-select>
|
||||
|
||||
<query-construct>
|
||||
PREFIX vcard: <http://www.w3.org/2006/vcard/ns#>
|
||||
CONSTRUCT {
|
||||
?subject ?property ?vcard .
|
||||
?vcard vcard:hasTelephone ?phone .
|
||||
?phone ?phoneProperty ?phoneValue
|
||||
} WHERE {
|
||||
{
|
||||
?subject ?property ?vcard
|
||||
} UNION {
|
||||
?subject ?property ?vcard .
|
||||
?vcard vcard:hasTelephone ?phone
|
||||
} UNION {
|
||||
?subject ?property ?vcard .
|
||||
?vcard vcard:hasTelephone ?phone .
|
||||
?phone ?phoneProperty ?phoneValue
|
||||
}
|
||||
}
|
||||
</query-construct>
|
||||
|
||||
<template>propStatement-telephoneNumber.ftl</template>
|
||||
<postprocessor>edu.cornell.mannlib.vitro.webapp.web.templatemodels.individual.MaintainDuplicatesObjectPropertyDataPostProcessor</postprocessor>
|
||||
</list-view-config>
|
|
@ -9,35 +9,55 @@
|
|||
<query-select>
|
||||
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
PREFIX vcard: <http://www.w3.org/2006/vcard/ns#>
|
||||
|
||||
SELECT ?link
|
||||
SELECT ?vcard ?link
|
||||
(afn:localname(?link) AS ?linkName)
|
||||
?anchor
|
||||
?label
|
||||
?url
|
||||
?rank WHERE {
|
||||
?subject ?property ?link
|
||||
OPTIONAL { ?link core:linkAnchorText ?anchor }
|
||||
OPTIONAL { ?link core:linkURI ?url }
|
||||
?subject ?property ?vcard .
|
||||
?vcard vcard:hasURL ?link
|
||||
OPTIONAL { ?link rdfs:label ?label }
|
||||
OPTIONAL { ?link vcard:url ?url }
|
||||
OPTIONAL { ?link core:rank ?rank }
|
||||
<critical-data-required>
|
||||
FILTER ( bound(?url) )
|
||||
</critical-data-required>
|
||||
} ORDER BY ?rank ?anchor
|
||||
} ORDER BY ?rank ?label
|
||||
</query-select>
|
||||
|
||||
<query-construct>
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
PREFIX vcard: <http://www.w3.org/2006/vcard/ns#>
|
||||
CONSTRUCT {
|
||||
?subject ?property ?link .
|
||||
?link ?linkProp ?linkObj
|
||||
?subject ?property ?vcard .
|
||||
?vcard vcard:hasURL ?link .
|
||||
?link vcard:url ?url .
|
||||
?link core:rank ?rank .
|
||||
?link rdfs:label ?label
|
||||
} WHERE {
|
||||
{
|
||||
?subject ?property ?link
|
||||
?subject ?property ?vcard .
|
||||
?vcard vcard:hasURL ?link
|
||||
} UNION {
|
||||
?subject ?property ?link .
|
||||
?link ?linkProp ?linkObj
|
||||
?subject ?property ?vcard .
|
||||
?vcard vcard:hasURL ?link .
|
||||
?link vcard:url ?url
|
||||
} UNION {
|
||||
?subject ?property ?vcard .
|
||||
?vcard vcard:hasURL ?link .
|
||||
?link core:rank ?rank
|
||||
} UNION {
|
||||
?subject ?property ?vcard .
|
||||
?vcard vcard:hasURL ?link .
|
||||
?link rdfs:label ?label
|
||||
}
|
||||
}
|
||||
</query-construct>
|
||||
|
||||
<template>propStatement-webpage.ftl</template>
|
||||
<postprocessor>edu.cornell.mannlib.vitro.webapp.web.templatemodels.individual.MaintainDuplicatesObjectPropertyDataPostProcessor</postprocessor>
|
||||
</list-view-config>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#-- Contact info on individual profile page -->
|
||||
<#assign phone = propertyGroups.pullProperty("${core}phoneNumber")!>
|
||||
<#assign pEmail = propertyGroups.pullProperty("${core}primaryEmail")!>
|
||||
<#assign email = propertyGroups.pullProperty("${core}email")!>
|
||||
<#assign phone = propertyGroups.pullProperty("http://purl.obolibrary.org/obo/ARG_2000028","http://www.w3.org/2006/vcard/ns#Telephone")!>
|
||||
<#assign pEmail = propertyGroups.pullProperty("http://purl.obolibrary.org/obo/ARG_2000028","http://www.w3.org/2006/vcard/ns#Work")!>
|
||||
<#assign email = propertyGroups.pullProperty("http://purl.obolibrary.org/obo/ARG_2000028","http://www.w3.org/2006/vcard/ns#Email")!>
|
||||
|
||||
<#if editable || ( phone?has_content || pEmail?has_content || email?has_content ) >
|
||||
<h2 id="contactHeading" class="mainPropGroup">${i18n().contact_capitalized}</h2>
|
||||
|
@ -39,8 +39,8 @@
|
|||
<ul id="phone-list" role="list">
|
||||
<#list phone.statements as statement>
|
||||
<li role="listitem" <#if editable>style="padding-left:10px;"</#if>>
|
||||
${statement.value}
|
||||
<@p.editingLinks "${phone.localName}" statement editable />
|
||||
${statement.number!}
|
||||
<@p.editingLinks "${phone.localName}" "${phone.name}" statement editable />
|
||||
</li>
|
||||
</#list>
|
||||
</ul>
|
||||
|
@ -65,8 +65,8 @@
|
|||
<#list email.statements as statement>
|
||||
<li role="listitem" <#if editable>style="padding-left:10px;"</#if>>
|
||||
|
||||
<a class="email" href="mailto:${statement.value}" title="${i18n().email}">${statement.value}</a>
|
||||
<@p.editingLinks "${email.localName}" statement editable />
|
||||
<a class="email" href="mailto:${statement.emailAddress!}" title="${i18n().email}">${statement.emailAddress!}</a>
|
||||
<@p.editingLinks "${email.localName}" "${email.name}" statement editable />
|
||||
</li>
|
||||
</#list>
|
||||
</ul>
|
||||
|
|
|
@ -2,19 +2,19 @@
|
|||
|
||||
<#-- Contact info on individual profile page -->
|
||||
|
||||
<#assign phone = propertyGroups.pullProperty("${core}phoneNumber")!>
|
||||
<#assign primaryEmail = propertyGroups.pullProperty("${core}primaryEmail")!>
|
||||
<#assign addlEmail = propertyGroups.pullProperty("${core}email")!>
|
||||
<#assign phone = propertyGroups.pullProperty("http://purl.obolibrary.org/obo/ARG_2000028","http://www.w3.org/2006/vcard/ns#Telephone")!>
|
||||
<#assign primaryEmail = propertyGroups.pullProperty("http://purl.obolibrary.org/obo/ARG_2000028","http://www.w3.org/2006/vcard/ns#Work")!>
|
||||
<#assign addlEmail = propertyGroups.pullProperty("http://purl.obolibrary.org/obo/ARG_2000028","http://www.w3.org/2006/vcard/ns#Email")!>
|
||||
|
||||
<#if phone?has_content || primaryEmail?has_content || addlEmail?has_content >
|
||||
<ul style="font-size:1em;padding-bottom:4px"><li><strong>${i18n().contact_info}</strong></li></ul>
|
||||
</#if>
|
||||
|
||||
<#-- Primary Email -->
|
||||
<@emailLinks "${core}primaryEmail" primaryEmail />
|
||||
<@emailLinks "primaryEmail" primaryEmail />
|
||||
|
||||
<#-- Additional Emails -->
|
||||
<@emailLinks "${core}email" addlEmail />
|
||||
<@emailLinks "email" addlEmail />
|
||||
|
||||
<#-- Phone -->
|
||||
|
||||
|
@ -24,8 +24,8 @@
|
|||
<ul id="individual-phone" role="list" <#if editable>style="list-style:none;margin-left:0;"</#if>>
|
||||
<#list phone.statements as statement>
|
||||
<li role="listitem">
|
||||
${statement.value}
|
||||
<@p.editingLinks "${phone.localName}" statement editable />
|
||||
${statement.number!}
|
||||
<@p.editingLinks "${phone.localName}" "${phone.name}" statement editable />
|
||||
</li>
|
||||
</#list>
|
||||
</ul>
|
||||
|
@ -33,7 +33,7 @@
|
|||
</#if>
|
||||
|
||||
<#macro emailLinks property email>
|
||||
<#if property == "${core}primaryEmail">
|
||||
<#if property == "primaryEmail">
|
||||
<#local listId = "primary-email">
|
||||
<#local label = "${i18n().primary_email_capitalized}">
|
||||
<#else>
|
||||
|
@ -46,8 +46,8 @@
|
|||
<ul id="${listId}" class="individual-emails" role="list" <#if editable>style="list-style:none;margin-left:0;"</#if>>
|
||||
<#list email.statements as statement>
|
||||
<li role="listitem">
|
||||
<a class="email" href="mailto:${statement.value}" title="${i18n().email}">${statement.value}</a>
|
||||
<@p.editingLinks "${email.localName}" statement editable />
|
||||
<a class="email" href="mailto:${statement.emailAddress!}" title="${i18n().email}">${statement.emailAddress!}</a>
|
||||
<@p.editingLinks "${email.localName}" "${email.name}" statement editable />
|
||||
</li>
|
||||
</#list>
|
||||
</ul>
|
||||
|
|
|
@ -1,14 +1,7 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#-- This snippet will be included in lib-vivo-properties.ftl, so users will be able to have a
|
||||
different view when extending wilma theme
|
||||
|
||||
<#assign webpage = propertyGroups.pullProperty("${core}webpage")!>
|
||||
<@p.objectPropertyListing webpage editable />
|
||||
|
||||
|
||||
-->
|
||||
<#assign webpage = propertyGroups.pullProperty("${core}webpage")!>
|
||||
<#assign webpage = propertyGroups.pullProperty("http://purl.obolibrary.org/obo/ARG_2000028","http://www.w3.org/2006/vcard/ns#URL")!>
|
||||
<#if webpage?has_content> <#-- true when the property is in the list, even if not populated (when editing) -->
|
||||
<#if !editable && individual.person() >
|
||||
<ul style="font-size:0.9em;padding-bottom:4px"><li><strong>${i18n().websites}</strong></li></ul>
|
||||
|
@ -19,4 +12,3 @@
|
|||
<@p.objectProperty webpage editable />
|
||||
</ul>
|
||||
</#if>
|
||||
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#--
|
||||
This template must be self-contained and not rely on other variables set for the individual page, because it
|
||||
is also used to generate the property statement during a deletion.
|
||||
-->
|
||||
<@showAdditionalEmail statement />
|
||||
|
||||
<#-- Use a macro to keep variable assignments local; otherwise the values carry over to the
|
||||
next statement -->
|
||||
<#macro showAdditionalEmail statement>
|
||||
|
||||
<#if statement.emailAddress?has_content>
|
||||
${statement.emailAddress}
|
||||
</#if>
|
||||
|
||||
</#macro>
|
|
@ -0,0 +1,17 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#--
|
||||
This template must be self-contained and not rely on other variables set for the individual page, because it
|
||||
is also used to generate the property statement during a deletion.
|
||||
-->
|
||||
<@showFullName statement />
|
||||
|
||||
<#-- Use a macro to keep variable assignments local; otherwise the values carry over to the
|
||||
next statement -->
|
||||
<#macro showFullName statement>
|
||||
|
||||
<#if statement.fullName?has_content>
|
||||
${statement.firstName!} ${statement.middleName!} ${statement.lastName!}
|
||||
</#if>
|
||||
|
||||
</#macro>
|
|
@ -12,61 +12,40 @@
|
|||
next statement -->
|
||||
<#macro showAddress statement>
|
||||
|
||||
<#if ( statement.street1?has_content || statement.street2?has_content || statement.street3?has_content || statement.city?has_content ||
|
||||
statement.state?has_content ||statement.postalCode?has_content || statement.country?has_content )>
|
||||
<#-- until the custom form is ready, provide a link to the address profile for editing -->
|
||||
<div class="adr">
|
||||
<#if statement.street1?has_content>
|
||||
<div class="address-street1"><a href="${profileUrl(statement.uri("address"))}" title="${i18n().address_street_one}">${statement.street1}</a></div>
|
||||
</#if>
|
||||
|
||||
<#if statement.street2?has_content>
|
||||
<#if !statement.street1?has_content>
|
||||
<div class="address-street2"><a href="${profileUrl(statement.uri("address"))}" title="${i18n().address_street_two}">${statement.street2}</a></div>
|
||||
<#else>
|
||||
<div class="address-street2">${statement.street2}</div>
|
||||
</#if>
|
||||
</#if>
|
||||
|
||||
<#if statement.street3?has_content>
|
||||
<#if !statement.street1?has_content && !statement.street2?has_content>
|
||||
<div class="address-street3"><a href="${profileUrl(statement.uri("address"))}" title="${i18n().address_street_three}">${statement.street3}</a></div>
|
||||
<#else>
|
||||
<div class="address-street3">${statement.street3}</div>
|
||||
</#if>
|
||||
</#if>
|
||||
<#if statement.street?has_content>
|
||||
<p class="address-line">
|
||||
${statement.street}
|
||||
</p>
|
||||
</#if>
|
||||
|
||||
<#-- If the subclass is vivo:US Postal Address, or if the country is
|
||||
the US, display the city, state, and postal code on a single line. -->
|
||||
<#if ( statement.subclass?? && statement.subclass?contains("USPostalAddress") ) ||
|
||||
( statement.country?? && ( statement.country?contains("United States") ||
|
||||
statement.country == "US" ||
|
||||
statement.country == "USA" ) )>
|
||||
<#local cityState><@s.join [statement.city!, statement.state!], ", " /></#local>
|
||||
<#local cityStateZip><@s.join [ cityState!, statement.postalCode!], " " /></#local>
|
||||
<#if cityStateZip?has_content>
|
||||
<div class="extended-address">${cityStateZip}</div>
|
||||
</#if>
|
||||
<#else>
|
||||
<#if statement.city?has_content><div class="locality">${statement.city!}</div></#if>
|
||||
<#if statement.state?has_content><div class="region">${statement.state}</div></#if>
|
||||
<#if statement.postalCode?has_content><div class="postal-code">${statement.postalCode}</div></#if>
|
||||
</#if>
|
||||
|
||||
<#if statement.country?has_content>
|
||||
<div class="country-name">${statement.country}</div>
|
||||
</#if>
|
||||
</div>
|
||||
|
||||
<#-- Pre-1.4 addresses may only have an rdfs:label, since users using the default
|
||||
object property form sometimes entered the entire address as the label. Display that when
|
||||
there's no address data. -->
|
||||
<#elseif statement.editable>
|
||||
<#-- This can be removed when the custom form is available. Until then, provide a link to the
|
||||
address profile so the data can be edited. -->
|
||||
<a href="${profileUrl(statement.uri("address"))}" title="${i18n().address_label}">${statement.label!statement.localName}</a>
|
||||
<#else>
|
||||
${statement.label!}
|
||||
<#if ( statement.country?has_content && (statement.country == "US" || statement.country?contains("United States") || statement.country?contains("U.S.") || statement.country?contains("U.S.A.") || statement.country?contains("USA")))>
|
||||
<#local cityState><@s.join [statement.locality!, statement.region!], ", " /></#local>
|
||||
<#local cityStateZip><@s.join [ cityState!, statement.postalCode!], " " /></#local>
|
||||
<#if cityStateZip?has_content>
|
||||
<p class="address-line">${cityStateZip}</p>
|
||||
<p class="address-line">${statement.country!}</p>
|
||||
</#if>
|
||||
<#else>
|
||||
<#if statement.locality?has_content>
|
||||
<p class="address-line">
|
||||
${statement.locality}
|
||||
</p>
|
||||
</#if>
|
||||
<#if statement.region?has_content>
|
||||
<p class="address-line">
|
||||
${statement.region}
|
||||
</p>
|
||||
</#if>
|
||||
<#if statement.postalCode?has_content>
|
||||
<p class="address-line">
|
||||
${statement.postalCode}
|
||||
</p>
|
||||
</#if>
|
||||
<#if statement.country?has_content>
|
||||
<p class="address-line">
|
||||
${statement.country}
|
||||
</p>
|
||||
</#if>
|
||||
</#if>
|
||||
|
||||
</#macro>
|
||||
|
||||
</#macro>
|
|
@ -0,0 +1,17 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#--
|
||||
This template must be self-contained and not rely on other variables set for the individual page, because it
|
||||
is also used to generate the property statement during a deletion.
|
||||
-->
|
||||
<@showTelephone statement />
|
||||
|
||||
<#-- Use a macro to keep variable assignments local; otherwise the values carry over to the
|
||||
next statement -->
|
||||
<#macro showTelephone statement>
|
||||
|
||||
<#if statement.number?has_content>
|
||||
${statement.number}
|
||||
</#if>
|
||||
|
||||
</#macro>
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
<#macro showWebpage statement count identifier>
|
||||
<#local linkText>
|
||||
<#if statement.anchor?has_content>${statement.anchor}<#t>
|
||||
<#if statement.label?has_content>${statement.label}<#t>
|
||||
<#elseif statement.url?has_content>${statement.url}<#t>
|
||||
</#if>
|
||||
</#local>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
-->
|
||||
|
||||
<#assign linkText>
|
||||
<#if statement.anchor?has_content>${statement.anchor}<#t>
|
||||
<#if statement.label?has_content>${statement.label}<#t>
|
||||
<#elseif statement.url?has_content>${statement.url}<#t>
|
||||
</#if>
|
||||
</#assign>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<#--Retrieve variables needed-->
|
||||
<#assign url = lvf.getFormFieldValue(editSubmission, editConfiguration, "url")/>
|
||||
<#assign urlTypeValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "urlType")/>
|
||||
<#assign anchor = lvf.getFormFieldValue(editSubmission, editConfiguration, "anchor") />
|
||||
<#assign label = lvf.getFormFieldValue(editSubmission, editConfiguration, "label") />
|
||||
<#assign newRank = editConfiguration.pageData.newRank!"" />
|
||||
|
||||
<#if url?has_content>
|
||||
|
@ -66,8 +66,8 @@
|
|||
<label for="url">URL ${requiredHint}</label>
|
||||
<input size="70" type="text" id="url" name="url" value="${url}" role="input" />
|
||||
|
||||
<label for="anchor">${i18n().webpage_name}</label>
|
||||
<input size="70" type="text" id="anchor" name="anchor" value="${anchor}" role="input" />
|
||||
<label for="label">${i18n().webpage_name}</label>
|
||||
<input size="70" type="text" id="label" name="label" value="${label}" role="input" />
|
||||
|
||||
<#if editMode="add">
|
||||
<input type="hidden" name="rank" value="${newRank}" />
|
||||
|
|
|
@ -0,0 +1,102 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#-- this is in request.subject.name -->
|
||||
|
||||
<#-- leaving this edit/add mode code in for reference in case we decide we need it -->
|
||||
|
||||
<#import "lib-vivo-form.ftl" as lvf>
|
||||
|
||||
<#--Retrieve certain edit configuration information-->
|
||||
<#if editConfiguration.objectUri?has_content>
|
||||
<#assign editMode = "edit">
|
||||
<#else>
|
||||
<#assign editMode = "add">
|
||||
</#if>
|
||||
|
||||
<#assign htmlForElements = editConfiguration.pageData.htmlForElements />
|
||||
|
||||
<#--Retrieve variables needed-->
|
||||
<#assign firstNameValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "firstName") />
|
||||
<#assign middleNameValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "middleName") />
|
||||
<#assign lastNameValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "lastName") />
|
||||
|
||||
|
||||
<#--If edit submission exists, then retrieve validation errors if they exist-->
|
||||
<#if editSubmission?has_content && editSubmission.submissionExists = true && editSubmission.validationErrors?has_content>
|
||||
<#assign submissionErrors = editSubmission.validationErrors/>
|
||||
</#if>
|
||||
|
||||
<#if editMode == "edit">
|
||||
<#assign titleVerb="${i18n().edit_capitalized}">
|
||||
<#assign submitButtonText="${titleVerb}" + " ${i18n().full_name}">
|
||||
<#assign disabledVal="disabled">
|
||||
<#else>
|
||||
<#assign titleVerb="${i18n().create_capitalized}">
|
||||
<#assign submitButtonText="${titleVerb}" + " ${i18n().full_name}">
|
||||
<#assign disabledVal=""/>
|
||||
</#if>
|
||||
|
||||
<#assign requiredHint = "<span class='requiredHint'> *</span>" />
|
||||
|
||||
<h2>${titleVerb} ${i18n().full_name_for} ${editConfiguration.subjectName}</h2>
|
||||
|
||||
<#--Display error messages if any-->
|
||||
<#if submissionErrors?has_content>
|
||||
<section id="error-alert" role="alert">
|
||||
<img src="${urls.images}/iconAlert.png" width="24" height="24" alert="${i18n().error_alert_icon}" />
|
||||
<p>
|
||||
<#--Checking if any required fields are empty-->
|
||||
<#if lvf.submissionErrorExists(editSubmission, "firstName")>
|
||||
${i18n().enter_first_name}<br />
|
||||
</#if>
|
||||
<#if lvf.submissionErrorExists(editSubmission, "lastName")>
|
||||
${i18n().enter_last_name}<br />
|
||||
</#if>
|
||||
</p>
|
||||
</section>
|
||||
</#if>
|
||||
|
||||
<@lvf.unsupportedBrowser urls.base />
|
||||
|
||||
<section id="addFullNameToPerson" role="region">
|
||||
|
||||
<form id="addFullNameToPerson" class="customForm noIE67" action="${submitUrl}" role="add/edit name">
|
||||
|
||||
<p>
|
||||
<label for="firstName">${i18n().first_name} ${requiredHint}</label>
|
||||
<input size="25" type="text" id="firstName" name="firstName" value="${firstNameValue}" />
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label for="middleName">${i18n().middle_name}</label>
|
||||
<input size="25" type="text" id="middleName" name="middleName" value="${middleNameValue}" />
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label for="lastName">${i18n().last_name} ${requiredHint}</label>
|
||||
<input size="25" type="text" id="lastName" name="lastName" value="${lastNameValue}" />
|
||||
</p>
|
||||
|
||||
<input type="hidden" id="editKey" name="editKey" value="${editKey}"/>
|
||||
|
||||
<p class="submit">
|
||||
<input type="submit" id="submit" value="${submitButtonText}"/><span class="or"> ${i18n().or} </span>
|
||||
<a class="cancel" href="${cancelUrl}" title="${i18n().cancel_title}">${i18n().cancel_link}</a>
|
||||
</p>
|
||||
|
||||
<p id="requiredLegend" class="requiredHint">* ${i18n().required_fields}</p>
|
||||
|
||||
</form>
|
||||
|
||||
</section>
|
||||
|
||||
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/js/jquery-ui/css/smoothness/jquery-ui-1.8.9.custom.css" />')}
|
||||
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/templates/freemarker/edit/forms/css/customForm.css" />')}
|
||||
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/templates/freemarker/edit/forms/css/customFormWithAutocomplete.css" />')}
|
||||
|
||||
${scripts.add('<script type="text/javascript" src="${urls.base}/js/jquery-ui/js/jquery-ui-1.8.9.custom.min.js"></script>',
|
||||
'<script type="text/javascript" src="${urls.base}/js/extensions/String.js"></script>',
|
||||
'<script type="text/javascript" src="${urls.base}/js/browserUtils.js"></script>',
|
||||
'<script type="text/javascript" src="${urls.base}/js/jquery_plugins/jquery.bgiframe.pack.js"></script>')}
|
||||
|
||||
|
|
@ -1,147 +0,0 @@
|
|||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||
|
||||
var mailingAddressUtils = {
|
||||
|
||||
onLoad: function(mode,country) {
|
||||
this.initObjectReferences();
|
||||
this.bindEventListeners();
|
||||
this.sortCountrySelector(mode,country);
|
||||
$.extend(this, i18nStrings);
|
||||
|
||||
if ( mode == "add" && !this.errorSection.attr('id') ) {
|
||||
this.containerDiv.hide();
|
||||
this.submitButton.hide();
|
||||
}
|
||||
else {
|
||||
this.processCountryRelatedFields();
|
||||
}
|
||||
},
|
||||
|
||||
initObjectReferences: function() {
|
||||
this.form = $('#personHasMailingAddress');
|
||||
|
||||
// The external auth ID field and messages
|
||||
this.countrySelector = $('#country');
|
||||
this.countrySelectorOptions = $('#country option');
|
||||
this.address1Field = $('#addrLineOne');
|
||||
this.cityField = $('#city');
|
||||
this.stateField = $('#state');
|
||||
this.stateSelector= $('#stateSelect');
|
||||
this.stateLabel = $('#stateLabel');
|
||||
this.postalCodeField = $('#postalCode');
|
||||
this.postalCodeLabel = $('#postalCodeLabel');
|
||||
this.subjectField = $('#subjectName');
|
||||
this.rdfsLabel = $('#addrLabel');
|
||||
this.addrTypeField = $('#addressType');
|
||||
this.submitButton = $('#submit');
|
||||
this.containerDiv = $('#addressDetails');
|
||||
this.orSpan = $('span.or');
|
||||
this.errorSection = $('section#error-alert');
|
||||
},
|
||||
|
||||
bindEventListeners: function() {
|
||||
this.idCache = {};
|
||||
|
||||
this.countrySelector.change(function() {
|
||||
mailingAddressUtils.processCountryRelatedFields();
|
||||
mailingAddressUtils.showHiddenElements();
|
||||
});
|
||||
|
||||
this.form.submit(function() {
|
||||
mailingAddressUtils.buildAddressLabel();
|
||||
});
|
||||
|
||||
this.stateSelector.change(function() {
|
||||
mailingAddressUtils.setStateValue();
|
||||
});
|
||||
},
|
||||
|
||||
addressClassIsNonUS: function() {
|
||||
var country = this.countrySelector.val();
|
||||
if ( country.search( 'United States' ) == -1 ) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
buildAddressLabel: function() {
|
||||
if ( mailingAddressUtils.addressClassIsNonUS() ) {
|
||||
this.rdfsLabel.val(this.address1Field.val() + " " + this.cityField.val() + " " + this.countrySelector.val());
|
||||
}
|
||||
else {
|
||||
this.rdfsLabel.val(this.address1Field.val() + " " + this.cityField.val() + " " + this.stateField.val());
|
||||
}
|
||||
},
|
||||
|
||||
processCountryRelatedFields: function() {
|
||||
if ( mailingAddressUtils.addressClassIsNonUS() ) {
|
||||
this.stateLabel.text(mailingAddressUtils.provinceOrRegion);
|
||||
this.postalCodeField.attr('size', '40');
|
||||
this.stateSelector.hide();
|
||||
this.stateField.show();
|
||||
this.addrTypeField.val("http://vivoweb.org/ontology/core#Address");
|
||||
}
|
||||
else {
|
||||
this.stateLabel.text(mailingAddressUtils.stateString);
|
||||
this.postalCodeField.attr('size', '8');
|
||||
this.stateField.hide();
|
||||
this.stateSelector.show();
|
||||
this.addrTypeField.val("http://vivoweb.org/ontology/core#USPostalAddress");
|
||||
}
|
||||
},
|
||||
|
||||
showHiddenElements: function() {
|
||||
this.containerDiv.show();
|
||||
this.submitButton.show();
|
||||
this.orSpan.show();
|
||||
},
|
||||
|
||||
setStateValue: function() {
|
||||
this.stateField.val(this.stateSelector.val());
|
||||
},
|
||||
|
||||
// in the ftl we remove the "the" that precedes some countries, so we need to
|
||||
// re-sort them alphabetically
|
||||
sortCountrySelector: function(mode,country) {
|
||||
// Get options from select box
|
||||
var the_options = this.countrySelectorOptions;
|
||||
// sort alphabetically
|
||||
the_options.sort(function(a,b) {
|
||||
if (a.text > b.text) return 1;
|
||||
else if (a.text < b.text) return -1;
|
||||
else return 0
|
||||
})
|
||||
//replace with sorted the_options;
|
||||
this.countrySelector.append( the_options );
|
||||
|
||||
// if it's add mode, add the "select one" option have it be selected;
|
||||
// if it's edit mode, add the "Select one" option but have the correct country selected.
|
||||
// if it's repair mode, add the "Select one" option but only select it if there's no country
|
||||
|
||||
if ( this.errorSection.is(':visible') ) {
|
||||
this.countrySelector.prepend($("<option></option>")
|
||||
.attr("value","")
|
||||
.text(mailingAddressUtils.selectOne));
|
||||
this.countrySelector.val(country);
|
||||
}
|
||||
else if ( mode == "add" ) {
|
||||
this.countrySelector.prepend($("<option selected></option>")
|
||||
.attr("value","")
|
||||
.text(mailingAddressUtils.selectOne));
|
||||
}
|
||||
else if ( mode == "edit" || country.length > 1 ) {
|
||||
this.countrySelector.prepend($("<option></option>")
|
||||
.attr("value","")
|
||||
.text(mailingAddressUtils.selectOne));
|
||||
this.countrySelector.val(country);
|
||||
}
|
||||
else if ( country.length == 0 ) {
|
||||
this.countrySelector.prepend($("<option selected></option>")
|
||||
.attr("value","")
|
||||
.text(mailingAddressUtils.selectOne));
|
||||
this.countrySelector.val(country);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||
|
||||
var newIndividualFormUtils = {
|
||||
|
||||
onLoad: function(mode,country) {
|
||||
this.initObjectReferences();
|
||||
this.bindEventListeners();
|
||||
},
|
||||
|
||||
initObjectReferences: function() {
|
||||
this.form = $('#newIndividual');
|
||||
|
||||
// The external auth ID field and messages
|
||||
this.fName = $('#firstName');
|
||||
this.lName = $('#lastName');
|
||||
this.rdfsLabel = $('#label');
|
||||
},
|
||||
|
||||
bindEventListeners: function() {
|
||||
this.idCache = {};
|
||||
|
||||
this.form.submit(function() {
|
||||
newIndividualFormUtils.buildRDFSLabel();
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
buildRDFSLabel: function() {
|
||||
if ( this.fName.length > 0 ) {
|
||||
this.rdfsLabel.val(this.lName.val() + ", " + this.fName.val());
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
newIndividualFormUtils.onLoad();
|
||||
});
|
|
@ -29,8 +29,8 @@
|
|||
<ul id="webpageList" ${ulClass} role="list">
|
||||
<#list editConfiguration.pageData.webpages as webpage>
|
||||
<li class="webpage" role="listitem">
|
||||
<#if webpage.anchor??>
|
||||
<#assign anchor=webpage.anchor >
|
||||
<#if webpage.label??>
|
||||
<#assign anchor=webpage.label >
|
||||
<#else>
|
||||
<#assign anchor=webpage.url >
|
||||
</#if>
|
||||
|
@ -39,7 +39,7 @@
|
|||
<a href="${webpage.url}" title="${i18n().webpage_url}">${anchor}</a>
|
||||
</span>
|
||||
<span class="editingLinks">
|
||||
<a href="${baseEditWebpageUrl}&objectUri=${webpage.link?url}&predicateUri=${predicateUri}" class="edit" title="${i18n().edit_webpage_link}">${i18n().edit_capitalized}</a> |
|
||||
<a href="${baseEditWebpageUrl}&objectUri=${webpage.vcard}&predicateUri=${predicateUri}&linkUri=${webpage.link}" class="edit" title="${i18n().edit_webpage_link}">${i18n().edit_capitalized}</a> |
|
||||
<a href="${urls.base}${deleteWebpageUrl}" class="remove" title="${i18n().delete_webpage_link}">${i18n().delete_button}</a>
|
||||
</span>
|
||||
</li>
|
||||
|
|
|
@ -56,6 +56,8 @@
|
|||
<label for="lastName">${i18n().last_name} ${requiredHint}</label>
|
||||
<input size="30" type="text" id="lastName" name="lastName" value="${lastNameValue}" />
|
||||
</p>
|
||||
|
||||
<input type="hidden" id="label" name="label" value="${labelValue}" />
|
||||
<#else>
|
||||
<p>
|
||||
<label for="name">${i18n().name_capitalized} ${requiredHint}</label>
|
||||
|
@ -75,3 +77,4 @@
|
|||
</section>
|
||||
|
||||
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/templates/freemarker/edit/forms/css/customForm.css" />')}
|
||||
${scripts.add('<script type="text/javascript" src="${urls.base}/templates/freemarker/edit/forms/js/newIndividualFormUtils.js"></script>')}
|
|
@ -0,0 +1,86 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#-- this is in request.subject.name -->
|
||||
|
||||
<#-- leaving this edit/add mode code in for reference in case we decide we need it -->
|
||||
|
||||
<#import "lib-vivo-form.ftl" as lvf>
|
||||
|
||||
<#--Retrieve certain edit configuration information-->
|
||||
<#if editConfiguration.objectUri?has_content>
|
||||
<#assign editMode = "edit">
|
||||
<#else>
|
||||
<#assign editMode = "add">
|
||||
</#if>
|
||||
|
||||
<#assign htmlForElements = editConfiguration.pageData.htmlForElements />
|
||||
|
||||
<#--Retrieve variables needed-->
|
||||
<#assign emailAddressValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "emailAddress") />
|
||||
|
||||
<#--If edit submission exists, then retrieve validation errors if they exist-->
|
||||
<#if editSubmission?has_content && editSubmission.submissionExists = true && editSubmission.validationErrors?has_content>
|
||||
<#assign submissionErrors = editSubmission.validationErrors/>
|
||||
</#if>
|
||||
|
||||
<#if editMode == "edit">
|
||||
<#assign titleVerb="${i18n().edit_capitalized}">
|
||||
<#assign submitButtonText="${titleVerb}" + " ${i18n().email_address}">
|
||||
<#assign disabledVal="disabled">
|
||||
<#else>
|
||||
<#assign titleVerb="${i18n().create_capitalized}">
|
||||
<#assign submitButtonText="${titleVerb}" + " ${i18n().email_address}">
|
||||
<#assign disabledVal=""/>
|
||||
</#if>
|
||||
|
||||
<#assign requiredHint = "<span class='requiredHint'> *</span>" />
|
||||
|
||||
<h2>${titleVerb} ${i18n().email_address_for} ${editConfiguration.subjectName}</h2>
|
||||
|
||||
<#--Display error messages if any-->
|
||||
<#if submissionErrors?has_content>
|
||||
<section id="error-alert" role="alert">
|
||||
<img src="${urls.images}/iconAlert.png" width="24" height="24" alert="${i18n().error_alert_icon}" />
|
||||
<p>
|
||||
<#--Checking if any required fields are empty-->
|
||||
<#if lvf.submissionErrorExists(editSubmission, "emailAddress")>
|
||||
${i18n().enter_email_address}<br />
|
||||
</#if>
|
||||
</p>
|
||||
</section>
|
||||
</#if>
|
||||
|
||||
<@lvf.unsupportedBrowser urls.base />
|
||||
|
||||
<section id="personHasAdditionalEmail" role="region">
|
||||
|
||||
<form id="personHasAdditionalEmail" class="customForm noIE67" action="${submitUrl}" role="add/edit phone">
|
||||
|
||||
<p>
|
||||
<label for="additionalEmail">${i18n().email_address} ${requiredHint}</label>
|
||||
<input size="35" type="text" id="emailAddress" name="emailAddress" value="${emailAddressValue}" />
|
||||
</p>
|
||||
|
||||
<input type="hidden" id="editKey" name="editKey" value="${editKey}"/>
|
||||
|
||||
<p class="submit">
|
||||
<input type="submit" id="submit" value="${submitButtonText}"/><span class="or"> ${i18n().or} </span>
|
||||
<a class="cancel" href="${cancelUrl}" title="${i18n().cancel_title}">${i18n().cancel_link}</a>
|
||||
</p>
|
||||
|
||||
<p id="requiredLegend" class="requiredHint">* ${i18n().required_fields}</p>
|
||||
|
||||
</form>
|
||||
|
||||
</section>
|
||||
|
||||
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/js/jquery-ui/css/smoothness/jquery-ui-1.8.9.custom.css" />')}
|
||||
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/templates/freemarker/edit/forms/css/customForm.css" />')}
|
||||
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/templates/freemarker/edit/forms/css/customFormWithAutocomplete.css" />')}
|
||||
|
||||
${scripts.add('<script type="text/javascript" src="${urls.base}/js/jquery-ui/js/jquery-ui-1.8.9.custom.min.js"></script>',
|
||||
'<script type="text/javascript" src="${urls.base}/js/extensions/String.js"></script>',
|
||||
'<script type="text/javascript" src="${urls.base}/js/browserUtils.js"></script>',
|
||||
'<script type="text/javascript" src="${urls.base}/js/jquery_plugins/jquery.bgiframe.pack.js"></script>')}
|
||||
|
||||
|
|
@ -16,13 +16,9 @@
|
|||
<#assign htmlForElements = editConfiguration.pageData.htmlForElements />
|
||||
|
||||
<#--Retrieve variables needed-->
|
||||
<#assign addrLabelValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "addrLabel") />
|
||||
<#assign addressTypeValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "addressType") />
|
||||
<#assign addrLineOneValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "addrLineOne") />
|
||||
<#assign addrLineTwoValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "addrLineTwo") />
|
||||
<#assign addrLineThreeValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "addrLineThree") />
|
||||
<#assign cityValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "city") />
|
||||
<#assign stateValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "state") />
|
||||
<#assign streetAddressValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "streetAddress") />
|
||||
<#assign localityValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "locality") />
|
||||
<#assign regionValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "region") />
|
||||
<#assign postalCodeValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "postalCode") />
|
||||
<#assign countryValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "country") />
|
||||
|
||||
|
@ -52,13 +48,13 @@
|
|||
<p>
|
||||
<#--Checking if any required fields are empty-->
|
||||
<#if lvf.submissionErrorExists(editSubmission, "country")>
|
||||
${i18n().select_a_country}<br />
|
||||
${i18n().enter_a_country}<br />
|
||||
</#if>
|
||||
<#if lvf.submissionErrorExists(editSubmission, "addrLineOne")>
|
||||
${i18n().enter_address1_value}<br />
|
||||
<#if lvf.submissionErrorExists(editSubmission, "streetAddress")>
|
||||
${i18n().enter_street_address}<br />
|
||||
</#if>
|
||||
<#if lvf.submissionErrorExists(editSubmission, "city")>
|
||||
${i18n().enter_a_city}<br />
|
||||
<#if lvf.submissionErrorExists(editSubmission, "locality")>
|
||||
${i18n().enter_a_locality}<br />
|
||||
</#if>
|
||||
<#if lvf.submissionErrorExists(editSubmission, "postalCode")>
|
||||
${i18n().enter_postal_code}
|
||||
|
@ -74,138 +70,43 @@
|
|||
|
||||
<form id="personHasMailingAddress" class="customForm noIE67" action="${submitUrl}" role="add/edit educational training">
|
||||
|
||||
<p>
|
||||
<label for="streetAddress">${i18n().street_address} ${requiredHint}</label>
|
||||
<input size="50" type="text" id="streetAddress" name="streetAddress" value="${streetAddressValue}" />
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label for="country" style="margin-bottom:-4px">${i18n().country} ${requiredHint}</label>
|
||||
<#assign countryOpts = editConfiguration.pageData.country />
|
||||
<select id="country" name="country" >
|
||||
<#list countryOpts?keys as key>
|
||||
<#assign countryName = countryOpts[key]?uncap_first?replace("the ", "")?cap_first >
|
||||
<option value="${countryName}" <#if countryName == countryValue>selected</#if>>
|
||||
${countryName}
|
||||
</option>
|
||||
</#list>
|
||||
</select>
|
||||
</p>
|
||||
<p>
|
||||
<label for="locality">${i18n().city_locality} ${requiredHint}</label>
|
||||
<input size="40" type="text" id="city" name="locality" value="${localityValue}" />
|
||||
</p>
|
||||
|
||||
<input type="hidden" id="countryEditMode" name="countryEditMode" value="${countryValue}" />
|
||||
<p>
|
||||
<label for="region" id="stateLabel">${i18n().region}</label>
|
||||
<input size="40" type="text" id="state" name="region" value="${regionValue}" />
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label for="postalCode" id="postalCodeLabel">${i18n().postal_code} ${requiredHint}</label>
|
||||
<input size="20" type="text" id="postalCode" name="postalCode" value="${postalCodeValue}" />
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label for="country" style="margin-bottom:-4px">${i18n().country} ${requiredHint}</label>
|
||||
<input size="20" type="text" id="countryEditMode" name="country" value="${countryValue}" />
|
||||
</p>
|
||||
|
||||
<div id="addressDetails" >
|
||||
<p>
|
||||
<label for="addrLineOne">${i18n().street_Address1} ${requiredHint}</label>
|
||||
<input size="50" type="text" id="addrLineOne" name="addrLineOne" value="${addrLineOneValue}" />
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label for="addrLineTwo">${i18n().street_Address2}</label>
|
||||
<input size="50" type="text" id="addrLineTwo" name="addrLineTwo" value="${addrLineTwoValue}" />
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label for="addrLineThree">${i18n().street_Address3}</label>
|
||||
<input size="50" type="text" id="addrLineThree" name="addrLineThree" value="${addrLineThreeValue}" />
|
||||
</p>
|
||||
<input type="hidden" id="editKey" name="editKey" value="${editKey}"/>
|
||||
|
||||
<p>
|
||||
<label for="city">${i18n().city} ${requiredHint}</label>
|
||||
<input size="40" type="text" id="city" name="city" value="${cityValue}" />
|
||||
</p>
|
||||
<p class="submit">
|
||||
<input type="submit" id="submit" value="${submitButtonText}"/><span class="or"> ${i18n().or} </span>
|
||||
<a class="cancel" href="${cancelUrl}" title="${i18n().cancel_title}">${i18n().cancel_link}</a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label for="state" id="stateLabel">${i18n().state}</label>
|
||||
<input size="40" type="text" id="state" name="state" value="${stateValue}" />
|
||||
<select id="stateSelect" name="stateSelect">
|
||||
<option value="" <#if editMode == "add">selected</#if> >${i18n().select_one}</option>
|
||||
<option value="Alabama" <#if stateValue == "Alabama" || stateValue == "AL" >selected</#if> >Alabama</option>
|
||||
<option value="Alaska" <#if stateValue == "Alaska" || stateValue == "AK" >selected</#if> >Alaska</option>
|
||||
<option value="Arizona" <#if stateValue == "Arizona " || stateValue == "AZ" >selected</#if>>Arizona</option>
|
||||
<option value="Arkansas" <#if stateValue == "Arkansas " || stateValue == "AR" >selected</#if>>Arkansas</option>
|
||||
<option value="California" <#if stateValue == "California " || stateValue == "CA" >selected</#if>>California</option>
|
||||
<option value="Colorado" <#if stateValue == "Colorado " || stateValue == "CO" >selected</#if>>Colorado</option>
|
||||
<option value="Connecticut" <#if stateValue == "Connecticut " || stateValue == "CT" >selected</#if>>Connecticut</option>
|
||||
<option value="Delaware" <#if stateValue == "Delaware " || stateValue == "DE" >selected</#if>>Delaware</option>
|
||||
<option value="Florida" <#if stateValue == "Florida " || stateValue == "FA" >selected</#if>>Florida</option>
|
||||
<option value="Georgia" <#if stateValue == "Georgia " || stateValue == "GA" >selected</#if>>Georgia</option>
|
||||
<option value="Hawaii" <#if stateValue == "Hawaii" || stateValue == "HI" >selected</#if>>Hawaii</option>
|
||||
<option value="Idaho" <#if stateValue == "Idaho " || stateValue == "ID" >selected</#if>>Idaho</option>
|
||||
<option value="Illinois" <#if stateValue == "Illinois " || stateValue == "IL" >selected</#if>>Illinois</option>
|
||||
<option value="Indiana" <#if stateValue == "Indiana " || stateValue == "IN" >selected</#if>>Indiana</option>
|
||||
<option value="Iowa" <#if stateValue == "Iowa " || stateValue == "IA" >selected</#if>>Iowa</option>
|
||||
<option value="Kansas" <#if stateValue == "Kansas" || stateValue == "KS" >selected</#if>> Kansas</option>
|
||||
<option value="Kentucky" <#if stateValue == "Kentucky" || stateValue == "KY" >selected</#if>>Kentucky</option>
|
||||
<option value="Louisiana" <#if stateValue == "Louisiana" || stateValue == "LA" >selected</#if>>Louisiana</option>
|
||||
<option value="Maine" <#if stateValue == "Maine" || stateValue == "ME" >selected</#if>>Maine</option>
|
||||
<option value="Maryland" <#if stateValue == "Maryland" || stateValue == "MD" >selected</#if>>Maryland</option>
|
||||
<option value="Massachusetts" <#if stateValue == "Massachusetts" || stateValue == "MA" >selected</#if>>Massachusetts</option>
|
||||
<option value="Michigan" <#if stateValue == "Michigan" || stateValue == "MI" >selected</#if>>Michigan</option>
|
||||
<option value="Minnesota" <#if stateValue == "Minnesota" || stateValue == "MN" >selected</#if>>Minnesota</option>
|
||||
<option value="Mississippi" <#if stateValue == "Mississippi" || stateValue == "MS" >selected</#if>>Mississippi</option>
|
||||
<option value="Missouri" <#if stateValue == "Missouri" || stateValue == "MO" >selected</#if>>Missouri</option>
|
||||
<option value="Montana" <#if stateValue == "Montana" || stateValue == "MT" >selected</#if>>Montana</option>
|
||||
<option value="Nebraska" <#if stateValue == "Nebraska" || stateValue == "NE" >selected</#if>>Nebraska</option>
|
||||
<option value="Nevada" <#if stateValue == "Nevada" || stateValue == "NV" >selected</#if>>Nevada</option>
|
||||
<option value="New Hampshire" <#if stateValue == "New Hampshire" || stateValue == "NH" >selected</#if>>New Hampshire</option>
|
||||
<option value="New Jersey" <#if stateValue == "New Jersey" || stateValue == "NJ" >selected</#if>>New Jersey</option>
|
||||
<option value="New Mexico" <#if stateValue == "New Mexico" || stateValue == "NM" >selected</#if>>New Mexico</option>
|
||||
<option value="New York" <#if stateValue == "New York" || stateValue == "NY" >selected</#if>>New York</option>
|
||||
<option value="North Carolina<" <#if stateValue == "North Carolina" || stateValue == "NC" >selected</#if>>North Carolina</option>
|
||||
<option value="North Dakota" <#if stateValue == "North Dakota" || stateValue == "ND" >selected</#if>>North Dakota</option>
|
||||
<option value="Ohio" <#if stateValue == "Ohio" || stateValue == "OH" >selected</#if>>Ohio</option>
|
||||
<option value="Oklahoma" <#if stateValue == "Oklahoma" || stateValue == "OK" >selected</#if>>Oklahoma</option>
|
||||
<option value="Oregon" <#if stateValue == "Oregon" || stateValue == "OR" >selected</#if>>Oregon</option>
|
||||
<option value="Pennsylvania" <#if stateValue == "Pennsylvania" || stateValue == "PA" >selected</#if>>Pennsylvania</option>
|
||||
<option value="Rhode Island" <#if stateValue == "Rhode Island" || stateValue == "RI" >selected</#if>>Rhode Island</option>
|
||||
<option value="South Carolina" <#if stateValue == "South Carolina" || stateValue == "SC" >selected</#if>>South Carolina</option>
|
||||
<option value="South Dakota" <#if stateValue == "South Dakota" || stateValue == "SD" >selected</#if>>South Dakota</option>
|
||||
<option value="Tennessee" <#if stateValue == "Tennessee" || stateValue == "TN" >selected</#if>>Tennessee</option>
|
||||
<option value="Texas" <#if stateValue == "Texas" || stateValue == "TX" >selected</#if>>Texas</option>
|
||||
<option value="Utah" <#if stateValue == "Utah" || stateValue == "UT" >selected</#if>>Utah</option>
|
||||
<option value="Vermont" <#if stateValue == "Vermont" || stateValue == "VT" >selected</#if>>Vermont</option>
|
||||
<option value="Virginia" <#if stateValue == "Virginia" || stateValue == "VA" >selected</#if>>Virginia</option>
|
||||
<option value="Washington" <#if stateValue == "Washington" || stateValue == "WA" >selected</#if>>Washington</option>
|
||||
<option value="West Virginia" <#if stateValue == "West Virginia" || stateValue == "WV" >selected</#if>>West Virginia</option>
|
||||
<option value="Wisconsin" <#if stateValue == "Wisconsin" || stateValue == "WI" >selected</#if>>Wisconsin</option>
|
||||
<option value="Wyoming" <#if stateValue == "Wyoming" || stateValue == "WY" >selected</#if>>Wyoming</option>
|
||||
</select>
|
||||
</p>
|
||||
<p id="requiredLegend" class="requiredHint">* ${i18n().required_fields}</p>
|
||||
|
||||
<p>
|
||||
<label for="postalCode" id="postalCodeLabel">${i18n().postal_code} ${requiredHint}</label>
|
||||
<input size="8" type="text" id="postalCode" name="postalCode" value="${postalCodeValue}" />
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
<input type="hidden" id="addrLabel" name="addrLabel" value="${addrLabelValue}" />
|
||||
<input type="hidden" id="addressType" name="addressType" value="${addressTypeValue}" />
|
||||
<input type="hidden" id="editKey" name="editKey" value="${editKey}"/>
|
||||
|
||||
<p class="submit">
|
||||
<input type="submit" id="submit" value="${submitButtonText}"/><span class="or"> ${i18n().or} </span>
|
||||
<a class="cancel" href="${cancelUrl}" title="${i18n().cancel_title}">${i18n().cancel_link}</a>
|
||||
</p>
|
||||
|
||||
<p id="requiredLegend" class="requiredHint">* ${i18n().required_fields}</p>
|
||||
|
||||
</form>
|
||||
</form>
|
||||
|
||||
</section>
|
||||
|
||||
<script type="text/javascript">
|
||||
var i18nStrings = {
|
||||
provinceOrRegion: '${i18n().province_or_region}',
|
||||
stateString: '${i18n().state}',
|
||||
selectOne: '${i18n().select_one}'
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
mailingAddressUtils.onLoad("${editMode}","${countryValue}");
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/js/jquery-ui/css/smoothness/jquery-ui-1.8.9.custom.css" />')}
|
||||
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/templates/freemarker/edit/forms/css/customForm.css" />')}
|
||||
|
@ -214,7 +115,6 @@ ${stylesheets.add('<link rel="stylesheet" href="${urls.base}/templates/freemarke
|
|||
${scripts.add('<script type="text/javascript" src="${urls.base}/js/jquery-ui/js/jquery-ui-1.8.9.custom.min.js"></script>',
|
||||
'<script type="text/javascript" src="${urls.base}/js/extensions/String.js"></script>',
|
||||
'<script type="text/javascript" src="${urls.base}/js/browserUtils.js"></script>',
|
||||
'<script type="text/javascript" src="${urls.base}/templates/freemarker/edit/forms/js/mailingAddressUtils.js"></script>',
|
||||
'<script type="text/javascript" src="${urls.base}/js/jquery_plugins/jquery.bgiframe.pack.js"></script>')}
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,86 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#-- this is in request.subject.name -->
|
||||
|
||||
<#-- leaving this edit/add mode code in for reference in case we decide we need it -->
|
||||
|
||||
<#import "lib-vivo-form.ftl" as lvf>
|
||||
|
||||
<#--Retrieve certain edit configuration information-->
|
||||
<#if editConfiguration.objectUri?has_content>
|
||||
<#assign editMode = "edit">
|
||||
<#else>
|
||||
<#assign editMode = "add">
|
||||
</#if>
|
||||
|
||||
<#assign htmlForElements = editConfiguration.pageData.htmlForElements />
|
||||
|
||||
<#--Retrieve variables needed-->
|
||||
<#assign telephoneNumberValue = lvf.getFormFieldValue(editSubmission, editConfiguration, "telephoneNumber") />
|
||||
|
||||
<#--If edit submission exists, then retrieve validation errors if they exist-->
|
||||
<#if editSubmission?has_content && editSubmission.submissionExists = true && editSubmission.validationErrors?has_content>
|
||||
<#assign submissionErrors = editSubmission.validationErrors/>
|
||||
</#if>
|
||||
|
||||
<#if editMode == "edit">
|
||||
<#assign titleVerb="${i18n().edit_capitalized}">
|
||||
<#assign submitButtonText="${titleVerb}" + " ${i18n().telephone_number}">
|
||||
<#assign disabledVal="disabled">
|
||||
<#else>
|
||||
<#assign titleVerb="${i18n().create_capitalized}">
|
||||
<#assign submitButtonText="${titleVerb}" + " ${i18n().telephone_number}">
|
||||
<#assign disabledVal=""/>
|
||||
</#if>
|
||||
|
||||
<#assign requiredHint = "<span class='requiredHint'> *</span>" />
|
||||
|
||||
<h2>${titleVerb} ${i18n().mailing_address_for} ${editConfiguration.subjectName}</h2>
|
||||
|
||||
<#--Display error messages if any-->
|
||||
<#if submissionErrors?has_content>
|
||||
<section id="error-alert" role="alert">
|
||||
<img src="${urls.images}/iconAlert.png" width="24" height="24" alert="${i18n().error_alert_icon}" />
|
||||
<p>
|
||||
<#--Checking if any required fields are empty-->
|
||||
<#if lvf.submissionErrorExists(editSubmission, "telephoneNumber")>
|
||||
${i18n().enter_telephone_number}<br />
|
||||
</#if>
|
||||
</p>
|
||||
</section>
|
||||
</#if>
|
||||
|
||||
<@lvf.unsupportedBrowser urls.base />
|
||||
|
||||
<section id="personHasTelephoneNumber" role="region">
|
||||
|
||||
<form id="personHasTelephoneNumber" class="customForm noIE67" action="${submitUrl}" role="add/edit phone">
|
||||
|
||||
<p>
|
||||
<label for="telephoneNumber">${i18n().telephone_number} ${requiredHint}</label>
|
||||
<input size="25" type="text" id="telephoneNumber" name="telephoneNumber" value="${telephoneNumberValue}" />
|
||||
</p>
|
||||
|
||||
<input type="hidden" id="editKey" name="editKey" value="${editKey}"/>
|
||||
|
||||
<p class="submit">
|
||||
<input type="submit" id="submit" value="${submitButtonText}"/><span class="or"> ${i18n().or} </span>
|
||||
<a class="cancel" href="${cancelUrl}" title="${i18n().cancel_title}">${i18n().cancel_link}</a>
|
||||
</p>
|
||||
|
||||
<p id="requiredLegend" class="requiredHint">* ${i18n().required_fields}</p>
|
||||
|
||||
</form>
|
||||
|
||||
</section>
|
||||
|
||||
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/js/jquery-ui/css/smoothness/jquery-ui-1.8.9.custom.css" />')}
|
||||
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/templates/freemarker/edit/forms/css/customForm.css" />')}
|
||||
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/templates/freemarker/edit/forms/css/customFormWithAutocomplete.css" />')}
|
||||
|
||||
${scripts.add('<script type="text/javascript" src="${urls.base}/js/jquery-ui/js/jquery-ui-1.8.9.custom.min.js"></script>',
|
||||
'<script type="text/javascript" src="${urls.base}/js/extensions/String.js"></script>',
|
||||
'<script type="text/javascript" src="${urls.base}/js/browserUtils.js"></script>',
|
||||
'<script type="text/javascript" src="${urls.base}/js/jquery_plugins/jquery.bgiframe.pack.js"></script>')}
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue