PageRenderTime 47ms CodeModel.GetById 19ms RepoModel.GetById 1ms app.codeStats 0ms

/modules/Tasks/tpls/QuickCreate.tpl

https://github.com/albertobraschi/SuperSweetAdmin
Smarty Template | 205 lines | 157 code | 7 blank | 41 comment | 13 complexity | a3e76184c8fd107945281b284ebc11fa MD5 | raw file
  1. {*
  2. /*********************************************************************************
  3. * SugarCRM 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. <form name="tasksQuickCreate" id="tasksQuickCreate" method="POST" action="index.php">
  38. <input type="hidden" name="module" value="Tasks">
  39. <input type="hidden" name="record" value="">
  40. <input type="hidden" name="lead_id" value="{$REQUEST.lead_id}">
  41. <input type="hidden" name="contact_id" value="{$REQUEST.contact_id}">
  42. <input type="hidden" name="contact_name" value="{$REQUEST.contact_name}">
  43. <input type="hidden" name="email_id" value="{$REQUEST.email_id}">
  44. <input type="hidden" name="account_id" value="{$REQUEST.account_id}">
  45. <input type="hidden" name="opportunity_id" value="{$REQUEST.opportunity_id}">
  46. <input type="hidden" name="acase_id" value="{$REQUEST.acase_id}">
  47. <input type="hidden" name="return_action" value="{$REQUEST.return_action}">
  48. <input type="hidden" name="return_module" value="{$REQUEST.return_module}">
  49. <input type="hidden" name="return_id" value="{$REQUEST.return_id}">
  50. <input type="hidden" name="action" value='Save'>
  51. <input type="hidden" name="duplicate_parent_id" value="{$REQUEST.duplicate_parent_id}">
  52. <!--
  53. CL: Bug fix for 9291 and 9427 - parent_id should be parent_type, not the module type (if set)
  54. -->
  55. {if $REQUEST.parent_id}
  56. <input type="hidden" name="parent_id" value="{$REQUEST.parent_id}">
  57. {else}
  58. <input type="hidden" name="parent_id" value="{$REQUEST.return_id}">
  59. {/if}
  60. {if $REQUEST.parent_type}
  61. <input type="hidden" name="parent_type" value="{$REQUEST.parent_type}">
  62. {else}
  63. <input type="hidden" name="parent_type" value="{$REQUEST.return_module}">
  64. {/if}
  65. <input type="hidden" name="parent_name" value="{$REQUEST.parent_name}">
  66. <input id='assigned_user_id' name='assigned_user_id' type="hidden" value="{$ASSIGNED_USER_ID}" />
  67. <input type="hidden" name="to_pdf" value='1'>
  68. <table width="100%" cellpadding="0" cellspacing="0" border="0">
  69. <tr>
  70. <td align="left" style="padding-bottom: 2px;">
  71. <input title="{$APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button" type="submit" name="button" {$saveOnclick|default:"onclick=\"return check_form('TasksQuickCreate');\""} value=" {$APP.LBL_SAVE_BUTTON_LABEL} " >
  72. <input title="{$APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" type="submit" name="button" {$cancelOnclick|default:"onclick=\"this.form.action.value='$RETURN_ACTION'; this.form.module.value='$RETURN_MODULE'; this.form.record.value='$RETURN_ID'\""} value=" {$APP.LBL_CANCEL_BUTTON_LABEL} ">
  73. <input title="{$APP.LBL_FULL_FORM_BUTTON_TITLE}" accessKey="{$APP.LBL_FULL_FORM_BUTTON_KEY}" class="button" type="submit" name="button" onclick="this.form.to_pdf.value='0';this.form.action.value='EditView'; this.form.module.value='Tasks';" value=" {$APP.LBL_FULL_FORM_BUTTON_LABEL} "></td>
  74. <td align="right" nowrap><span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span> {$APP.NTC_REQUIRED}</td>
  75. </tr>
  76. </table>
  77. <table width="100%" border="0" cellspacing="0" cellpadding="0" class="edit view">
  78. <tr>
  79. <td>
  80. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  81. <tr>
  82. <th align="left" scope="row" colspan="4"><h4><slot>{$MOD.LBL_NEW_FORM_TITLE}</slot></h4></th>
  83. </tr>
  84. <tr>
  85. <td valign="top" scope="row" rowspan="2"><slot>{$MOD.LBL_SUBJECT} <span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></slot></td>
  86. <td rowspan="2"><slot><textarea name='name' cols="50" tabindex='1' rows="1">{$NAME}</textarea></slot></td>
  87. <td scope="row" width="15%"><slot>{$MOD.LBL_PRIORITY} <span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></slot></td>
  88. <td nowrap width="35%"><slot><select tabindex='2' name='priority'>{$PRIORITY_OPTIONS}</select></slot></td>
  89. </tr>
  90. <tr>
  91. <td scope="row" width="15%"><slot>{$MOD.LBL_STATUS} <span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></slot></td>
  92. <td width="35%"><slot><select tabindex='2' name='status'>{$STATUS_OPTIONS}</select></slot></td>
  93. </tr>
  94. <tr>
  95. <td valign="top" scope="row" rowspan="2"><slot>{$MOD.LBL_DESCRIPTION}</slot></td>
  96. <td rowspan="2"><slot><textarea name='description' tabindex='1' cols="50" rows="4">{$DESCRIPTION}</textarea></slot></td>
  97. <td scope="row"><slot>{$MOD.LBL_DUE_DATE_AND_TIME}</slot></td>
  98. <td nowrap="nowrap"><slot>
  99. <table border="0" cellpadding="0" cellspacing="0">
  100. <tr>
  101. <td nowrap="nowrap"><input name='date_due' id='jscal_field' onblur="parseDate(this, '{$USER_DATEFORMAT}');" tabindex='2' maxlength='10' size='11' {$READONLY} type="text" value="{$DATE_DUE}">
  102. <img src="{sugar_getimagepath file='jscalendar.gif'}" alt="{$APP.LBL_ENTER_DATE}" id="jscal_trigger" align="absmiddle">&nbsp;</td>
  103. <td nowrap="nowrap"><input name='time_due' size='5' maxlength='5' tabindex='2' {$READONLY} type="text" value='{$TIME_DUE}'>{$DUE_TIME_MERIDIEM} </td>
  104. {if $TIME_MERIDIEM}
  105. <td><select name='due_meridiem' tabindex="2">{$TIME_MERIDIEM}</select></td>
  106. {/if}
  107. <td nowrap="nowrap">&nbsp;<input name='date_due_flag'class="checkbox" type='checkbox' tabindex="1" onClick="set_date_due_values(this.form);">&nbsp;{$MOD.LBL_NONE}</td>
  108. </tr>
  109. <tr>
  110. <td nowrap="nowrap"><span class="dateFormat">{$USER_DATEFORMAT}</span></td>
  111. <td nowrap="nowrap"><span class="dateFormat">{$TIME_FORMAT}</span></td>
  112. </tr>
  113. </table></slot>
  114. </td>
  115. </tr>
  116. <tr>
  117. <td scope="row"><slot>{$MOD.LBL_START_DATE_AND_TIME}</slot></td>
  118. <td nowrap="nowrap"><slot>
  119. <table border="0" cellpadding="0" cellspacing="0">
  120. <tr>
  121. <td nowrap="nowrap"><input name='date_start' id='date_start' onblur="parseDate(this, '{$CALENDAR_DATEFORMAT}');" tabindex='2' maxlength='10' size='11' {$READONLY} type="text" value="{$DATE_START}"> <img src="{sugar_getimagepath file='jscalendar.gif'}" alt="{$APP.LBL_ENTER_DATE}" id="date_start_trigger" align="absmiddle">&nbsp;</td>
  122. <td nowrap="nowrap"><input name='time_start' size='5' maxlength='5' tabindex='2' {$READONLY} type="text" value='{$TIME_START}'>{$START_TIME_MERIDIEM} </td>
  123. {if $TIME_MERIDIEM}
  124. <td><select name='start_meridiem' tabindex="2">{$TIME_MERIDIEM}</select></td>
  125. {/if}
  126. <td nowrap="nowrap">&nbsp;<input name='date_start_flag' class="checkbox" type='checkbox' tabindex="1" onClick="set_date_start_values(this.form);">&nbsp;{$MOD.LBL_NONE}</td>
  127. </tr>
  128. <tr>
  129. <td nowrap="nowrap"><span class="dateFormat">{$USER_DATEFORMAT}</span></td>
  130. <td nowrap="nowrap"><span class="dateFormat">{$TIME_FORMAT}</span></td>
  131. </tr>
  132. </table></slot>
  133. </td>
  134. </tr>
  135. </table>
  136. </form>
  137. <script type="text/javascript">
  138. {literal}
  139. Calendar.setup ({
  140. inputField : "jscal_field", daFormat : "{/literal}{$CALENDAR_FORMAT}{literal}", showsTime : false, button : "jscal_trigger", singleClick : true, step : 1, weekNumbers:false
  141. });
  142. Calendar.setup ({
  143. inputField : "date_start", daFormat : "{/literal}{$CALENDAR_FORMAT}{literal}", showsTime : false, button : "date_start_trigger", singleClick : true, step : 1, weekNumbers:false
  144. });
  145. {/literal}
  146. {$additionalScripts}
  147. </script>
  148. <script type="text/javascript">
  149. {literal}
  150. function set_date_due_values(form) {
  151. if (form.date_due_flag.checked) {
  152. form.date_due_flag.value='on';
  153. form.date_due.value="";
  154. form.time_due.value="";
  155. form.date_due.readOnly=true;
  156. form.time_due.readOnly=true;
  157. if(typeof(form.due_meridiem) != 'undefined') form.due_meridiem.disabled=true;
  158. document.images.jscal_trigger.width = 18;
  159. document.images.jscal_trigger.height = 18;
  160. }
  161. else {
  162. form.date_due_flag.value='off';
  163. form.date_due.readOnly=false;
  164. form.time_due.readOnly=false;
  165. if(typeof(form.due_meridiem) != 'undefined') form.due_meridiem.disabled=false;
  166. document.images.jscal_trigger.width = 18;
  167. document.images.jscal_trigger.height = 18;
  168. }
  169. }
  170. function set_date_start_values(form) {
  171. if (form.date_start_flag.checked) {
  172. form.date_start_flag.value='on';
  173. form.date_start.value="";
  174. form.time_start.value="";
  175. form.date_start.readOnly=true;
  176. form.time_start.readOnly=true;
  177. if(typeof(form.start_meridiem) != 'undefined') form.start_meridiem.disabled=true;
  178. document.images.date_start_trigger.width = 18;
  179. document.images.date_start_trigger.height = 18;
  180. }
  181. else {
  182. form.date_start_flag.value='off';
  183. form.date_start.readOnly=false;
  184. form.time_start.readOnly=false;
  185. if(typeof(form.start_meridiem) != 'undefined') form.start_meridiem.disabled=false;
  186. document.images.date_start_trigger.width = 18;
  187. document.images.date_start_trigger.height = 18;
  188. }
  189. }
  190. {/literal}
  191. set_date_due_values(document.tasksQuickCreate);
  192. set_date_start_values(document.tasksQuickCreate);
  193. </script>