2 /*********************************************************************************
3 * SugarCRM Community Edition 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" language="Javascript" src="modules/Emails/javascript/Email.js"></script>
47 <script type="text/javascript" language="Javascript" src="modules/EmailTemplates/EmailTemplate.js"></script>
48 <script type="text/javascript" src="include/JSON.js?s={SUGAR_VERSION}&c={JS_CUSTOM_VERSION}"></script>
49 <script type="text/javascript" src="include/javascript/sugar_grp1.js?s={SUGAR_VERSION}&c={JS_CUSTOM_VERSION}"></script>
50 <script type="text/javascript" src="include/javascript/yui/YAHOO.js"></script>
51 <script type="text/javascript" src="include/javascript/yui/connection.js"></script>
52 <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 <table width="100%" border="0" cellspacing="0" cellpadding="0" class="edit view">
95 <table width="100%" border="0" cellspacing="0" cellpadding="0">
97 <td width="15%" scope="row">
99 <span class="required">
100 {APP.LBL_REQUIRED_SYMBOL}
104 <input name='name' tabindex="10" type="text" size='30' maxlength="255" value="{NAME}">
108 <td width="15%" scope="row">{APP.LBL_ASSIGNED_TO} </td>
110 <input class="sqsEnabled" tabindex="1" autocomplete="off" id='assigned_user_name' name='assigned_user_name' type="text" value="{ASSIGNED_USER_NAME}">
111 <input id='assigned_user_id' name='assigned_user_id' type="hidden" value="{ASSIGNED_USER_ID}" />
113 <span class="id-ff multiple">
114 <button title="{APP.LBL_SELECT_BUTTON_TITLE}" accessKey="{APP.LBL_SELECT_BUTTON_KEY}" type="button" tabindex='1' class="button firstChild" value='{APP.LBL_SELECT_BUTTON_LABEL}' name="btn_author"
115 onclick='open_popup("Users", 600, 400, "", true, false, {encoded_assigned_users_popup_request_data});'>{assign_user_select}</button><button type="button" name="btn_clr" id="btn_clr" tabindex="10" title="{APP.LBL_CLEAR_BUTTON_TITLE}" accessKey="{APP.LBL_CLEAR_BUTTON_KEY}" class="button lastChild"
116 onclick="this.form.assigned_user_name.value = ''; this.form.assigned_user_id.value = '';" value="{APP.LBL_CLEAR_BUTTON_LABEL}" >{assign_user_clear}</button>
121 <td width="15%" scope="row">
122 {MOD.LBL_DESCRIPTION}
125 <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>
133 <!-- BEGIN: NoInbound -->
135 <td width="15%" scope="row" align='left'>
136 {MOD.LBL_INSERT_VARIABLE}
138 <td width="30%" colspan="3">
139 <select name='variable_module' tabindex="40" onchange="addVariables(document.EditView.variable_name,this.options[this.selectedIndex].value);">
142 <select name='variable_name' tabindex="50" onchange="showVariable();">
147 <input type="text" size="30" tabindex="60" name="variable_text" />
148 <!-- BEGIN: variable_button -->
149 <input type='button' tabindex="70" onclick='{INSERT_VARIABLE_ONCLICK}' class='button' value='{MOD.LBL_INSERT}'>
150 <!-- END: variable_button -->
153 <!-- BEGIN: tracker_url -->
155 <td width="15%" scope="row" align='left'>
156 {MOD.LBL_INSERT_TRACKER_URL}
158 <td width="85%" colspan="3" valign="top" >
159 <select tabindex='75' name='tracker_url' onchange='this.form.url_text.value=this.value'>
160 {TRACKER_KEY_OPTIONS}
162 <input type="text" size="30" id="url_text" name="url_text" value="{DEFAULT_URL_TEXT}" />
163 <input type='button' tabindex="77" onclick='{INSERT_URL_ONCLICK}' class='button' value='{MOD.LBL_INSERT_URL_REF}'>
166 <!-- END: tracker_url -->
167 <!-- END: NoInbound -->
169 <td width="15%" scope="row">
173 <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>
179 <input name="toggle_textonly" id="toggle_textonly" onclick="toggle_text_only();" type="checkbox" {TEXTONLY_CHECKED}/>
180 <input name="text_only" id="text_only" type="hidden" value='{TEXTONLY_VALUE}'/>
181 {MOD.LBL_SEND_AS_TEXT}
185 <td valign="top" scope="row">
189 <!-- BEGIN: textarea -->
191 <div id='body_text_div'>
192 <textarea id='body_text' tabindex='90' name='body_html' cols="100" rows="40">{BODY_HTML}</textarea>
195 <div id='toggle_textarea_option'>
196 <input id='toggle_textarea_elem' onclick="toggle_textarea_edit(this);" type="button" name="toggle_html" value="{MOD.LBL_EDIT_ALT_TEXT}"/>
199 <div id="text_div" style="display: none">
200 <textarea id='body_text_plain' tabindex='110' name='body' cols="100" rows="40" >{BODY}</textarea>
203 <!-- END: textarea -->
205 <!-- BEGIN: NoInbound2 -->
207 <td valign="top" scope="row">
208 {MOD.LBL_ATTACHMENTS}:
210 <td colspan="2" nowrap>
211 {ATTACHMENTS_JAVASCRIPT} {ATTACHMENTS}
214 <!-- END: NoInbound2 -->
220 <!-- BEGIN: NoInbound3 -->
221 <form id="upload_form" name="upload_form" method="POST" action='AttachDocuments.php' enctype="multipart/form-data">
222 <div id="upload_div">
223 <input type="file" id="my_file" name="file_1" size="40" />
224 <input type="hidden" id="documentName" name="uploaddoc" onchange="docUpload(); form_reset_doc();" size="1" />
225 <input type="hidden" id="documentId" name="seldoc" tabindex="0" />
226 <input type="hidden" id="docRevId" name="seldoc" tabindex="0" />
227 <input type="hidden" id="documentType" name="seldoc" tabindex="0" />
228 <input type="button" name="add_doc" onclick="selectDoc();" value='{MOD.LBL_SUGAR_DOCUMENT}' class="button" />
230 <div id="attachments_div">
233 <!-- END: NoInbound3 -->
235 <script type="text/javascript" language="javascript">
236 <!-- BEGIN: NoInbound4 -->
237 toggle_textarea_elem_values = ['{MOD.LBL_EDIT_ALT_TEXT}', '{MOD.LBL_HIDE_ALT_TEXT}'];
238 var multi_selector = new multiFiles(document.getElementById('upload_div'));
239 multi_selector.addElement( document.getElementById('my_file'));
240 <!-- END: NoInbound4 -->
241 //call the function on load, this will hide the tinyMCE editor if needed
242 toggle_text_only(true);
244 function toggle_portal_flag() {
247 <!-- BEGIN: NoInbound5 -->
248 addVariables(document.EditView.variable_name,'{DEFAULT_MODULE}');
249 <!-- END: NoInbound5 -->
250 focus_obj = document.EditView.body;
251 toggle_portal_flag();
252 update_textarea_button();