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
79 lines
No EOL
1.9 KiB
Cheetah
79 lines
No EOL
1.9 KiB
Cheetah
#PBtmpl0000000000000021
|
|
<a href="<tmpl_var back.url>"><tmpl_var back.label></a>
|
|
<tmpl_if session.var.adminOn>
|
|
<p><tmpl_var controls></p>
|
|
</tmpl_if><p />
|
|
|
|
<tmpl_if canEdit>
|
|
<div class="dataControls">
|
|
• <a href="<tmpl_var export.tab.url>"><tmpl_var export.tab.label></a>
|
|
<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>
|
|
|
|
<table width="100%">
|
|
<tr>
|
|
<td class="tableHeader">Entry ID</td>
|
|
<tmpl_loop field_loop>
|
|
<tmpl_unless field.isMailField>
|
|
<td class="tableHeader"><tmpl_var field.label></td>
|
|
</tmpl_unless field.isMailField>
|
|
</tmpl_loop field_loop>
|
|
<td class="tableHeader">Submission Date</td>
|
|
</tr>
|
|
<tmpl_loop record_loop>
|
|
<tr>
|
|
<td class="tableData"><a href="<tmpl_var record.edit.url>"><tmpl_var record.entryId></a></td>
|
|
<tmpl_loop record.data_loop>
|
|
<tmpl_unless record.data.isMailField>
|
|
<td class="tableData"><tmpl_var record.data.value></td>
|
|
</tmpl_unless record.data.isMailField>
|
|
</tmpl_loop record.data_loop>
|
|
<td class="tableData"><tmpl_var record.submissionDate.human></td>
|
|
</tr>
|
|
</tmpl_loop record_loop>
|
|
</table>
|
|
|
|
~~~
|
|
<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> |