PageRenderTime 45ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/modules/EmailTemplates/EditView.html

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