]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/EmailTemplates/EditViewMain.html
Release 6.5.0
[Github/sugarcrm.git] / modules / EmailTemplates / EditViewMain.html
1 <!--
2 /*********************************************************************************
3  * SugarCRM Community Edition is a customer relationship management program developed by
4  * SugarCRM, Inc. Copyright (C) 2004-2012 SugarCRM Inc.
5  * 
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.
12  * 
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
16  * details.
17  * 
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
21  * 02110-1301 USA.
22  * 
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.
25  * 
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.
29  * 
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  ********************************************************************************/
36
37 /*********************************************************************************
38
39  ********************************************************************************/
40 -->
41 <!-- BEGIN: main -->
42 <style>
43         #subjectfield { height: 1.6em; }
44 </style>
45 {JAVASCRIPT}
46 <script type="text/javascript" language="Javascript" src="modules/Emails/javascript/Email.js?v={VERSION_MARK}"></script>
47 <script type="text/javascript" language="Javascript" src="modules/EmailTemplates/EmailTemplate.js?v={VERSION_MARK}"></script>
48 <script type="text/javascript" src="cache/include/javascript/sugar_grp1.js?v={VERSION_MARK}"></script>
49 <script type="text/javascript">
50 {FIELD_DEFS_JS}
51 </script>
52 {JSLANG}
53
54 <form name="EditView" id="EditView" method="POST" action="index.php" enctype="multipart/form-data">
55         <input type="hidden" name="module" value="EmailTemplates">
56         <input type="hidden" name="record" value="{ID}">
57         <input type="hidden" name="action">
58         <input type="hidden" name="form">
59         <input type="hidden" name="return_module" value="{RETURN_MODULE}">
60         <input type="hidden" name="return_id" value="{RETURN_ID}">
61         <input type="hidden" name="return_action" value="{RETURN_ACTION}">
62         <input type="hidden" name="inpopupwindow" value="{INPOPUPWINDOW}">
63         <input type="hidden" name="old_id" value="{OLD_ID}">
64
65         <table width="100%" cellpadding="0" cellspacing="0" border="0">
66                 <tr>
67                         <td>
68                                 <input title="{APP.LBL_SAVE_BUTTON_TITLE}" accesskey="{APP.LBL_SAVE_BUTTON_KEY}" class="button primary"
69                                         onclick="       this.form.action.value='Save';
70 <!-- BEGIN: NoInbound1 -->
71                                                                 addUploadFiles('EditView');
72                                                                 addUploadDocs('EditView');
73 <!-- END: NoInbound1 -->
74                                                                 return check_form('EditView');"
75                                         type="submit" name="button" value="{APP.LBL_SAVE_BUTTON_LABEL}" id="SAVE">
76                                 <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}" id="CANCEL">
77                         </td>
78                         <td align="right" nowrap>
79                                 <span class="required">
80                                         {APP.LBL_REQUIRED_SYMBOL}
81                                 </span>
82                                 {APP.NTC_REQUIRED}
83                         </td>
84                         <td align='right'>
85                                 {ADMIN_EDIT}
86                         </td>
87                 </tr>
88         </table>
89         <table width="100%" border="0" cellspacing="0" cellpadding="0" class="edit view">
90                 <tr>
91                         <td>
92                                 <table width="100%" border="0" cellspacing="0" cellpadding="0">
93                                         <tr>
94                                                 <td width="15%" scope="row">
95                                                         {MOD.LBL_NAME}
96                                                         <span class="required">
97                                                                 {APP.LBL_REQUIRED_SYMBOL}
98                                                         </span>
99                                                 </td>
100                                                 <td width="30%" >
101                                                         <input  id='name' name='name' tabindex="0" type="text" size='30' maxlength="255" value="{NAME}">
102                                                 </td>
103                         <td width="15%" scope="row">
104                          {MOD.LBL_TYPE}
105                         </td>
106                         <td width="30%" >
107                             <select name='type' tabindex="11">{TYPEDROPDOWN}</select>
108                         </td>
109                                         </tr>
110                     <tr>
111                       <td width="15%" scope="row">{APP.LBL_ASSIGNED_TO}&nbsp;</td>
112                               <td>
113                                   <input class="sqsEnabled" tabindex="0" autocomplete="off" id='assigned_user_name' name='assigned_user_name' type="text" value="{ASSIGNED_USER_NAME}">
114                                   <input id='assigned_user_id' name='assigned_user_id' type="hidden" value="{ASSIGNED_USER_ID}" />
115
116                                   <span class="id-ff multiple">
117                                       <button title="{APP.LBL_SELECT_BUTTON_TITLE}" type="button" tabindex='0' class="button firstChild" value='{APP.LBL_SELECT_BUTTON_LABEL}' name="btn_author"  id="btn_author"
118                                                 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="0" title="{APP.LBL_CLEAR_BUTTON_TITLE}" class="button lastChild"
119                                                 onclick="this.form.assigned_user_name.value = ''; this.form.assigned_user_id.value = '';" value="{APP.LBL_CLEAR_BUTTON_LABEL}" >{assign_user_clear}</button>
120                                  </span>
121                               </td>
122                     </tr>
123                                         <tr>
124                                                 <td width="15%" scope="row">
125                                                         {MOD.LBL_DESCRIPTION}
126                                                 </td>
127                                                 <td colspan="3" >
128                                                         <textarea name='description' tabindex='0' cols="90" rows="1" style="height: 1.6.em; overflow-y:auto; font-family:sans-serif,monospace; font-size:inherit;" id="description">{DESCRIPTION}</textarea>
129                                                 </td>
130                                         </tr>
131                                         <tr>
132                                                 <td colspan="4">
133                                                         &nbsp;
134                                                 </td>
135                                         </tr>
136 <!-- BEGIN: NoInbound -->
137                                         <tr>
138                                                 <td width="15%" scope="row" align='left'>
139                                                         {MOD.LBL_INSERT_VARIABLE}&nbsp;
140                                                 </td>
141                                                 <td width="30%"  colspan="3">
142                                                         <select name='variable_module' tabindex="0" onchange="addVariables(document.EditView.variable_name,this.options[this.selectedIndex].value);">
143                                                           {DROPDOWN}
144                                                         </select>
145                                                         <select name='variable_name' tabindex="0" onchange="showVariable();">
146                                                         </select>
147                                                         <span scope="row">
148                                                                 {MOD.LBL_USE}:
149                                                         </span>
150                                                         <input type="text" size="30" tabindex="0" name="variable_text" />
151 <!-- BEGIN: variable_button -->
152                                                         <input type='button' tabindex="0" onclick='{INSERT_VARIABLE_ONCLICK}' class='button' value='{MOD.LBL_INSERT}'>
153 <!-- END: variable_button -->
154                                                 </td>
155                                         </tr>
156 <!-- BEGIN: tracker_url -->
157                                         <tr>
158                                                 <td width="15%" scope="row" align='left'>
159                                                         {MOD.LBL_INSERT_TRACKER_URL}&nbsp;
160                                                 </td>
161                                                 <td width="85%" colspan="3" valign="top" >
162                                                         <select tabindex='0' name='tracker_url' onchange='this.form.url_text.value=this.value'>
163                                                                 {TRACKER_KEY_OPTIONS}
164                                                         </select>
165                                                         <input type="text" size="30" id="url_text" name="url_text" value="{DEFAULT_URL_TEXT}" />
166                                                         <input type='button' tabindex="0" onclick='{INSERT_URL_ONCLICK}' class='button' value='{MOD.LBL_INSERT_URL_REF}'>
167                                                 </td>
168                                         </tr>
169 <!-- END: tracker_url -->
170 <!-- END: NoInbound -->
171                                         <tr>
172                                                 <td width="15%" scope="row">
173                                                         {MOD.LBL_SUBJECT}
174                                                 </td>
175                                                 <td colspan='4' >
176                                                         <textarea onblur="remember_place(this);" name='subject' tabindex='0' cols="90" rows="1" style="height: 1.6.em; overflow-y:auto; font-family:sans-serif,monospace; font-size:inherit;" id="subjectfield">{SUBJECT}</textarea>
177                                                 </td>
178                                         </tr>
179                                         <tr>
180                                                 <td>&nbsp;</td>
181                                                 <td colspan='4'>
182                                                 <input  name="toggle_textonly"  id="toggle_textonly" onclick="toggle_text_only();" type="checkbox" {TEXTONLY_CHECKED}/>
183                                                 <input  name="text_only"  id="text_only"  type="hidden" value='{TEXTONLY_VALUE}'/>
184                                                         &nbsp;{MOD.LBL_SEND_AS_TEXT}
185                                                 </td>
186                                         </tr>
187                                         <tr>
188                                                 <td valign="top" scope="row">
189                                                         {MOD.LBL_BODY}
190                                                 </td>
191
192 <!-- BEGIN: textarea -->
193                                                 <td colspan="4" >
194                                                         <div id='body_text_div'>
195                                                         <textarea id='body_text' tabindex='0' name='body_html' cols="100" rows="40">{BODY_HTML}</textarea>
196                                                         </div>
197                             <br>
198                                                         <div id='toggle_textarea_option'>
199                                 <input id='toggle_textarea_elem' onclick="toggle_textarea_edit(this);" type="button" name="toggle_html" value="{MOD.LBL_EDIT_ALT_TEXT}"/>
200                             </div>
201                             <br>
202                             <div id="text_div" style="display: none">
203                                 <textarea id='body_text_plain'  tabindex='0' name='body' cols="100" rows="40" >{BODY}</textarea>
204                             </div>
205                                                 </td>
206 <!-- END: textarea -->
207                                         </tr>
208 <!-- BEGIN: NoInbound2 -->
209                                         <tr>
210                                                 <td valign="top" scope="row">
211                                                         {MOD.LBL_ATTACHMENTS}:
212                                                 </td>
213                                                 <td colspan="2" nowrap>
214                                                         {ATTACHMENTS_JAVASCRIPT} {ATTACHMENTS}
215                                                 </td>
216                                         </tr>
217 <!-- END: NoInbound2 -->
218                                 </table>
219                         </td>
220                 </tr>
221         </table>
222 </form>
223 <!-- BEGIN: NoInbound3 -->
224 <form id="upload_form" name="upload_form" method="POST" action='AttachDocuments.php' enctype="multipart/form-data">
225         <div id="upload_div">
226                 <input type="file" id="my_file" name="file_1" size="40" />
227                 <input type="hidden" id="documentName" name="uploaddoc" onchange="docUpload(); form_reset_doc();" size="1" />
228                 <input type="hidden" id="documentId" name="seldoc" tabindex="0" />
229                 <input type="hidden" id="docRevId" name="seldoc" tabindex="0" />
230                 <input type="hidden" id="documentType" name="seldoc" tabindex="0" />
231                 <input type="button" name="add_doc" id="add_doc" onclick="selectDoc();" value='{MOD.LBL_SUGAR_DOCUMENT}' class="button" />
232         </div>
233         <div id="attachments_div">
234         </div>
235 </form>
236 <!-- END: NoInbound3 -->
237 {tiny}
238 <script type="text/javascript" language="javascript">
239 <!-- BEGIN: NoInbound4 -->
240 toggle_textarea_elem_values = ['{MOD.LBL_EDIT_ALT_TEXT}', '{MOD.LBL_HIDE_ALT_TEXT}'];
241 var multi_selector = new multiFiles(document.getElementById('upload_div'));
242 multi_selector.addElement( document.getElementById('my_file'));
243 <!-- END: NoInbound4 -->
244 //call the function on load, this will hide the tinyMCE editor if needed
245 toggle_text_only(true);
246
247 function toggle_portal_flag() {
248         {TOGGLE_JS}
249 }
250 <!-- BEGIN: NoInbound5 -->
251 addVariables(document.EditView.variable_name,'{DEFAULT_MODULE}');
252 <!-- END: NoInbound5 -->
253 focus_obj = document.EditView.body;
254 toggle_portal_flag();
255 update_textarea_button();
256 </script>
257
258
259
260 <!-- END: main -->