3 /*********************************************************************************
4 * SugarCRM Community Edition is a customer relationship management program developed by
5 * SugarCRM, Inc. Copyright (C) 2004-2012 SugarCRM Inc.
7 * This program is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU Affero General Public License version 3 as published by the
9 * Free Software Foundation with the addition of the following permission added
10 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
11 * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
12 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
14 * This program is distributed in the hope that it will be useful, but WITHOUT
15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16 * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
19 * You should have received a copy of the GNU Affero General Public License along with
20 * this program; if not, see http://www.gnu.org/licenses or write to the Free
21 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
24 * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
25 * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
27 * The interactive user interfaces in modified source and object code versions
28 * of this program must display Appropriate Legal Notices, as required under
29 * Section 5 of the GNU Affero General Public License version 3.
31 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
32 * these Appropriate Legal Notices must retain the display of the "Powered by
33 * SugarCRM" logo. If the display of the logo is not reasonably feasible for
34 * technical reasons, the Appropriate Legal Notices must display the words
35 * "Powered by SugarCRM".
36 ********************************************************************************/
44 <form name="tasksQuickCreate" id="tasksQuickCreate" method="POST" action="index.php">
45 <input type="hidden" name="module" value="Tasks">
46 <input type="hidden" name="record" value="">
47 <input type="hidden" name="lead_id" value="{$REQUEST.lead_id}">
48 <input type="hidden" name="contact_id" value="{$REQUEST.contact_id}">
49 <input type="hidden" name="contact_name" value="{$REQUEST.contact_name}">
50 <input type="hidden" name="email_id" value="{$REQUEST.email_id}">
51 <input type="hidden" name="account_id" value="{$REQUEST.account_id}">
52 <input type="hidden" name="opportunity_id" value="{$REQUEST.opportunity_id}">
53 <input type="hidden" name="acase_id" value="{$REQUEST.acase_id}">
54 <input type="hidden" name="return_action" value="{$REQUEST.return_action}">
55 <input type="hidden" name="return_module" value="{$REQUEST.return_module}">
56 <input type="hidden" name="return_id" value="{$REQUEST.return_id}">
57 <input type="hidden" name="action" value='Save'>
58 <input type="hidden" name="duplicate_parent_id" value="{$REQUEST.duplicate_parent_id}">
60 CL: Bug fix for 9291 and 9427 - parent_id should be parent_type, not the module type (if set)
62 {if $REQUEST.parent_id}
63 <input type="hidden" name="parent_id" value="{$REQUEST.parent_id}">
65 <input type="hidden" name="parent_id" value="{$REQUEST.return_id}">
67 {if $REQUEST.parent_type}
68 <input type="hidden" name="parent_type" value="{$REQUEST.parent_type}">
70 <input type="hidden" name="parent_type" value="{$REQUEST.return_module}">
72 <input type="hidden" name="parent_name" value="{$REQUEST.parent_name}">
73 <input id='assigned_user_id' name='assigned_user_id' type="hidden" value="{$ASSIGNED_USER_ID}" />
74 <input type="hidden" name="to_pdf" value='1'>
75 <table width="100%" cellpadding="0" cellspacing="0" border="0">
77 <td align="left" style="padding-bottom: 2px;">
78 <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} " >
79 <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} ">
80 <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>
81 <td align="right" nowrap><span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span> {$APP.NTC_REQUIRED}</td>
84 <table width="100%" border="0" cellspacing="0" cellpadding="0" class="edit view">
87 <table width="100%" border="0" cellspacing="0" cellpadding="0">
89 <th align="left" scope="row" colspan="4"><h4><slot>{$MOD.LBL_NEW_FORM_TITLE}</slot></h4></th>
92 <td valign="top" scope="row" rowspan="2"><slot>{$MOD.LBL_SUBJECT} <span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></slot></td>
93 <td rowspan="2"><slot><textarea name='name' cols="50" tabindex='1' rows="1">{$NAME}</textarea></slot></td>
94 <td scope="row" width="15%"><slot>{$MOD.LBL_PRIORITY} <span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></slot></td>
95 <td nowrap width="35%"><slot><select tabindex='2' name='priority'>{$PRIORITY_OPTIONS}</select></slot></td>
98 <td scope="row" width="15%"><slot>{$MOD.LBL_STATUS} <span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></slot></td>
99 <td width="35%"><slot><select tabindex='2' name='status'>{$STATUS_OPTIONS}</select></slot></td>
102 <td valign="top" scope="row" rowspan="2"><slot>{$MOD.LBL_DESCRIPTION}</slot></td>
103 <td rowspan="2"><slot><textarea name='description' tabindex='1' cols="50" rows="4">{$DESCRIPTION}</textarea></slot></td>
104 <td scope="row"><slot>{$MOD.LBL_DUE_DATE_AND_TIME}</slot></td>
105 <td nowrap="nowrap"><slot>
106 <table border="0" cellpadding="0" cellspacing="0">
108 <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}">
109 {sugar_getimage name="jscalendar" ext=".gif" alt=$APP.LBL_ENTER_DATE other_attributes='align="absmiddle" id="jscal_trigger" '} </td>
110 <td nowrap="nowrap"><input name='time_due' size='5' maxlength='5' tabindex='2' {$READONLY} type="text" value='{$TIME_DUE}'>{$DUE_TIME_MERIDIEM} </td>
112 <td><select name='due_meridiem' tabindex="2">{$TIME_MERIDIEM}</select></td>
114 <td nowrap="nowrap"> <input name='date_due_flag'class="checkbox" type='checkbox' tabindex="1" onClick="set_date_due_values(this.form);"> {$MOD.LBL_NONE}</td>
117 <td nowrap="nowrap"><span class="dateFormat">{$USER_DATEFORMAT}</span></td>
118 <td nowrap="nowrap"><span class="dateFormat">{$TIME_FORMAT}</span></td>
124 <td scope="row"><slot>{$MOD.LBL_START_DATE_AND_TIME}</slot></td>
125 <td nowrap="nowrap"><slot>
126 <table border="0" cellpadding="0" cellspacing="0">
128 <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}"> {sugar_getimage name="jscalendar" ext=".gif" alt=$APP.LBL_ENTER_DATE other_attributes='align="absmiddle" id="date_start_trigger" '} </td>
129 <td nowrap="nowrap"><input name='time_start' size='5' maxlength='5' tabindex='2' {$READONLY} type="text" value='{$TIME_START}'>{$START_TIME_MERIDIEM} </td>
131 <td><select name='start_meridiem' tabindex="2">{$TIME_MERIDIEM}</select></td>
133 <td nowrap="nowrap"> <input name='date_start_flag' class="checkbox" type='checkbox' tabindex="1" onClick="set_date_start_values(this.form);"> {$MOD.LBL_NONE}</td>
136 <td nowrap="nowrap"><span class="dateFormat">{$USER_DATEFORMAT}</span></td>
137 <td nowrap="nowrap"><span class="dateFormat">{$TIME_FORMAT}</span></td>
145 <script type="text/javascript">
148 inputField : "jscal_field", daFormat : "{/literal}{$CALENDAR_FORMAT}{literal}", showsTime : false, button : "jscal_trigger", singleClick : true, step : 1, startWeekday: {/literal}{$CALENDAR_FDOW|default:'0'}{literal}, weekNumbers:false
151 inputField : "date_start", daFormat : "{/literal}{$CALENDAR_FORMAT}{literal}", showsTime : false, button : "date_start_trigger", singleClick : true, step : 1, startWeekday: {/literal}{$CALENDAR_FDOW|default:'0'}{literal}, weekNumbers:false
157 <script type="text/javascript">
159 function set_date_due_values(form) {
160 if (form.date_due_flag.checked) {
161 form.date_due_flag.value='on';
162 form.date_due.value="";
163 form.time_due.value="";
164 form.date_due.readOnly=true;
165 form.time_due.readOnly=true;
166 if(typeof(form.due_meridiem) != 'undefined') form.due_meridiem.disabled=true;
167 document.images.jscal_trigger.width = 18;
168 document.images.jscal_trigger.height = 18;
172 form.date_due_flag.value='off';
173 form.date_due.readOnly=false;
174 form.time_due.readOnly=false;
176 if(typeof(form.due_meridiem) != 'undefined') form.due_meridiem.disabled=false;
177 document.images.jscal_trigger.width = 18;
178 document.images.jscal_trigger.height = 18;
182 function set_date_start_values(form) {
183 if (form.date_start_flag.checked) {
184 form.date_start_flag.value='on';
185 form.date_start.value="";
186 form.time_start.value="";
187 form.date_start.readOnly=true;
188 form.time_start.readOnly=true;
189 if(typeof(form.start_meridiem) != 'undefined') form.start_meridiem.disabled=true;
190 document.images.date_start_trigger.width = 18;
191 document.images.date_start_trigger.height = 18;
194 form.date_start_flag.value='off';
195 form.date_start.readOnly=false;
196 form.time_start.readOnly=false;
197 if(typeof(form.start_meridiem) != 'undefined') form.start_meridiem.disabled=false;
198 document.images.date_start_trigger.width = 18;
199 document.images.date_start_trigger.height = 18;
203 set_date_due_values(document.tasksQuickCreate);
204 set_date_start_values(document.tasksQuickCreate);