Merge remote-tracking branch 'upstream/4.3' into 4.3-master-2013-04-16-10-35-08
[civicrm-core.git] / templates / CRM / Admin / Form / MessageTemplates.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.3 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2013 |
6 +--------------------------------------------------------------------+
7 | This file is a part of CiviCRM. |
8 | |
9 | CiviCRM is free software; you can copy, modify, and distribute it |
10 | under the terms of the GNU Affero General Public License |
11 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
12 | |
13 | CiviCRM is distributed in the hope that it will be useful, but |
14 | WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
16 | See the GNU Affero General Public License for more details. |
17 | |
18 | You should have received a copy of the GNU Affero General Public |
19 | License and the CiviCRM Licensing Exception along |
20 | with this program; if not, contact CiviCRM LLC |
21 | at info[AT]civicrm[DOT]org. If you have questions about the |
22 | GNU Affero General Public License or the licensing of CiviCRM, |
23 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
24 +--------------------------------------------------------------------+
25 *}
26 {* this template is used for adding/editing/deleting Message Templates *}
27 {capture assign=tokenDocsRepeated}{docURL page="user/common-workflows/tokens-and-mail-merge" text="token documentation"}{/capture}
28
29 <h3>{if $action eq 1}{ts}New Message Template{/ts}{elseif $action eq 2}{ts}Edit Message Template{/ts}{else}{ts}Delete Message Template{/ts}{/if}</h3>
30 {if $action neq 8}
31 <div id="help">
32 {ts}Use this form to add or edit re-usable message templates.{/ts} {help id="id-intro" file="CRM/Admin/Page/MessageTemplates.hlp"}
33 </div>
34 {/if}
35
36 <div class="crm-block crm-form-block">
37 <div class="form-item" id="message_templates">
38 {if $action eq 8}
39 <div class="messages status no-popup">
40 <div class="icon inform-icon"></div>
41 {ts}Do you want to delete this message template?{/ts}
42 </div>
43 {else}
44 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
45 <table class="form-layout-compressed">
46 <tr>
47 <td class="label-left">{$form.msg_title.label}</td>
48 <td>{$form.msg_title.html}
49 <br /><span class="description html-adjust">{ts}Descriptive title of message - used for template selection.{/ts}</span>
50 </td>
51 </tr>
52 <tr>
53 <td class="label-left">{$form.msg_subject.label}</td>
54 <td>
55 {$form.msg_subject.html|crmAddClass:huge}
56 <a href="#" onClick="return showToken('Subject', 3);">{$form.token3.label}</a>
57 {help id="id-token-text" file="CRM/Contact/Form/Task/Email.hlp"}
58 <div id='tokenSubject' style="display:none">
59 <input style="border:1px solid #999999;" type="text" id="filter3" size="20" name="filter3" onkeyup="filter(this, 3)"/><br />
60 <span class="description">{ts}Begin typing to filter list of tokens{/ts}</span><br/>
61 {$form.token3.html}
62 </div>
63 <br /><span class="description">{ts}Subject for email message.{/ts} {ts 1=$tokenDocsRepeated}Tokens may be included (%1).{/ts}</span>
64 </td>
65 </tr>
66 <tr>
67 </table>
68
69 <div class="crm-accordion-wrapper crm-plaint_text_email-accordion ">
70 <div class="crm-accordion-header">
71 {ts}Plain-Text Format{/ts}
72 </div><!-- /.crm-accordion-header -->
73 <div class="crm-accordion-body">
74 <span class="helpIcon" id="helptext">
75 <a href="#" onClick="return showToken('Text', 1);">{$form.token1.label}</a>
76 {help id="id-token-text" file="CRM/Contact/Form/Task/Email.hlp"}
77 <div id='tokenText' style="display:none">
78 <input style="border:1px solid #999999;" type="text" id="filter1" size="20" name="filter1" onkeyup="filter(this, 1)"/><br />
79 <span class="description">{ts}Begin typing to filter list of tokens{/ts}</span><br/>
80 {$form.token1.html}
81 </div>
82 </span>
83 <div class="clear"></div>
84 <div class='text'>
85 {$form.msg_text.html|crmAddClass:huge}
86 <div class="description">{ts}Text formatted message.{/ts} {ts 1=$tokenDocsRepeated}Tokens may be included (%1).{/ts}</div>
87 </div>
88 </div><!-- /.crm-accordion-body -->
89 </div><!-- /.crm-accordion-wrapper -->
90
91 <div class="crm-accordion-wrapper crm-html_email-accordion ">
92 <div class="crm-accordion-header">
93 {ts}HTML Format{/ts}
94 {help id="id-message-text" file="CRM/Contact/Form/Task/Email.hlp"}
95 </div><!-- /.crm-accordion-header -->
96 <div class="crm-accordion-body">
97 <span class="helpIcon" id="helphtml">
98 <a href="#" onClick="return showToken('Html', 2);">{$form.token2.label}</a>
99 {help id="id-token-html" file="CRM/Contact/Form/Task/Email.hlp"}
100 <div id='tokenHtml' style="display:none">
101 <input style="border:1px solid #999999;" type="text" id="filter2" size="20" name="filter2" onkeyup="filter(this, 2)"/><br />
102 <span class="description">{ts}Begin typing to filter list of tokens{/ts}</span><br/>
103 {$form.token2.html}
104 </div>
105 </span>
106 <div class="clear"></div>
107 <div class='html'>
108 {$form.msg_html.html}
109 <div class="description">{ts}You may optionally create an HTML formatted version of this message. It will be sent to contacts whose Email Format preference is 'HTML' or 'Both'.{/ts} {ts 1=$tokenDocsRepeated}Tokens may be included (%1).{/ts}</div>
110 </div>
111 </div><!-- /.crm-accordion-body -->
112 </div><!-- /.crm-accordion-wrapper -->
113
114 <div class="crm-accordion-wrapper crm-html_email-accordion ">
115 <div class="crm-accordion-header">
116 {$form.pdf_format_id.label}
117 </div><!-- /.crm-accordion-header -->
118 <div class="crm-accordion-body">
119 <div class="spacer"></div>
120 <div class='html'>
121 {$form.pdf_format_id.html}
122 {help id="id-msg-template" file="CRM/Contact/Form/Task/PDFLetterCommon.hlp"}
123 <div class="description">{ts}Page format to use when creating PDF files using this template.{/ts}</div>
124 </div>
125 </div><!-- /.crm-accordion-body -->
126 </div><!-- /.crm-accordion-wrapper -->
127
128 {if !$workflow_id}
129 <table class="form-layout-compressed">
130 <tr>
131 <td class="label-left">{$form.is_active.label}</td>
132 <td>{$form.is_active.html}</td>
133 </tr>
134 </table>
135 {/if}
136 {/if}
137 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
138 <br clear="all" />
139 </div>
140 </div> <!-- end of crm-form-block -->
141 {include file="CRM/Mailing/Form/InsertTokens.tpl"}
142 {literal}
143 <script type="text/javascript">
144 cj(function() {
145 cj().crmAccordions();
146 });
147 </script>
148 {/literal}