NIHVIVO-2288: Done css changes for data and object property forms.

This commit is contained in:
manolobevia 2011-11-02 18:44:35 +00:00
parent b2f1680402
commit 8e8ec75b57
5 changed files with 91 additions and 98 deletions

View file

@ -11,7 +11,7 @@
<form action="${editConfiguration.deleteProcessingUrl}" method="get">
<h2>Are you sure you want to delete the following entry from <em>${editConfiguration.propertyName}</em>?</h2>
<div class="toBeDeleted ${toBeDeletedClass}">
<p class="toBeDeleted ${toBeDeletedClass}">
<#if editConfiguration.objectProperty = true>
<#if statement.object?has_content>
<#include "propStatement-default.ftl" />
@ -19,23 +19,23 @@
<#else>
${statement.dataValue}
</#if>
</div>
</p>
<input type="hidden" name="subjectUri" value="${editConfiguration.subjectUri}" role="input"/>
<input type="hidden" name="predicateUri" value="${editConfiguration.predicateUri}" role="input"/>
<input type="hidden" name="subjectUri" value="${editConfiguration.subjectUri}" role="input" />
<input type="hidden" name="predicateUri" value="${editConfiguration.predicateUri}" role="input" />
<#if editConfiguration.dataProperty = true>
<input type="hidden" name="datapropKey" value="${editConfiguration.datapropKey}" role="input"/>
<input type="hidden" name="vitroNsProp" value="${editConfiguration.vitroNsProperty}" role="input"/>
<input type="hidden" name="datapropKey" value="${editConfiguration.datapropKey}" role="input" />
<input type="hidden" name="vitroNsProp" value="${editConfiguration.vitroNsProperty}" role="input" />
<#else>
<input type="hidden" name="objectUri" value="${editConfiguration.objectUri}" role="input"/>
<input type="hidden" name="objectUri" value="${editConfiguration.objectUri}" role="input" />
</#if>
<#if editConfiguration.objectProperty = true>
<p class="submit">
</#if>
<input type="submit" id="delete" value="Delete" role="button"/>
<input type="submit" id="submit" value="Delete" role="button"/>
or
<a class="cancel" title="Cancel" href="${editConfiguration.cancelUrl}">Cancel</a>
<#if editConfiguration.objectProperty = true>

View file

@ -5,32 +5,27 @@
<#assign literalValues = "${editConfiguration.dataLiteralValuesAsString}" />
<form class="editForm" action = "${submitUrl}" method="post">
<input type="hidden" name="editKey" id="editKey" value="${editKey}" />
<#if editConfiguration.dataPredicatePublicDescription?has_content>
<label for="${editConfiguration.dataLiteral}"><p class="propEntryHelpText">${editConfiguration.dataPredicatePublicDescription}</p></label>
</#if>
<input type="hidden" name="editKey" id="editKey" value="${editKey}" role="input" />
<#if editConfiguration.dataPredicatePublicDescription?has_content>
<label for="${editConfiguration.dataLiteral}"><p class="propEntryHelpText">${editConfiguration.dataPredicatePublicDescription}</p></label>
</#if>
<textarea rows="2"
id="${editConfiguration.dataLiteral}" name="${editConfiguration.dataLiteral}"
value="${literalValues}" class="useTinyMce">${literalValues}</textarea>
<textarea rows="2" id="${editConfiguration.dataLiteral}" name="${editConfiguration.dataLiteral}" value="${literalValues}" class="useTinyMce" role="textarea">${literalValues}</textarea>
<br />
<#--The submit label should be set within the template itself, right now
the default label for default data/object property editing is returned from Edit Configuration Template Model,
but that method may not return the correct result for other custom forms-->
<input type="submit" id="submit" value="${editConfiguration.submitLabel}" role="button"/>
<span class="or"> or </span>
<a title="Cancel" href="${cancelUrl}">Cancel</a>
<div style="margin-top: 0.2em">
<#--The submit label should be set within the template itself, right now
the default label for default data/object property editing is returned from Edit Configuration Template Model,
but that method may not return the correct result for other custom forms-->
<input type="submit" id="submit" value="${editConfiguration.submitLabel}"/>
<span class="or"> or </span>
<a title="Cancel" href="${cancelUrl}">Cancel</a>
</div>
</form>
<#if editConfiguration.includeDeletionForm = true>
<#include "defaultDeletePropertyForm.ftl">
</#if>
<#include "defaultFormScripts.ftl">
<#include "defaultFormScripts.ftl">

