Change verbose property switch from a form element to an anchor element.

This commit is contained in:
rjy7 2011-03-16 18:20:25 +00:00
parent 28d9155283
commit 1bc5db2cd8
2 changed files with 23 additions and 22 deletions

View file

@ -2,19 +2,18 @@
<#-- Template for admin panel on individual profile page -->
<#import "lib-form.ftl" as form>
<#if individual.showAdminPanel>
<section id="admin">
<h3>Admin Panel</h3><a class="edit-individual" href="${individual.editUrl}">Edit this individual</a>
<#if verbosePropertyForm??>
<#assign formId = "verbosePropertyForm">
<#assign currentValue = verbosePropertyForm.currentValue?string("on", "off")>
<#assign newValue = verbosePropertyForm.currentValue?string("off", "on")>
<form id="${formId}" action="${verbosePropertyForm.action}#${formId}" method="${verbosePropertyForm.method}">
<input type="hidden" name="verbose" value="${verbosePropertyForm.newValue}" />
<span>Verbose property display is <b>${currentValue}</b> | </span>
<input type="submit" id="submit" class="small" value="Turn ${newValue}" />
</form>
<#if verbosePropertySwitch??>
<#assign anchorId = "verbosePropertySwitch">
<#assign currentValue = verbosePropertySwitch.currentValue?string("on", "off")>
<#assign newValue = verbosePropertySwitch.currentValue?string("off", "on")>
<span>Verbose property display is <b>${currentValue}</b> | </span>
<a id="${anchorId}" href="${verbosePropertySwitch.url}#${anchorId}">Turn ${newValue}</a>
</#if>
<p class="uri-link">Resource URI: <a href="${individual.uri}" target="_blank">${individual.uri}</a></p>