Added code changes
This commit is contained in:
25
templates/CRM/EntityTemplates/EntityTemplate.tpl
Normal file
25
templates/CRM/EntityTemplates/EntityTemplate.tpl
Normal file
@ -0,0 +1,25 @@
|
||||
{if $form.entity_template_title}
|
||||
<table class='entity_template_title form-layout-compressed'>
|
||||
<tr>
|
||||
<td class='label'>{$form.entity_template_title.label}</td>
|
||||
<td>{$form.entity_template_title.html}</td>
|
||||
</tr>
|
||||
</table>
|
||||
{else}
|
||||
<table class='entity_template_id form-layout-compressed'>
|
||||
<tr>
|
||||
<td class='label'>{$form.entity_template_id.label}</td>
|
||||
<td>{$form.entity_template_id.html}</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/if}
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
CRM.$(function($) {
|
||||
$($('table.entity_template_title, table.entity_template_id')).insertAfter('div.crm-submit-buttons:first');
|
||||
$('#entity_template_id').change(function() {
|
||||
window.location.href = '{/literal}{$redirectUrl}{literal}&templateId=' + $(this).val();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
@ -9,14 +9,20 @@
|
||||
<th>{ts}Title{/ts}</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
{foreach from=$rows item=row}
|
||||
<tr id="EntityTemplates-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"}">
|
||||
<td class='EntityTemplates-title'>{$row.title}</td>
|
||||
<td class='EntityTemplates-links'>{$row.links}</td>
|
||||
{if $rows}
|
||||
{foreach from=$rows item=row}
|
||||
<tr id="EntityTemplates-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"}">
|
||||
<td class='EntityTemplates-title'>{$row.title}</td>
|
||||
<td class='EntityTemplates-links'>{$row.links}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{else}
|
||||
<tr>
|
||||
<td style='text-align: center;' colspan="2">{ts}None found.{/ts}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</table>
|
||||
{crmButton p=$url q="`$query`&isTemplate=1" class="cancel" icon="times"}{ts}Add Template{/ts}{/crmButton}
|
||||
{crmButton p=$url q="`$query`" class="cancel" icon="times"}{ts}Add Template{/ts}{/crmButton}
|
||||
{crmButton p="civicrm" q="reset=1" class="cancel" icon="times"}{ts}Done{/ts}{/crmButton}
|
||||
</div>
|
||||
|
||||
|
Reference in New Issue
Block a user