2 +--------------------------------------------------------------------+
3 | Copyright CiviCRM LLC. All rights reserved. |
5 | This work is published under the GNU AGPLv3 license with some |
6 | permitted exceptions and without any warranty. For full license |
7 | and copyright information, see https://civicrm.org/licensing |
8 +--------------------------------------------------------------------+
10 {capture assign=crmURL}{crmURL p='civicrm/admin/messageTemplates/add' q="action=add&reset=1"}{/capture}
11 {if $action eq 1 or $action eq 2 or $action eq 8}
12 {include file="CRM/Admin/Form/MessageTemplates.tpl"}
15 {* View a system default workflow template *}
18 {ts}You are viewing the default message template for this system workflow.{/ts} {help id="id-view_system_default"}
22 <div class="crm-section msg_title-section">
23 <div class="bold">{$form.msg_title.value}</div>
25 <div class="crm-section msg_subject-section">
26 <h3 class="header-dark">{$form.msg_subject.label}</h3>
28 <textarea name="msg-subject" id="msg_subject" style="height: 6em; width: 45em;">{$form.msg_subject.value}</textarea>
29 <div class='spacer'></div>
31 <a href='#' onclick='MessageTemplates.msg_subject.select(); return false;' class='button'><span>Select Subject</span></a>
32 <div class='spacer'></div>
37 <div class="crm-section msg_txt-section">
38 <h3 class="header-dark">{$form.msg_text.label}</h3>
40 <textarea class="huge" name='msg_text' id='msg_text'>{$form.msg_text.value|htmlentities}</textarea>
41 <div class='spacer'></div>
43 <a href='#' onclick='MessageTemplates.msg_text.select(); return false;' class='button'><span>Select Text Message</span></a>
44 <div class='spacer'></div>
49 <div class="crm-section msg_html-section">
50 <h3 class="header-dark">{$form.msg_html.label}</h3>
52 <textarea class="huge" name='msg_html' id='msg_html'>{$form.msg_html.value|htmlentities}</textarea>
53 <div class='spacer'></div>
55 <a href='#' onclick='MessageTemplates.msg_html.select(); return false;' class='button'><span>Select HTML Message</span></a>
56 <div class='spacer'></div>
61 <div class="crm-section msg_html-section">
62 <h3 class="header-dark">{$form.pdf_format_id.label}</h3>
64 {$form.pdf_format_id.html}
68 <div id="crm-submit-buttons" class="crm-submit-buttons">{$form.buttons.html}</div>
72 {if $rows and $action ne 2 and $action ne 4}
73 <div class="crm-content-block crm-block">
74 <div id='mainTabContainer'>
76 {if $canEditUserDrivenMessageTemplates or $canEditMessageTemplates}
77 <li id='tab_user'><a href='#user' title='{ts}User-driven Messages{/ts}'>{ts}User-driven Messages{/ts}</a></li>
79 {if $canEditSystemTemplates or $canEditMessageTemplates}
80 <li id='tab_workflow'><a href='#workflow' title='{ts}System Workflow Messages{/ts}'>{ts}System Workflow Messages{/ts}</a></li>
84 {* create two selector tabs, first being the ‘user’ one, the second being the ‘workflow’ one *}
85 {include file="CRM/common/enableDisableApi.tpl"}
86 {include file="CRM/common/jsortable.tpl"}
87 {foreach from=$rows item=template_row key=type}
89 $type ne 'userTemplates' and ($canEditSystemTemplates or $canEditMessageTemplates)
91 $type eq 'userTemplates'and ($canEditUserDrivenMessageTemplates or $canEditMessageTemplates)
93 <div id="{if $type eq 'userTemplates'}user{else}workflow{/if}" class='ui-tabs-panel ui-widget-content ui-corner-bottom'>
95 {if $type eq 'userTemplates'}
96 {capture assign=schedRemURL}{crmURL p='civicrm/admin/scheduleReminders' q="reset=1"}{/capture}
97 {ts 1=$schedRemURL}Message templates allow you to easily create similar emails or letters on a recurring basis. Messages used for membership renewal reminders, as well as event and activity related reminders should be created via <a href="%1">Schedule Reminders</a>.{/ts}
98 {if array_search('CiviMail', $config->enableComponents)}
99 {capture assign=automatedMsgURL}{crmURL p='civicrm/admin/component' q="reset=1"}{/capture}
100 {ts 1=$automatedMsgURL}You can also use message templates for CiviMail (bulk email) content. However, subscribe, unsubscribe and opt-out messages are configured at <a href="%1">Administer > CiviMail > Headers, Footers and Automated Messages</a>.{/ts}
104 {ts}System workflow message templates are used to generate the emails sent to constituents and administrators for contribution receipts, event confirmations and many other workflows. You can customize the style and wording of these messages here.{/ts} {help id="id-system-workflow"}
108 {if $action ne 1 and $action ne 2 and $type eq 'userTemplates'}
109 <div class="action-link">
110 {crmButton p='civicrm/admin/messageTemplates/add' q="action=add&reset=1" id="newMessageTemplates" icon="plus-circle"}{ts}Add Message Template{/ts}{/crmButton}
112 <div class="spacer"></div>
114 {if !empty( $template_row) }
115 <table class="display">
118 <th class="sortable">{if $type eq 'userTemplates'}{ts}Message Title{/ts}{else}{ts}Workflow{/ts}{/if}</th>
119 {if $type eq 'userTemplates'}
120 <th>{ts}Message Subject{/ts}</th>
121 <th>{ts}Enabled?{/ts}</th>
127 {foreach from=$template_row item=row}
128 <tr id="message_template-{$row.id}" class="crm-entity {$row.class}{if NOT $row.is_active} disabled{/if}">
129 <td>{$row.msg_title}</td>
130 {if $type eq 'userTemplates'}
131 <td>{$row.msg_subject}</td>
132 <td id="row_{$row.id}_status">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
134 <td>{$row.action|replace:'xx':$row.id}</td>
141 {if $action ne 1 and $action ne 2 and $type eq 'userTemplates'}
142 <div class="action-link">
143 {crmButton p='civicrm/admin/messageTemplates/add' q="action=add&reset=1" id="newMessageTemplates" icon="plus-circle"}{ts}Add Message Template{/ts}{/crmButton}
145 <div class="spacer"></div>
148 {if empty( $template_row) }
149 <div class="messages status no-popup">
150 <div class="icon inform-icon"></div>
151 {ts 1=$crmURL}There are no User-driven Message Templates entered. You can <a href='%1'>add one</a>.{/ts}
160 {include file="CRM/common/TabSelected.tpl" defaultTab="user"}
162 {elseif $action ne 1 and $action ne 2 and $action ne 4 and $action ne 8}
163 <div class="messages status no-popup">
164 <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>
165 {ts 1=$crmURL}There are no Message Templates entered. You can <a href='%1'>add one</a>.{/ts}