]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/EmailTemplates/EditView.html
Release 6.2.0
[Github/sugarcrm.git] / modules / EmailTemplates / EditView.html
1 <!--
2 /*********************************************************************************
3  * SugarCRM Community Edition is a customer relationship management program developed by
4  * SugarCRM, Inc. Copyright (C) 2004-2011 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" 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>
50 {JSLANG}
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">
54         {FIELD_DEFS_JS}
55 </script> 
56
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}">
67
68         <table width="100%" cellpadding="0" cellspacing="0" border="0">
69                 <tr>
70                         <td>
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}">
80                         </td>
81                         <td align="right" nowrap>
82                                 <span class="required">
83                                         {APP.LBL_REQUIRED_SYMBOL} 
84                                 </span>
85                                 {APP.NTC_REQUIRED} 
86                         </td>
87                         <td align='right'>
88                                 {ADMIN_EDIT} 
89                         </td>
90                 </tr>
91         </table>
92     <div class="edit view">
93         <table width="100%" border="0" cellspacing="0" cellpadding="0">
94                 <tr>
95                         <td>
96                                 <table width="100%" border="0" cellspacing="0" cellpadding="0">
97                                         <tr>
98                                                 <td width="15%" scope="row">
99                                                         {MOD.LBL_NAME} 
100                                                         <span class="required">
101                                                                 {APP.LBL_REQUIRED_SYMBOL}
102                                                         </span>
103                                                 </td>
104                                                 <td width="30%" >
105                                                         <input name='name' tabindex="10" type="text" size='30' maxlength="255" value="{NAME}">
106                                                 </td>
107                                                 <td width="15%" scope="row">
108                                                 </td>
109                                                 <td width="30%" >
110                                                 </td>
111                                         </tr>
112                                         <tr>
113                                                 <td width="15%" scope="row">
114                                                         {MOD.LBL_DESCRIPTION} 
115                                                 </td>
116                                                 <td colspan="3" >
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> 
118                                                 </td>
119                                         </tr>
120                                         <tr>
121                                                 <td colspan="4">
122                                                         &nbsp; 
123                                                 </td>
124                                         </tr>
125 <!-- BEGIN: NoInbound -->
126                                         <tr>
127                                                 <td width="15%" scope="row" align='left'>
128                                                         {MOD.LBL_INSERT_VARIABLE}&nbsp; 
129                                                 </td>
130                                                 <td width="30%"  colspan="3">
131                                                         <select name='variable_module' tabindex="40" onchange="addVariables(document.EditView.variable_name,this.options[this.selectedIndex].value);">
132                                                           {DROPDOWN}
133                                                         </select>
134                                                         <select name='variable_name' tabindex="50" onchange="showVariable();">
135                                                         </select>
136                                                         <span scope="row">
137                                                                 {MOD.LBL_USE}: 
138                                                         </span>
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 -->
143                                                 </td>
144                                         </tr>
145 <!-- BEGIN: tracker_url -->
146                                         <tr>
147                                                 <td width="15%" scope="row" align='left'>
148                                                         {MOD.LBL_INSERT_TRACKER_URL}&nbsp; 
149                                                 </td>
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}
153                                                         </select>
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}'>
156                                                 </td>
157                                         </tr>
158 <!-- END: tracker_url -->
159 <!-- END: NoInbound -->
160                                         <tr>
161                                                 <td width="15%" scope="row">
162                                                         {MOD.LBL_SUBJECT}
163                                                 </td>
164                                                 <td colspan='4' >
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> 
166                                                 </td>
167                                         </tr>
168                                         <tr>
169                                                 <td>&nbsp;</td>
170                                                 <td colspan='4'>
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                                                         &nbsp;{MOD.LBL_SEND_AS_TEXT}    
174                                                 </td>
175                                         </tr>
176                                         <tr>
177                                                 <td valign="top" scope="row">
178                                                         {MOD.LBL_BODY} 
179                                                 </td>
180
181 <!-- BEGIN: textarea -->
182                                                 <td colspan="4" >
183                                                         <div id='body_text_div'>
184                                                         <textarea id='body_text' tabindex='90' name='body_html' cols="100" rows="20">{BODY_HTML}</textarea>
185                                                         </div>
186                             <br>
187                                                         <div id='toggle_textarea_option'>
188                                 <input id='toggle_textarea_elem' onclick="toggle_textarea_edit(this);" type="button" name="toggle_html" value="{MOD.LBL_EDIT_ALT_TEXT}" /> 
189                             </div>
190                             <br>
191                             <div id="text_div" style="display: none">
192                                 <textarea tabindex='110' name='body' cols="100" rows="20" >{BODY}</textarea> 
193                             </div> 
194                                                 </td>
195 <!-- END: textarea -->
196                                         </tr>
197 <!-- BEGIN: NoInbound2 -->
198                                         <tr>
199                                                 <td valign="top" scope="row">
200                                                         {MOD.LBL_ATTACHMENTS}: 
201                                                 </td>
202                                                 <td colspan="2" nowrap>
203                                                         {ATTACHMENTS_JAVASCRIPT} {ATTACHMENTS} 
204                                                 </td>
205                                         </tr>
206 <!-- END: NoInbound2 -->
207                                 </table>
208                         </td>
209                 </tr>
210         </table>
211     </div>
212 </form>
213 <!-- BEGIN: NoInbound3 -->
214 <form id="upload_form" name="upload_form" method="POST" action='AttachDocuments.php' enctype="multipart/form-data">
215         <div id="upload_div">
216                 <input type="file" id="my_file" name="file_1" size="40" />
217                 <input type="hidden" id="documentName" name="uploaddoc" onchange="docUpload(); form_reset_doc();" size="1" />
218                 <input type="hidden" id="documentId" name="seldoc" tabindex="0" />
219                 <input type="hidden" id="docRevId" name="seldoc" tabindex="0" />
220                 <input type="hidden" id="documentType" name="seldoc" tabindex="0" />
221                 <input type="button" name="add_doc" onclick="selectDoc();" value='{MOD.LBL_SUGAR_DOCUMENT}' class="button" />
222         </div>
223         <div id="attachments_div">
224         </div>
225 </form>
226 <!-- END: NoInbound3 -->
227 {tiny}
228 <script type="text/javascript" language="javascript">
229 <!-- BEGIN: NoInbound4 -->
230 toggle_textarea_elem_values = ['{MOD.LBL_EDIT_ALT_TEXT}', '{MOD.LBL_HIDE_ALT_TEXT}'];
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);
236
237 function toggle_portal_flag() {
238         {TOGGLE_JS}
239 }
240 <!-- BEGIN: NoInbound5 -->
241 addVariables(document.EditView.variable_name,'{DEFAULT_MODULE}');
242 <!-- END: NoInbound5 -->
243 focus_obj = document.EditView.body;
244 toggle_portal_flag();
245 update_textarea_button();
246 </script>
247
248
249
250 <!-- END: main -->