2 /*********************************************************************************
3 * SugarCRM is a customer relationship management program developed by
4 * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
6 * This program is free software; you can redistribute it and/or modify it under
7 * the terms of the GNU Affero General Public License version 3 as published by the
8 * Free Software Foundation with the addition of the following permission added
9 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
10 * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
11 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
13 * This program is distributed in the hope that it will be useful, but WITHOUT
14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
18 * You should have received a copy of the GNU Affero General Public License along with
19 * this program; if not, see http://www.gnu.org/licenses or write to the Free
20 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23 * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
24 * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
26 * The interactive user interfaces in modified source and object code versions
27 * of this program must display Appropriate Legal Notices, as required under
28 * Section 5 of the GNU Affero General Public License version 3.
30 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
31 * these Appropriate Legal Notices must retain the display of the "Powered by
32 * SugarCRM" logo. If the display of the logo is not reasonably feasible for
33 * technical reasons, the Appropriate Legal Notices must display the words
34 * "Powered by SugarCRM".
35 ********************************************************************************/
37 /*********************************************************************************
39 ********************************************************************************/
43 #subjectfield { height: 1.6em; }
46 <script type="text/javascript" src="include/JSON.js?s={SUGAR_VERSION}&c={JS_CUSTOM_VERSION}"></script>
47 <script type="text/javascript" src="include/javascript/sugar_grp1.js?s={SUGAR_VERSION}&c={JS_CUSTOM_VERSION}"></script>
48 <script type="text/javascript" src="include/javascript/yui/YAHOO.js"></script>
49 <script type="text/javascript" src="include/javascript/yui/connection.js"></script>
51 <script type="text/javascript" language="Javascript" src="modules/Emails/javascript/Email.js"></script>
52 <script type="text/javascript" language="Javascript" src="modules/EmailTemplates/EmailTemplate.js"></script>
53 <script type="text/javascript">
57 <form name="EditView" id="EditView" method="POST" action="index.php" enctype="multipart/form-data">
58 <input type="hidden" name="module" value="EmailTemplates">
59 <input type="hidden" name="record" value="{ID}">
60 <input type="hidden" name="action">
61 <input type="hidden" name="form">
62 <input type="hidden" name="return_module" value="{RETURN_MODULE}">
63 <input type="hidden" name="return_id" value="{RETURN_ID}">
64 <input type="hidden" name="return_action" value="{RETURN_ACTION}">
65 <input type="hidden" name="inpopupwindow" value="{INPOPUPWINDOW}">
66 <input type="hidden" name="old_id" value="{OLD_ID}">
68 <table width="100%" cellpadding="0" cellspacing="0" border="0">
71 <input title="{APP.LBL_SAVE_BUTTON_TITLE}" accesskey="{APP.LBL_SAVE_BUTTON_KEY}" class="button primary"
72 onclick=" this.form.action.value='Save';
73 <!-- BEGIN: NoInbound1 -->
74 addUploadFiles('EditView');
75 addUploadDocs('EditView');
76 <!-- END: NoInbound1 -->
77 return check_form('EditView');"
78 type="submit" name="button" value="{APP.LBL_SAVE_BUTTON_LABEL}">
79 <input title="{APP.LBL_CANCEL_BUTTON_TITLE}" accesskey="{APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="{CANCEL_SCRIPT}" type="submit" name="button" value="{APP.LBL_CANCEL_BUTTON_LABEL}">
81 <td align="right" nowrap>
82 <span class="required">
83 {APP.LBL_REQUIRED_SYMBOL}
92 <div class="edit view">
93 <table width="100%" border="0" cellspacing="0" cellpadding="0">
96 <table width="100%" border="0" cellspacing="0" cellpadding="0">
98 <td width="15%" scope="row">
100 <span class="required">
101 {APP.LBL_REQUIRED_SYMBOL}
105 <input name='name' tabindex="10" type="text" size='30' maxlength="255" value="{NAME}">
107 <td width="15%" scope="row">
113 <td width="15%" scope="row">
114 {MOD.LBL_DESCRIPTION}
117 <textarea name='description' tabindex='30' cols="90" rows="1" style="height: 1.6.em; overflow-y:auto; font-family:sans-serif,monospace; font-size:inherit;" id="subjectfield">{DESCRIPTION}</textarea>
125 <!-- BEGIN: NoInbound -->
127 <td width="15%" scope="row" align='left'>
128 {MOD.LBL_INSERT_VARIABLE}
130 <td width="30%" colspan="3">
131 <select name='variable_module' tabindex="40" onchange="addVariables(document.EditView.variable_name,this.options[this.selectedIndex].value);">
134 <select name='variable_name' tabindex="50" onchange="showVariable();">
139 <input type="text" size="30" tabindex="60" name="variable_text" />
140 <!-- BEGIN: variable_button -->
141 <input type='button' tabindex="70" onclick='{INSERT_VARIABLE_ONCLICK}' class='button' value='{MOD.LBL_INSERT}'>
142 <!-- END: variable_button -->
145 <!-- BEGIN: tracker_url -->
147 <td width="15%" scope="row" align='left'>
148 {MOD.LBL_INSERT_TRACKER_URL}
150 <td width="85%" colspan="3" valign="top" >
151 <select tabindex='75' name='tracker_url' onchange='this.form.url_text.value=this.value'>
152 {TRACKER_KEY_OPTIONS}
154 <input type="text" size="30" id="url_text" name="url_text" value="{DEFAULT_URL_TEXT}" />
155 <input type='button' tabindex="77" onclick='{INSERT_URL_ONCLICK}' class='button' value='{MOD.LBL_INSERT_URL_REF}'>
158 <!-- END: tracker_url -->
159 <!-- END: NoInbound -->
161 <td width="15%" scope="row">
165 <textarea onblur="remember_place(this);" name='subject' tabindex='80' cols="90" rows="1" style="height: 1.6.em; overflow-y:auto; font-family:sans-serif,monospace; font-size:inherit;" id="subjectfield">{SUBJECT}</textarea>
171 <input name="toggle_textonly" id="toggle_textonly" onclick="toggle_text_only();" type="checkbox" {TEXTONLY_CHECKED}/>
172 <input name="text_only" id="text_only" type="hidden" value='{TEXTONLY_VALUE}'/>
173 {MOD.LBL_SEND_AS_TEXT}
177 <td valign="top" scope="row">
181 <!-- BEGIN: textarea -->
183 <div id='body_text_div'>
184 <textarea id='body_text' tabindex='90' name='body_html' cols="100" rows="20">{BODY_HTML}</textarea>
187 <div id='toggle_textarea_option'>
188 <input id='toggle_textarea_elem' onclick="toggle_textarea(this);" type="checkbox" name="toggle_html" />
189 {MOD.LBL_EDIT_ALT_TEXT}
192 <div id="text_div" style="display: none">
193 <textarea tabindex='110' name='body' cols="100" rows="20" >{BODY}</textarea>
196 <!-- END: textarea -->
198 <!-- BEGIN: NoInbound2 -->
200 <td valign="top" scope="row">
201 {MOD.LBL_ATTACHMENTS}:
203 <td colspan="2" nowrap>
204 {ATTACHMENTS_JAVASCRIPT} {ATTACHMENTS}
207 <!-- END: NoInbound2 -->
214 <!-- BEGIN: NoInbound3 -->
215 <form id="upload_form" name="upload_form" method="POST" action='AttachDocuments.php' enctype="multipart/form-data">
216 <div id="upload_div">
217 <input type="file" id="my_file" name="file_1" size="40" />
218 <input type="hidden" id="documentName" name="uploaddoc" onchange="docUpload(); form_reset_doc();" size="1" />
219 <input type="hidden" id="documentId" name="seldoc" tabindex="0" />
220 <input type="hidden" id="docRevId" name="seldoc" tabindex="0" />
221 <input type="hidden" id="documentType" name="seldoc" tabindex="0" />
222 <input type="button" name="add_doc" onclick="selectDoc();" value='{MOD.LBL_SUGAR_DOCUMENT}' class="button" />
224 <div id="attachments_div">
227 <!-- END: NoInbound3 -->
229 <script type="text/javascript" language="javascript">
230 <!-- BEGIN: NoInbound4 -->
231 var multi_selector = new multiFiles(document.getElementById('upload_div'));
232 multi_selector.addElement( document.getElementById('my_file'));
233 <!-- END: NoInbound4 -->
234 //call the function on load, this will hide the tinyMCE editor if needed
235 toggle_text_only(true);
237 function toggle_portal_flag() {
240 <!-- BEGIN: NoInbound5 -->
241 addVariables(document.EditView.variable_name,'{DEFAULT_MODULE}');
242 <!-- END: NoInbound5 -->
243 focus_obj = document.EditView.body;
244 toggle_portal_flag();