View file

@ -1,38 +1,36 @@
<form class="deleteForm" action="${editConfiguration.mainEditUrl}" method="get">
<label for="delete"><h3 class="delete-entry">Delete this entry?</h3></label>
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<form class="deleteForm" action="${editConfiguration.mainEditUrl}" method="get">
<h3 class="delete-entry">Delete this entry?</h3>
<label for="delete"></label>
<input type="hidden" name="subjectUri" value="${editConfiguration.subjectUri}"/>
<input type="hidden" name="predicateUri" value="${editConfiguration.predicateUri}"/>
<input type="hidden" name="cmd" value="delete"/>
<input type="hidden" name="editKey" value="${editConfiguration.editKey}"/>
<#if editConfiguration.dataProperty = true>
<input type="hidden" name="datapropKey" value="${editConfiguration.datapropKey}" />
<div style="margin-top: 0.2em">
<input type="submit" id="delete" value="Delete">
</div>
<#if editConfiguration.dataProperty = true>
<input type="hidden" name="datapropKey" value="${editConfiguration.datapropKey}" />
<input type="submit" id="delete" value="Delete" role="button "/>
</#if>
<#--The original jsp included vinput tag with cancel=empty string for case where both select from existing
and offer create new option are true below
so leaving as Cancel for first option but not second below-->
and offer create new option are true below so leaving as Cancel for first option but not second below-->
<#if editConfiguration.objectProperty = true>
<input type="hidden" name="objectUri" value="${editConfiguration.objectUri}"/>
<#if editConfiguration.propertySelectFromExisting = false
&& editConfiguration.propertyOfferCreateNewOption = false>
<div style="margin-top: 0.2em">
<input type="submit" id="delete" value="Delete">
<span class="or"> or </span>
<a title="Cancel" href="${editConfiguration.cancelUrl}">Cancel</a>
</div>
</#if>
<#if editConfiguration.propertySelectFromExisting = true
&& editConfiguration.propertyOfferCreateNewOption = true>
<div style="margin-top: 0.2em">
<input type="submit" id="delete" value="Delete">
</div>
</#if>
<input type="hidden" name="objectUri" value="${editConfiguration.objectUri}"/>
<#if editConfiguration.propertySelectFromExisting = false && editConfiguration.propertyOfferCreateNewOption = false>
<p>
<input type="submit" id="delete" value="Delete" role="button "/>
<span class="or"> or </span>
<a title="Cancel" href="${editConfiguration.cancelUrl}">Cancel</a>
</p>
</#if>
<#if editConfiguration.propertySelectFromExisting = true && editConfiguration.propertyOfferCreateNewOption = true>
<p>
<input type="submit" id="delete" value="Delete" role="button "/>
</p>
</#if>
</#if>
</form>

View file

