]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/DynamicFields/templates/Fields/Forms/datetimecombo.tpl
Release 6.5.0
[Github/sugarcrm.git] / modules / DynamicFields / templates / Fields / Forms / datetimecombo.tpl
1 {*
2
3 /*********************************************************************************
4  * SugarCRM Community Edition is a customer relationship management program developed by
5  * SugarCRM, Inc. Copyright (C) 2004-2012 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 {include file="modules/DynamicFields/templates/Fields/Forms/coreTop.tpl"}
42 {literal}
43 <script language="Javascript">
44         function timeValueUpdate(){
45                 var fieldname = 'defaultTime';
46                 var timeseparator = ':';
47                 var newtime = '';
48                 
49                 id = fieldname + '_hours';
50                 h = window.document.getElementById(id).value;
51                 id = fieldname + '_minutes';
52                 m = window.document.getElementById(id).value;
53                 
54                 id = fieldname + '_meridiem';
55                 ampm = '';
56                 if(document.getElementById(id)) {
57                    ampm = document.getElementById(id).value;
58                 }
59                 newtime = h + timeseparator + m + ampm;
60                 document.getElementById(fieldname).value = newtime;
61                 
62         }
63 </script>
64 {/literal}
65 <tr>
66         <td class='mbLBL'>{sugar_translate module="DynamicFields" label="COLUMN_TITLE_DEFAULT_VALUE"}:</td>
67         <td>
68         {if $hideLevel < 5}
69                 {html_options name='defaultDate' id='defaultDate_date' options=$default_values selected=$default_date}
70         {else}
71                 <input type='hidden' name='defaultDate' value='{$default_date}'>{$default_date}
72         {/if}
73         </td>
74 </tr>
75 <tr>
76         <td class='mbLBL'></td>
77         <td>
78         {if $hideLevel < 5}
79                   <div>
80                         {html_options name='defaultHours'  size='1' id='defaultTime_hours' options=$default_hours_values onchange="timeValueUpdate();"  selected=$default_hours}
81                    :
82                  {html_options  name='defaultMinutes'   size='1'  id='defaultTime_minutes' options=$default_minutes_values onchange="timeValueUpdate();"  selected=$default_minutes}
83                  {if $show_meridiem === true}
84                  {html_options  name='defaultMeridiem'  size='1'  id='defaultTime_meridiem' options=$default_meridiem_values onchange="timeValueUpdate();"  selected=$default_meridiem}
85                  {/if}
86                 </div>
87                 <input type='hidden' name='defaultTime' id='defaultTime' value="{$defaultTime}">
88         {else}
89                 <input type='hidden' name='defaultTime' id='defaultTime' value='{$defaultTime}'>{$defaultTime}
90         {/if}
91         </td>
92 </tr>
93 <tr>
94         <td class='mbLBL'>{sugar_translate module="DynamicFields" label="COLUMN_TITLE_MASS_UPDATE"}:</td>
95         <td>
96         {if $hideLevel < 5}
97                 <input type="checkbox" id="massupdate" name="massupdate" value="1" {if !empty($vardef.massupdate)}checked{/if}/>
98         {else}
99                 <input type="checkbox" id="massupdate" name="massupdate" value="1" disabled {if !empty($vardef.massupdate)}checked{/if}/>
100         {/if}
101         </td>
102 </tr>
103 {if $range_search_option_enabled}
104 <tr>    
105     <td class='mbLBL'>{sugar_translate module="DynamicFields" label="COLUMN_TITLE_ENABLE_RANGE_SEARCH"}:</td>
106     <td>
107         <input type='checkbox' name='enable_range_search' value=1 {if !empty($vardef.enable_range_search) }checked{/if} {if $hideLevel > 5}disabled{/if} />
108         {if $hideLevel > 5}<input type='hidden' name='enable_range_search' value='{$vardef.enable_range_search}'>{/if}
109     </td>       
110 </tr>
111 {/if}
112 <script>
113 addToValidateBinaryDependency('popup_form',"defaultDate_date", 'alpha', false, "{$APP.ERR_MISSING_REQUIRED_FIELDS} {$APP.LBL_DATE} {$APP.LBL_OR} {$APP.LBL_HOURS}" ,"defaultTime_hours");
114 addToValidateBinaryDependency('popup_form',"defaultTime_hours", 'alpha', false, "{$APP.ERR_MISSING_REQUIRED_FIELDS} {$APP.LBL_HOURS} {$APP.LBL_OR} {$APP.LBL_MINUTES}" ,"defaultTime_minutes");
115 addToValidateBinaryDependency('popup_form', "defaultTime_minutes", 'alpha', false, "{$APP.ERR_MISSING_REQUIRED_FIELDS} {$APP.LBL_MINUTES} {$APP.LBL_OR} {$APP.LBL_MERIDIEM}","defaultTime_meridiem");
116 </script>
117 {include file="modules/DynamicFields/templates/Fields/Forms/coreBottom.tpl"}