| 1 | {* |
| 2 | +--------------------------------------------------------------------+ |
| 3 | | CiviCRM version 4.4 | |
| 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 | <input class="crm-token-selector big" data-field="msg_subject" /> |
| 57 | {help id="id-token-subject" tplFile=$tplFile isAdmin=$isAdmin file="CRM/Contact/Form/Task/Email.hlp"} |
| 58 | <br /><span class="description">{ts}Subject for email message.{/ts} {ts 1=$tokenDocsRepeated}Tokens may be included (%1).{/ts}</span> |
| 59 | </td> |
| 60 | </tr> |
| 61 | <tr> |
| 62 | </table> |
| 63 | |
| 64 | <div class="crm-accordion-wrapper crm-plaint_text_email-accordion "> |
| 65 | <div class="crm-accordion-header"> |
| 66 | {ts}Plain-Text Format{/ts} |
| 67 | </div><!-- /.crm-accordion-header --> |
| 68 | <div class="crm-accordion-body"> |
| 69 | <div class="helpIcon" id="helptext"> |
| 70 | <input class="crm-token-selector big" data-field="msg_text" /> |
| 71 | {help id="id-token-text" tplFile=$tplFile file="CRM/Contact/Form/Task/Email.hlp"} |
| 72 | </div> |
| 73 | <div class='text'> |
| 74 | {$form.msg_text.html|crmAddClass:huge} |
| 75 | <div class="description">{ts}Text formatted message.{/ts} {ts 1=$tokenDocsRepeated}Tokens may be included (%1).{/ts}</div> |
| 76 | </div> |
| 77 | </div><!-- /.crm-accordion-body --> |
| 78 | </div><!-- /.crm-accordion-wrapper --> |
| 79 | |
| 80 | <div class="crm-accordion-wrapper crm-html_email-accordion "> |
| 81 | <div class="crm-accordion-header"> |
| 82 | {ts}HTML Format{/ts} |
| 83 | {help id="id-message-text" file="CRM/Contact/Form/Task/Email.hlp"} |
| 84 | </div><!-- /.crm-accordion-header --> |
| 85 | <div class="crm-accordion-body"> |
| 86 | <div class="helpIcon" id="helphtml"> |
| 87 | <input class="crm-token-selector big" data-field="html_message" /> |
| 88 | {help id="id-token-html" tplFile=$tplFile isAdmin=$isAdmin editor=$editor file="CRM/Contact/Form/Task/Email.hlp"} |
| 89 | </div> |
| 90 | <div class="clear"></div> |
| 91 | <div class='html'> |
| 92 | {$form.msg_html.html} |
| 93 | <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> |
| 94 | </div> |
| 95 | </div><!-- /.crm-accordion-body --> |
| 96 | </div><!-- /.crm-accordion-wrapper --> |
| 97 | |
| 98 | <div class="crm-accordion-wrapper crm-html_email-accordion "> |
| 99 | <div class="crm-accordion-header"> |
| 100 | {$form.pdf_format_id.label} |
| 101 | </div><!-- /.crm-accordion-header --> |
| 102 | <div class="crm-accordion-body"> |
| 103 | <div class="spacer"></div> |
| 104 | <div class='html'> |
| 105 | {$form.pdf_format_id.html} |
| 106 | {help id="id-msg-template" file="CRM/Contact/Form/Task/PDFLetterCommon.hlp"} |
| 107 | <div class="description">{ts}Page format to use when creating PDF files using this template.{/ts}</div> |
| 108 | </div> |
| 109 | </div><!-- /.crm-accordion-body --> |
| 110 | </div><!-- /.crm-accordion-wrapper --> |
| 111 | |
| 112 | {if !$workflow_id} |
| 113 | <table class="form-layout-compressed"> |
| 114 | <tr> |
| 115 | <td class="label-left">{$form.is_active.label}</td> |
| 116 | <td>{$form.is_active.html}</td> |
| 117 | </tr> |
| 118 | </table> |
| 119 | {/if} |
| 120 | {/if} |
| 121 | <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div> |
| 122 | <br clear="all" /> |
| 123 | </div> |
| 124 | </div> <!-- end of crm-form-block --> |
| 125 | {include file="CRM/Mailing/Form/InsertTokens.tpl"} |
| 126 | {literal} |
| 127 | <script type="text/javascript"> |
| 128 | cj(function() { |
| 129 | cj().crmAccordions(); |
| 130 | }); |
| 131 | </script> |
| 132 | {/literal} |