]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/EmailTemplates/EditView.html
Release 6.5.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-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" src="cache/include/javascript/sugar_grp1.js?v={VERSION_MARK}"></script>
47 {JSLANG}
48 <script type="text/javascript" language="Javascript" src="modules/Emails/javascript/Email.js?v={VERSION_MARK}"></script>
49 <script type="text/javascript" language="Javascript" src="modules/EmailTemplates/EmailTemplate.js?v={VERSION_MARK}"></script>
50 <script type="text/javascript">
51         {FIELD_DEFS_JS}
52 </script>
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     <input type="hidden" name="type" value="campaign">
65
66         <table width="100%" cellpadding="0" cellspacing="0" border="0">
67                 <tr>
68                         <td>
69                                 <input title="{APP.LBL_SAVE_BUTTON_TITLE}" accesskey="{APP.LBL_SAVE_BUTTON_KEY}" class="button primary"
70                                         onclick="       this.form.action.value='Save';
71 <!-- BEGIN: NoInbound1 -->
72                                                                 addUploadFiles('EditView');
73                                                                 addUploadDocs('EditView');
74 <!-- END: NoInbound1 -->
75                                                                 return check_form('EditView');"
76                                         type="submit" name="button" value="{APP.LBL_SAVE_BUTTON_LABEL}" id="SAVE">
77                                 <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">
78                         </td>
79                         <td align="right" nowrap>
80                                 <span class="required">
81                                         {APP.LBL_REQUIRED_SYMBOL}
82                                 </span>
83                                 {APP.NTC_REQUIRED}
84                         </td>
85                         <td align='right'>
86                                 {ADMIN_EDIT}
87                         </td>
88                 </tr>
89         </table>
90     <div class="edit view">
91         <table width="100%" border="0" cellspacing="0" cellpadding="0">
92                 <tr>
93                         <td>
94                                 <table width="100%" border="0" cellspacing="0" cellpadding="0">
95                                         <tr>
96                                                 <td width="15%" scope="row">
97                                                         {MOD.LBL_NAME}
98                                                         <span class="required">
99                                                                 {APP.LBL_REQUIRED_SYMBOL}
100                                                         </span>
101                                                 </td>
102                                                 <td width="30%" >
103                                                         <input id='name' name='name' tabindex="0" type="text" size='30' maxlength="255" value="{NAME}">
104                                                 </td>
105                                                 <td width="15%" scope="row">
106                                                 </td>
107                                                 <td width="30%" >
108                                                 </td>
109                                         </tr>
110                     <tr>
111                         <td width="15%" scope="row">
112                          {MOD.LBL_TYPE}
113                         </td>
114                         <td width="30%" >
115                             <select name='type' tabindex="11">{TYPEDROPDOWN}</select>
116                         </td>
117                     </tr>
118                                         <tr>
119                                                 <td width="15%" scope="row">
120                                                         {MOD.LBL_DESCRIPTION}
121                                                 </td>
122                                                 <td colspan="3" >
123                                                         <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>
124                                                 </td>
125                                         </tr>
126                                         <tr>
127                                                 <td colspan="4">
128                                                         &nbsp;
129                                                 </td>
130                                         </tr>
131 <!-- BEGIN: NoInbound -->
132                                         <tr>
133                                                 <td width="15%" scope="row" align='left'>
134                                                         {MOD.LBL_INSERT_VARIABLE}&nbsp;
135                                                 </td>
136                                                 <td width="30%"  colspan="3">
137                                                         <select name='variable_module' tabindex="0" onchange="addVariables(document.EditView.variable_name,this.options[this.selectedIndex].value);">
138                                                           {DROPDOWN}
139                                                         </select>
140                                                         <select name='variable_name' tabindex="0" onchange="showVariable();">
141                                                         </select>
142                                                         <span scope="row">
143                                                                 {MOD.LBL_USE}:
144                                                         </span>
145                                                         <input type="text" size="30" tabindex="0" name="variable_text" />
146 <!-- BEGIN: variable_button -->
147                                                         <input type='button' tabindex="0" onclick='{INSERT_VARIABLE_ONCLICK}' class='button' value='{MOD.LBL_INSERT}'>
148 <!-- END: variable_button -->
149                                                 </td>
150                                         </tr>
151 <!-- BEGIN: tracker_url -->
152                                         <tr>
153                                                 <td width="15%" scope="row" align='left'>
154                                                         {MOD.LBL_INSERT_TRACKER_URL}&nbsp;
155                                                 </td>
156                                                 <td width="85%" colspan="3" valign="top" >
157                                                         <select tabindex='0' name='tracker_url' onchange='this.form.url_text.value=this.value'>
158                                                                 {TRACKER_KEY_OPTIONS}
159                                                         </select>
160                                                         <input type="text" size="30" id="url_text" name="url_text" value="{DEFAULT_URL_TEXT}" />
161                                                         <input type='button' tabindex="0" onclick='{INSERT_URL_ONCLICK}' class='button' value='{MOD.LBL_INSERT_URL_REF}'>
162                                                 </td>
163                                         </tr>
164 <!-- END: tracker_url -->
165 <!-- END: NoInbound -->
166                                         <tr>
167                                                 <td width="15%" scope="row">
168                                                         {MOD.LBL_SUBJECT}
169                                                 </td>
170                                                 <td colspan='4' >
171                                                         <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>
172                                                 </td>
173                                         </tr>
174                                         <tr>
175                                                 <td>&nbsp;</td>
176                                                 <td colspan='4'>
177                                                 <input  name="toggle_textonly"  id="toggle_textonly" onclick="toggle_text_only();" type="checkbox" {TEXTONLY_CHECKED}/>
178                                                 <input  name="text_only"  id="text_only"  type="hidden" value='{TEXTONLY_VALUE}'/>
179                                                         &nbsp;{MOD.LBL_SEND_AS_TEXT}
180                                                 </td>
181                                         </tr>
182                                         <tr>
183                                                 <td valign="top" scope="row">
184                                                         {MOD.LBL_BODY}
185                                                 </td>
186
187 <!-- BEGIN: textarea -->
188                                                 <td colspan="4" >
189                                                         <div id='body_text_div'>
190                                                         <textarea id='body_text' tabindex='0' name='body_html' cols="100" rows="20">{BODY_HTML}</textarea>
191                                                         </div>
192                             <br>
193                                                         <div id='toggle_textarea_option'>
194                                 <input id='toggle_textarea_elem' onclick="toggle_textarea_edit(this);" type="button" name="toggle_html" value="{MOD.LBL_EDIT_ALT_TEXT}" />
195                             </div>
196                             <br>
197                             <div id="text_div" style="display: none">
198                                 <textarea tabindex='0' name='body' cols="100" rows="20" >{BODY}</textarea>
199                             </div>
200                                                 </td>
201 <!-- END: textarea -->
202                                         </tr>
203 <!-- BEGIN: NoInbound2 -->
204                                         <tr>
205                                                 <td valign="top" scope="row">
206                                                         {MOD.LBL_ATTACHMENTS}:
207                                                 </td>
208                                                 <td colspan="2" nowrap>
209                                                         {ATTACHMENTS_JAVASCRIPT} {ATTACHMENTS}
210                                                 </td>
211                                         </tr>
212 <!-- END: NoInbound2 -->
213                                 </table>
214                         </td>
215                 </tr>
216         </table>
217     </div>
218 </form>
219 <!-- BEGIN: NoInbound3 -->
220 <form id="upload_form" name="upload_form" method="POST" action='AttachDocuments.php' enctype="multipart/form-data">
221         <div id="upload_div">
222                 <input type="file" id="my_file" name="file_1" size="40" />
223                 <input type="hidden" id="documentName" name="uploaddoc" onchange="docUpload(); form_reset_doc();" size="1" />
224                 <input type="hidden" id="documentId" name="seldoc" tabindex="0" />
225                 <input type="hidden" id="docRevId" name="seldoc" tabindex="0" />
226                 <input type="hidden" id="documentType" name="seldoc" tabindex="0" />
227                 <input type="button" name="add_doc" id="add_doc" onclick="selectDoc();" value='{MOD.LBL_SUGAR_DOCUMENT}' class="button" />
228         </div>
229         <div id="attachments_div">
230         </div>
231 </form>
232 <!-- END: NoInbound3 -->
233 {tiny}
234 <script type="text/javascript" language="javascript">
235 <!-- BEGIN: NoInbound4 -->
236 toggle_textarea_elem_values = ['{MOD.LBL_EDIT_ALT_TEXT}', '{MOD.LBL_HIDE_ALT_TEXT}'];
237
238 if(document.getElementById('upload_form') != null){
239     var multi_selector = new multiFiles(document.getElementById('upload_div'));
240     multi_selector.addElement( document.getElementById('my_file'));
241 }
242 <!-- END: NoInbound4 -->
243 //call the function on load, this will hide the tinyMCE editor if needed
244 toggle_text_only(true);
245
246 function toggle_portal_flag() {
247         {TOGGLE_JS}
248 }
249 <!-- BEGIN: NoInbound5 -->
250 addVariables(document.EditView.variable_name,'{DEFAULT_MODULE}');
251 <!-- END: NoInbound5 -->
252 focus_obj = document.EditView.body;
253 toggle_portal_flag();
254 update_textarea_button();
255 </script>
256
257
258
259 <!-- END: main -->