]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/Tasks/tpls/QuickCreate.tpl
Release 6.4.0
[Github/sugarcrm.git] / modules / Tasks / tpls / QuickCreate.tpl
1 {*
2
3 /*********************************************************************************
4  * SugarCRM Community Edition is a customer relationship management program developed by
5  * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
6  * 
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.
13  * 
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
17  * details.
18  * 
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
22  * 02110-1301 USA.
23  * 
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.
26  * 
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.
30  * 
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  ********************************************************************************/
37
38
39
40
41 *}
42
43
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}">
59 <!--
60 CL: Bug fix for 9291 and 9427 - parent_id should be parent_type, not the module type (if set)
61 -->
62 {if $REQUEST.parent_id}
63         <input type="hidden" name="parent_id" value="{$REQUEST.parent_id}">
64 {else}
65         <input type="hidden" name="parent_id" value="{$REQUEST.return_id}">
66 {/if}
67 {if $REQUEST.parent_type}
68         <input type="hidden" name="parent_type" value="{$REQUEST.parent_type}">
69 {else}
70         <input type="hidden" name="parent_type" value="{$REQUEST.return_module}">
71 {/if}
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">
76         <tr>
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>
82         </tr>
83 </table>
84 <table width="100%" border="0" cellspacing="0" cellpadding="0" class="edit view">
85 <tr>
86 <td>
87         <table width="100%" border="0" cellspacing="0" cellpadding="0">
88         <tr>
89         <th align="left" scope="row" colspan="4"><h4><slot>{$MOD.LBL_NEW_FORM_TITLE}</slot></h4></th>
90         </tr>
91         <tr>
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>
96         </tr>
97         <tr>
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>
100         </tr>
101         <tr>
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">
107                 <tr>
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" '}&nbsp;</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>
111                 {if $TIME_MERIDIEM}
112         <td><select name='due_meridiem' tabindex="2">{$TIME_MERIDIEM}</select></td>
113         {/if}
114         <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>
115                 </tr>
116                 <tr>
117                 <td nowrap="nowrap"><span class="dateFormat">{$USER_DATEFORMAT}</span></td>
118                 <td nowrap="nowrap"><span class="dateFormat">{$TIME_FORMAT}</span></td>
119                 </tr>
120         </table></slot>
121         </td>
122         </tr>
123         <tr>
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">
127                 <tr>
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" '}&nbsp;</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>
130                 {if $TIME_MERIDIEM}
131         <td><select name='start_meridiem' tabindex="2">{$TIME_MERIDIEM}</select></td>
132         {/if}
133         <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>
134                 </tr>
135                 <tr>
136                 <td nowrap="nowrap"><span class="dateFormat">{$USER_DATEFORMAT}</span></td>
137                 <td nowrap="nowrap"><span class="dateFormat">{$TIME_FORMAT}</span></td>
138                 </tr>
139                 </table></slot>
140         </td>
141
142         </tr>
143         </table>
144         </form>
145 <script type="text/javascript">
146 {literal}
147 Calendar.setup ({
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
149 });
150 Calendar.setup ({
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
152 });
153 {/literal}
154         {$additionalScripts}
155 </script>
156
157 <script type="text/javascript">
158 {literal}
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;
169
170         }
171         else {
172                 form.date_due_flag.value='off';
173                 form.date_due.readOnly=false;
174                 form.time_due.readOnly=false;
175
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;
179         }
180 }
181
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;
192         }
193         else {
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;
200         }
201 }
202 {/literal}
203 set_date_due_values(document.tasksQuickCreate);
204 set_date_start_values(document.tasksQuickCreate);
205 </script>