@ -1,27 +1,30 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#if editConfiguration.rangeOptionsExist = true >
<p style="margin-top: 2.2em">If you don't find the appropriate entry on the selection list above:</p>
<p>If you don't find the appropriate entry on the selection list above:</p>
<#else>
<p style="margin-top: 5em">Please create a new entry.</p>
<p>Please create a new entry.</p>
</#if>
<#if editConfiguration.objectUri?has_content>
<#assign objectUri = editConfiguration.objectUri>
<#assign objectUri = editConfiguration.objectUri>
<#else>
<#assign objectUri = ""/>
<#assign objectUri = ""/>
</#if>
<#assign typesList = editConfiguration.offerTypesCreateNew />
<form class="editForm" action="${editConfiguration.mainEditUrl}">
<input type="hidden" value="${editConfiguration.subjectUri}" name="subjectUri"/>
<input type="hidden" value="${editConfiguration.predicateUri}" name="predicateUri"/>
<input type="hidden" value="${objectUri}" name="objectUri"/>
<input type="hidden" value="create" name="cmd"/>
<select id="typeOfNew" name="typeOfNew">
<#assign typeKeys = typesList?keys />
<#list typeKeys as typeKey>
<option value="${typeKey}"> ${typesList[typeKey]} </option>
</#list>
</select>
<input type="submit" id="submit" value="Add a new item of this type"/>
</form>
<form class="editForm" action="${editConfiguration.mainEditUrl}" role="input" />
<input type="hidden" value="${editConfiguration.subjectUri}" name="subjectUri" role="input" />
<input type="hidden" value="${editConfiguration.predicateUri}" name="predicateUri" role="input" />
<input type="hidden" value="${objectUri}" name="objectUri" role="input" />
<input type="hidden" value="create" name="cmd" role="input" />
<select id="typeOfNew" name="typeOfNew" role="selection">
<#assign typeKeys = typesList?keys />
<#list typeKeys as typeKey>
<option value="${typeKey}" role="option"> ${typesList[typeKey]} </option>
</#list>
</select>
<input type="submit" id="submit" value="Add a new item of this type" role="button" />
</form>

View file

@ -3,32 +3,29 @@
<h2>${editConfiguration.formTitle}</h2>
<#if editConfiguration.propertySelectFromExisting = true>
<#if editConfiguration.rangeOptionsExist = true >
<#assign rangeOptionKeys = editConfiguration.rangeOptions?keys />
<form class="editForm" action = "${submitUrl}">
<input type="hidden" name="editKey" id="editKey" value="${editKey}" />
<#if editConfiguration.propertyPublicDescription?has_content>
<p>${editConfiguration.propertyPublicDescription}</p>
<select type="text" id="objectVar" name="objectVar">
<#list rangeOptionKeys as key>
<option value="${key}"
<#if editConfiguration.objectUri?has_content && editConfiguration.objectUri = key>
selected
</#if>
>${editConfiguration.rangeOptions[key]}</option>
</#list>
</select>
<div style="margin-top: 0.2em">
<input type="submit" id="submit" value="${editConfiguration.submitLabel}"/>
<span class="or"> or </span>
<a title="Cancel" href="${editConfiguration.cancelUrl}">Cancel</a>
</div>
</#if>
</form>
<#else>
<p> There are no entries in the system from which to select. </p>
</#if>
<#if editConfiguration.rangeOptionsExist = true >
<#assign rangeOptionKeys = editConfiguration.rangeOptions?keys />
<form class="editForm" action = "${submitUrl}">
<input type="hidden" name="editKey" id="editKey" value="${editKey}" role="input" />
<#if editConfiguration.propertyPublicDescription?has_content>
<p>${editConfiguration.propertyPublicDescription}</p>
<select id="objectVar" name="objectVar" role="select">
<#list rangeOptionKeys as key>
<option value="${key}" <#if editConfiguration.objectUri?has_content && editConfiguration.objectUri = key>selected</#if> role="option">${editConfiguration.rangeOptions[key]}</option>
</#list>
</select>
<p>
<input type="submit" id="submit" value="${editConfiguration.submitLabel}" role="button "/>
<span class="or"> or </span>
<a title="Cancel" href="${editConfiguration.cancelUrl}">Cancel</a>
</p>
</#if>
</form>
<#else>
<p> There are no entries in the system from which to select. </p>
</#if>
</#if>
<#if editConfiguration.propertyOfferCreateNewOption = true>