Added Delete confirmation prompts for deleting data form entries and deleting all entries Fixed deleteEntry method to return the view instead of a blank page. Removed deleteAllEntries method because nothing was using it Fixed deleteAllEntriesConfirm method Added hasEntries method Adjusted Dataform view templates to use new vars
110 lines
3.1 KiB
Cheetah
110 lines
3.1 KiB
Cheetah
#PBtmpl0000000000000141
|
|
<a name="id<tmpl_var assetId>" id="id<tmpl_var assetId>"></a>
|
|
|
|
<tmpl_if session.var.adminOn>
|
|
<p><tmpl_var controls></p>
|
|
</tmpl_if>
|
|
|
|
<tmpl_if displayTitle>
|
|
<h2><tmpl_var title></h2>
|
|
</tmpl_if>
|
|
|
|
<tmpl_if error_loop>
|
|
<ul class="errors">
|
|
<tmpl_loop error_loop>
|
|
<li><b><tmpl_var error.message></b></li>
|
|
</tmpl_loop>
|
|
</ul>
|
|
</tmpl_if>
|
|
|
|
<tmpl_if description>
|
|
<tmpl_var description>
|
|
<p />
|
|
</tmpl_if>
|
|
|
|
<tmpl_if canEdit>
|
|
<div class="dataControls">
|
|
<a href="<tmpl_var entryList.url>"><tmpl_var entryList.label></a>
|
|
• <a href="<tmpl_var export.tab.url>"><tmpl_var export.tab.label></a>
|
|
<tmpl_if entryId>
|
|
• <a href="<tmpl_var delete.url>" onclick="<tmpl_var javascript.confirmation.deleteOne>"><tmpl_var delete.label></a>
|
|
</tmpl_if>
|
|
<tmpl_if hasEntries>
|
|
• <a href="<tmpl_var deleteAllEntries.url>" onclick="<tmpl_var javascript.confirmation.deleteAll>"><tmpl_var deleteAllEntries.label></a>
|
|
</tmpl_if>
|
|
<tmpl_if session.var.adminOn>
|
|
• <a href="<tmpl_var addField.url>"><tmpl_var addField.label></a>
|
|
• <a href="<tmpl_var addTab.url>"><tmpl_var addTab.label></a>
|
|
</tmpl_if>
|
|
</div>
|
|
</tmpl_if>
|
|
<tmpl_var form.start>
|
|
<table class="defaultData">
|
|
<tmpl_loop field_loop>
|
|
<tmpl_unless field.isHidden>
|
|
<tr>
|
|
<td class="formDescription" valign="top">
|
|
<tmpl_if session.var.adminOn>
|
|
<tmpl_if canEdit>
|
|
<tmpl_var field.controls>
|
|
</tmpl_if>
|
|
</tmpl_if>
|
|
<tmpl_var field.label>
|
|
</td>
|
|
<td class="tableData" valign="top">
|
|
<tmpl_if field.isDisplayed>
|
|
<tmpl_var field.value>
|
|
<tmpl_else>
|
|
<tmpl_var field.form>
|
|
</tmpl_if>
|
|
<tmpl_if field.isRequired>*</tmpl_if>
|
|
<span class="formSubtext">
|
|
<br />
|
|
<tmpl_var field.subtext>
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
</tmpl_unless>
|
|
</tmpl_loop>
|
|
</table>
|
|
<br />
|
|
<tmpl_var form.save>
|
|
<tmpl_var form.end>
|
|
|
|
~~~
|
|
<style type="text/css">
|
|
h2{
|
|
font-family:arial;
|
|
margin-top:3px;
|
|
margin-bottom:3px;
|
|
}
|
|
.errors{
|
|
font-family:arial;
|
|
font-size:9pt;
|
|
}
|
|
.defaultData td{
|
|
font-family:arial;
|
|
font-size:9pt;
|
|
}
|
|
.dataControls
|
|
{
|
|
-moz-box-sizing:border-box;
|
|
background:#676767;
|
|
color:#C0C0C0;
|
|
width:100%;
|
|
text-align:right;
|
|
padding:3px;
|
|
font-size:9pt;
|
|
font-family:arial;
|
|
margin-bottom:5px;
|
|
}
|
|
.dataControls a
|
|
{
|
|
color:white;
|
|
font-size:8pt;
|
|
text-decoration:underline;
|
|
}
|
|
.dataControls a:hover {
|
|
text-decoration:none;
|
|
}
|
|
</style>
|