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

View file

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

View file

@ -1,38 +1,36 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<form class="deleteForm" action="${editConfiguration.mainEditUrl}" method="get"> <form class="deleteForm" action="${editConfiguration.mainEditUrl}" method="get">
<label for="delete"><h3 class="delete-entry">Delete this entry?</h3></label> <h3 class="delete-entry">Delete this entry?</h3>
<label for="delete"></label>
<input type="hidden" name="subjectUri" value="${editConfiguration.subjectUri}"/> <input type="hidden" name="subjectUri" value="${editConfiguration.subjectUri}"/>
<input type="hidden" name="predicateUri" value="${editConfiguration.predicateUri}"/> <input type="hidden" name="predicateUri" value="${editConfiguration.predicateUri}"/>
<input type="hidden" name="cmd" value="delete"/> <input type="hidden" name="cmd" value="delete"/>
<input type="hidden" name="editKey" value="${editConfiguration.editKey}"/> <input type="hidden" name="editKey" value="${editConfiguration.editKey}"/>
<#if editConfiguration.dataProperty = true> <#if editConfiguration.dataProperty = true>
<input type="hidden" name="datapropKey" value="${editConfiguration.datapropKey}" /> <input type="hidden" name="datapropKey" value="${editConfiguration.datapropKey}" />
<div style="margin-top: 0.2em"> <input type="submit" id="delete" value="Delete" role="button "/>
<input type="submit" id="delete" value="Delete">
</div>
</#if> </#if>
<#--The original jsp included vinput tag with cancel=empty string for case where both select from existing <#--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 and offer create new option are true below so leaving as Cancel for first option but not second below-->
so leaving as Cancel for first option but not second below-->
<#if editConfiguration.objectProperty = true> <#if editConfiguration.objectProperty = true>
<input type="hidden" name="objectUri" value="${editConfiguration.objectUri}"/> <input type="hidden" name="objectUri" value="${editConfiguration.objectUri}"/>
<#if editConfiguration.propertySelectFromExisting = false <#if editConfiguration.propertySelectFromExisting = false && editConfiguration.propertyOfferCreateNewOption = false>
&& editConfiguration.propertyOfferCreateNewOption = false> <p>
<div style="margin-top: 0.2em"> <input type="submit" id="delete" value="Delete" role="button "/>
<input type="submit" id="delete" value="Delete"> <span class="or"> or </span>
<span class="or"> or </span> <a title="Cancel" href="${editConfiguration.cancelUrl}">Cancel</a>
<a title="Cancel" href="${editConfiguration.cancelUrl}">Cancel</a> </p>
</div> </#if>
</#if>
<#if editConfiguration.propertySelectFromExisting = true
&& editConfiguration.propertyOfferCreateNewOption = true>
<div style="margin-top: 0.2em">
<input type="submit" id="delete" value="Delete">
</div>
</#if>
<#if editConfiguration.propertySelectFromExisting = true && editConfiguration.propertyOfferCreateNewOption = true>
<p>
<input type="submit" id="delete" value="Delete" role="button "/>
</p>
</#if>
</#if> </#if>
</form> </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 > <#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> <#else>
<p style="margin-top: 5em">Please create a new entry.</p> <p>Please create a new entry.</p>
</#if> </#if>
<#if editConfiguration.objectUri?has_content> <#if editConfiguration.objectUri?has_content>
<#assign objectUri = editConfiguration.objectUri> <#assign objectUri = editConfiguration.objectUri>
<#else> <#else>
<#assign objectUri = ""/> <#assign objectUri = ""/>
</#if> </#if>
<#assign typesList = editConfiguration.offerTypesCreateNew /> <#assign typesList = editConfiguration.offerTypesCreateNew />
<form class="editForm" action="${editConfiguration.mainEditUrl}"> <form class="editForm" action="${editConfiguration.mainEditUrl}" role="input" />
<input type="hidden" value="${editConfiguration.subjectUri}" name="subjectUri"/> <input type="hidden" value="${editConfiguration.subjectUri}" name="subjectUri" role="input" />
<input type="hidden" value="${editConfiguration.predicateUri}" name="predicateUri"/> <input type="hidden" value="${editConfiguration.predicateUri}" name="predicateUri" role="input" />
<input type="hidden" value="${objectUri}" name="objectUri"/> <input type="hidden" value="${objectUri}" name="objectUri" role="input" />
<input type="hidden" value="create" name="cmd"/> <input type="hidden" value="create" name="cmd" role="input" />
<select id="typeOfNew" name="typeOfNew">
<#assign typeKeys = typesList?keys /> <select id="typeOfNew" name="typeOfNew" role="selection">
<#list typeKeys as typeKey> <#assign typeKeys = typesList?keys />
<option value="${typeKey}"> ${typesList[typeKey]} </option> <#list typeKeys as typeKey>
</#list> <option value="${typeKey}" role="option"> ${typesList[typeKey]} </option>
</select> </#list>
<input type="submit" id="submit" value="Add a new item of this type"/> </select>
</form>
<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> <h2>${editConfiguration.formTitle}</h2>
<#if editConfiguration.propertySelectFromExisting = true> <#if editConfiguration.propertySelectFromExisting = true>
<#if editConfiguration.rangeOptionsExist = true > <#if editConfiguration.rangeOptionsExist = true >
<#assign rangeOptionKeys = editConfiguration.rangeOptions?keys /> <#assign rangeOptionKeys = editConfiguration.rangeOptions?keys />
<form class="editForm" action = "${submitUrl}"> <form class="editForm" action = "${submitUrl}">
<input type="hidden" name="editKey" id="editKey" value="${editKey}" /> <input type="hidden" name="editKey" id="editKey" value="${editKey}" role="input" />
<#if editConfiguration.propertyPublicDescription?has_content> <#if editConfiguration.propertyPublicDescription?has_content>
<p>${editConfiguration.propertyPublicDescription}</p> <p>${editConfiguration.propertyPublicDescription}</p>
<select type="text" id="objectVar" name="objectVar"> <select id="objectVar" name="objectVar" role="select">
<#list rangeOptionKeys as key> <#list rangeOptionKeys as key>
<option value="${key}" <option value="${key}" <#if editConfiguration.objectUri?has_content && editConfiguration.objectUri = key>selected</#if> role="option">${editConfiguration.rangeOptions[key]}</option>
<#if editConfiguration.objectUri?has_content && editConfiguration.objectUri = key> </#list>
selected </select>
</#if>
>${editConfiguration.rangeOptions[key]}</option> <p>
</#list> <input type="submit" id="submit" value="${editConfiguration.submitLabel}" role="button "/>
</select> <span class="or"> or </span>
<div style="margin-top: 0.2em"> <a title="Cancel" href="${editConfiguration.cancelUrl}">Cancel</a>
<input type="submit" id="submit" value="${editConfiguration.submitLabel}"/> </p>
<span class="or"> or </span> </#if>
<a title="Cancel" href="${editConfiguration.cancelUrl}">Cancel</a> </form>
</div> <#else>
</#if> <p> There are no entries in the system from which to select. </p>
</form> </#if>
<#else>
<p> There are no entries in the system from which to select. </p>
</#if>
</#if> </#if>
<#if editConfiguration.propertyOfferCreateNewOption = true> <#if editConfiguration.propertyOfferCreateNewOption = true>