|
8 | 8 | +--------------------------------------------------------------------+
|
9 | 9 | *}
|
10 | 10 | {* this template is used for adding/editing/deleting Message Templates *}
|
11 |
| -{capture assign=tokenDocsRepeated}{docURL page="user/common-workflows/tokens-and-mail-merge" text="token documentation"}{/capture} |
12 | 11 |
|
13 | 12 | {if $action neq 8}
|
14 |
| -<div class="help"> |
| 13 | + <div class="help"> |
15 | 14 | {ts}Use this form to add or edit re-usable message templates.{/ts} {help id="id-intro" file="CRM/Admin/Page/MessageTemplates.hlp"}
|
16 |
| -</div> |
| 15 | + </div> |
17 | 16 | {/if}
|
18 | 17 |
|
19 | 18 | <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>
|
20 | 19 |
|
21 | 20 | <div class="crm-block crm-form-block">
|
22 |
| -<div class="form-item" id="message_templates"> |
23 |
| -{if $action eq 8} |
24 |
| - <div class="messages status no-popup"> |
25 |
| - {icon icon="fa-info-circle"}{/icon} |
26 |
| - {ts 1=$msg_title|escape}Do you want to delete the message template '%1'?{/ts} |
27 |
| - </div> |
28 |
| -{else} |
29 |
| - <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div> |
30 |
| - <table class="form-layout-compressed"> |
| 21 | + <div class="form-item" id="message_templates"> |
| 22 | + {if $action eq 8} |
| 23 | + <div class="messages status no-popup"> |
| 24 | + {icon icon="fa-info-circle"}{/icon} |
| 25 | + {ts 1=$msg_title|escape}Do you want to delete the message template '%1'?{/ts} |
| 26 | + </div> |
| 27 | + {else} |
| 28 | + <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div> |
| 29 | + <table class="form-layout-compressed"> |
31 | 30 | <tr>
|
32 |
| - <td class="label-left">{$form.msg_title.label}</td> |
33 |
| - <td>{$form.msg_title.html} |
34 |
| - <br /><span class="description html-adjust">{ts}Descriptive title of message - used for template selection.{/ts}</span> |
35 |
| - </td> |
| 31 | + <td class="label-left">{$form.msg_title.label}</td> |
| 32 | + <td>{$form.msg_title.html} |
| 33 | + <br /><span class="description html-adjust">{ts}Descriptive title of message - used for template selection.{/ts}</span> |
| 34 | + </td> |
36 | 35 | </tr>
|
37 | 36 | <tr>
|
38 |
| - <td class="label-left">{$form.file_type.label}</td> |
39 |
| - <td>{$form.file_type.html} |
40 |
| - <br /><span class="description html-adjust">{ts}Compose a message on-screen for general use in emails or document output, or upload a pre-composed document for mail-merge.{/ts}</span> |
41 |
| - </td> |
| 37 | + <td class="label-left">{$form.file_type.label}</td> |
| 38 | + <td>{$form.file_type.html} |
| 39 | + <br /><span class="description html-adjust">{ts}Compose a message on-screen for general use in emails or document output, or upload a pre-composed document for mail-merge.{/ts}</span> |
| 40 | + </td> |
42 | 41 | </tr>
|
43 | 42 | <tr>
|
44 |
| - <td class="label-left">{$form.msg_subject.label}</td> |
45 |
| - <td> |
46 |
| - {$form.msg_subject.html|crmAddClass:huge} |
47 |
| - <input class="crm-token-selector big" data-field="msg_subject" /> |
48 |
| - {help id="id-token-subject" tplFile=$tplFile isAdmin=$isAdmin file="CRM/Contact/Form/Task/Email.hlp"} |
49 |
| - <br /><span class="description">{ts}Subject for email message.{/ts} {ts 1=$tokenDocsRepeated}Tokens may be included (%1).{/ts}</span> |
50 |
| - </td> |
| 43 | + <td class="label-left">{$form.msg_subject.label}</td> |
| 44 | + <td> |
| 45 | + {$form.msg_subject.html|crmAddClass:huge} |
| 46 | + <input class="crm-token-selector big" data-field="msg_subject" /> |
| 47 | + {help id="id-token-subject" tplFile=$tplFile isAdmin=$isAdmin file="CRM/Contact/Form/Task/Email.hlp"} |
| 48 | + </td> |
51 | 49 | </tr>
|
52 | 50 | <tr>
|
53 |
| - <td class="label-left">{$form.file_id.label}</td> |
54 |
| - <td>{$form.file_id.html} |
55 |
| - {if $attachment} |
56 |
| - {foreach from=$attachment key=attKey item=attVal} |
57 |
| - <div class="crm-attachment-wrapper crm-entity" id="file_{$attVal.fileID}"> |
58 |
| - <strong><a class="crm-attachment" href="{$attVal.url}">{$attVal.cleanName}</a></strong> |
59 |
| - {if $attVal.description} - {$attVal.description}{/if} |
60 |
| - {if $attVal.deleteURLArgs} |
61 |
| - <a href="#" class="crm-hover-button delete-attachment" data-mimetype="{$attVal.mime_type}" data-filename="{$attVal.cleanName}" data-args="{$attVal.deleteURLArgs}" title="{ts}Delete File{/ts}"><span class="icon delete-icon"></span></a> |
62 |
| - {/if} |
63 |
| - {include file="CRM/Form/attachmentjs.tpl" context='MessageTemplate'} |
64 |
| - {/foreach} |
| 51 | + <td class="label-left">{$form.file_id.label}</td> |
| 52 | + <td>{$form.file_id.html} |
| 53 | + {if $attachment} |
| 54 | + {foreach from=$attachment key=attKey item=attVal} |
| 55 | + <div class="crm-attachment-wrapper crm-entity" id="file_{$attVal.fileID}"> |
| 56 | + <strong><a class="crm-attachment" href="{$attVal.url}">{$attVal.cleanName}</a></strong> |
| 57 | + {if $attVal.description} - {$attVal.description}{/if} |
| 58 | + {if $attVal.deleteURLArgs} |
| 59 | + <a href="#" class="crm-hover-button delete-attachment" data-mimetype="{$attVal.mime_type}" data-filename="{$attVal.cleanName}" data-args="{$attVal.deleteURLArgs}" title="{ts}Delete File{/ts}"><span class="icon delete-icon"></span></a> |
| 60 | + {/if} |
| 61 | + {include file="CRM/Form/attachmentjs.tpl" context='MessageTemplate'} |
| 62 | + {/foreach} |
65 | 63 | {/if}
|
66 |
| - <br /><span class="description html-adjust">{ts}Upload the document in .docx or .odt format.{/ts}</span> |
67 |
| - </td> |
| 64 | + <br /><span class="description html-adjust">{ts}Upload the document in .docx or .odt format.{/ts}</span> |
| 65 | + </td> |
68 | 66 | </tr>
|
69 | 67 | <tr>
|
70 |
| - </table> |
| 68 | + </table> |
71 | 69 |
|
72 | 70 | <div id="msg_html_section" class="crm-accordion-wrapper crm-html_email-accordion ">
|
73 | 71 | <div class="crm-accordion-header">
|
74 |
| - {ts}HTML Format{/ts} |
75 |
| - {help id="id-message-text" file="CRM/Contact/Form/Task/Email.hlp"} |
| 72 | + {ts}HTML Format{/ts} |
| 73 | + {help id="id-message-text" file="CRM/Contact/Form/Task/Email.hlp"} |
76 | 74 | </div><!-- /.crm-accordion-header -->
|
77 |
| - <div class="crm-accordion-body"> |
78 |
| - <div class="helpIcon" id="helphtml"> |
79 |
| - <input class="crm-token-selector big" data-field="msg_html" /> |
80 |
| - {help id="id-token-html" tplFile=$tplFile isAdmin=$isAdmin file="CRM/Contact/Form/Task/Email.hlp"} |
81 |
| - </div> |
82 |
| - <div class="clear"></div> |
83 |
| - <div class='html'> |
84 |
| - {$form.msg_html.html|crmAddClass:huge} |
85 |
| - <div class="description">{ts}An HTML formatted version of this message will be sent to contacts whose Email Format preference is 'HTML' or 'Both'.{/ts} {ts 1=$tokenDocsRepeated}Tokens may be included (%1).{/ts}</div> |
86 |
| - </div> |
| 75 | + <div class="crm-accordion-body"> |
| 76 | + <div class="helpIcon" id="helphtml"> |
| 77 | + <input class="crm-token-selector big" data-field="msg_html" /> |
| 78 | + {help id="id-token-html" tplFile=$tplFile isAdmin=$isAdmin file="CRM/Contact/Form/Task/Email.hlp"} |
| 79 | + </div> |
| 80 | + <div class="clear"></div> |
| 81 | + <div class='html'> |
| 82 | + {$form.msg_html.html|crmAddClass:huge} |
| 83 | + <div class="description">{ts}An HTML formatted version of this message will be sent to contacts whose Email Format preference is 'HTML' or 'Both'.{/ts}</div> |
| 84 | + </div> |
87 | 85 | </div><!-- /.crm-accordion-body -->
|
88 | 86 | </div><!-- /.crm-accordion-wrapper -->
|
89 | 87 |
|
90 | 88 | <div id="msg_text_section" class="crm-accordion-wrapper crm-plaint_text_email-accordion ">
|
91 | 89 | <div class="crm-accordion-header">
|
92 |
| - {ts}Plain-Text Format{/ts} |
| 90 | + {ts}Plain-Text Format{/ts} |
93 | 91 | </div><!-- /.crm-accordion-header -->
|
94 |
| - <div class="crm-accordion-body"> |
95 |
| - <div class="helpIcon" id="helptext"> |
96 |
| - <input class="crm-token-selector big" data-field="msg_text" /> |
97 |
| - {help id="id-token-text" tplFile=$tplFile file="CRM/Contact/Form/Task/Email.hlp"} |
98 |
| - </div> |
99 |
| - <div class="clear"></div> |
100 |
| - <div class='text'> |
101 |
| - {$form.msg_text.html|crmAddClass:huge} |
102 |
| - <div class="description">{ts}Text formatted message.{/ts} {ts 1=$tokenDocsRepeated}Tokens may be included (%1).{/ts}</div> |
103 |
| - </div> |
104 |
| - </div><!-- /.crm-accordion-body --> |
| 92 | + <div class="crm-accordion-body"> |
| 93 | + <div class="helpIcon" id="helptext"> |
| 94 | + <input class="crm-token-selector big" data-field="msg_text" /> |
| 95 | + {help id="id-token-text" tplFile=$tplFile file="CRM/Contact/Form/Task/Email.hlp"} |
| 96 | + </div> |
| 97 | + <div class="clear"></div> |
| 98 | + <div class='text'> |
| 99 | + {$form.msg_text.html|crmAddClass:huge} |
| 100 | + <div class="description">{ts}Text formatted message.{/ts}</div> |
| 101 | + </div> |
| 102 | + </div><!-- /.crm-accordion-body --> |
105 | 103 | </div><!-- /.crm-accordion-wrapper -->
|
106 | 104 |
|
107 | 105 | <div id="pdf_format" class="crm-accordion-wrapper crm-html_email-accordion ">
|
108 | 106 | <div class="crm-accordion-header">
|
109 |
| - {$form.pdf_format_id.label} |
| 107 | + {$form.pdf_format_id.label} |
110 | 108 | </div><!-- /.crm-accordion-header -->
|
111 |
| - <div class="crm-accordion-body"> |
112 |
| - <div class="spacer"></div> |
113 |
| - <div class='html'> |
114 |
| - {$form.pdf_format_id.html} |
115 |
| - {help id="id-msg-template" file="CRM/Contact/Form/Task/PDFLetterCommon.hlp"} |
116 |
| - <div class="description">{ts}Page format to use when creating PDF files using this template.{/ts}</div> |
117 |
| - </div> |
| 109 | + <div class="crm-accordion-body"> |
| 110 | + <div class="spacer"></div> |
| 111 | + <div class='html'> |
| 112 | + {$form.pdf_format_id.html} |
| 113 | + {help id="id-msg-template" file="CRM/Contact/Form/Task/PDFLetterCommon.hlp"} |
| 114 | + <div class="description">{ts}Page format to use when creating PDF files using this template.{/ts}</div> |
| 115 | + </div> |
118 | 116 | </div><!-- /.crm-accordion-body -->
|
119 | 117 | </div><!-- /.crm-accordion-wrapper -->
|
120 | 118 |
|
121 |
| - {if !$workflow_id} |
122 |
| - <table class="form-layout-compressed"> |
| 119 | + {if !$workflow_id} |
| 120 | + <table class="form-layout-compressed"> |
123 | 121 | <tr>
|
124 | 122 | <td class="label-left">{$form.is_active.label}</td>
|
125 | 123 | <td>{$form.is_active.html}</td>
|
126 | 124 | </tr>
|
127 |
| - </table> |
| 125 | + </table> |
| 126 | + {/if} |
128 | 127 | {/if}
|
129 |
| - {/if} |
130 |
| - <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div> |
131 |
| - <br clear="all" /> |
132 |
| -</div> |
| 128 | + <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div> |
| 129 | + <br clear="all" /> |
| 130 | + </div> |
133 | 131 | </div> <!-- end of crm-form-block -->
|
134 | 132 | {include file="CRM/Mailing/Form/InsertTokens.tpl"}
|
135 | 133 |
|
|
0 commit comments