]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/Users/SetTimezone.tpl
Release 6.5.0
[Github/sugarcrm.git] / modules / Users / SetTimezone.tpl
1 <!--
2 /*********************************************************************************
3  * SugarCRM Community Edition is a customer relationship management program developed by
4  * SugarCRM, Inc. Copyright (C) 2004-2012 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  ********************************************************************************/
40 -->
41 <!-- BEGIN: main -->
42 <div class="dashletPanelMenu" style="width: 500px; margin: 20px auto;">
43 <div class="hd"><div class="tl"></div><div class="hd-center"></div><div class="tr"></div></div>
44 <div class="bd" style="padding-top: 0px; padding-bottom: 0;">
45 <div class="ml"></div>
46 <div class="bd-center">
47 <form name="EditView" method="POST" action="index.php?module=Users&action=SaveTimezone&SaveTimezone=True">
48         <input type="hidden" value="{$USER_ID}" name="record">
49         <input type="hidden" name="module" value="Users">
50         <input type="hidden" name="action" value="SaveTimezone">
51         <input type="hidden" name="SaveTimezone" value="true">
52
53 <table class="subMenuTD" style="padding: 8px; border: 2px solid #999; background-color: #fff;" cellpadding="0" cellspacing="2" border="0" align="center" width="440">
54         <tr>
55                 <td colspan="2" width="100%"></td>
56         </tr>
57         <tr>
58                 <td colspan="2" width="100%" style="font-size: 12px; padding-bottom: 5px;">
59                         <table width="100%" border="0">
60                         <tr>
61                                 <td colspan="2"><slot>{$MOD.LBL_PICK_TZ_DESCRIPTION}</slot></td>
62                         </tr>
63                         </table>
64                         <br><br>
65                         <slot><select tabindex='3' name='timezone'>{html_options options=$TIMEZONEOPTIONS selected=$TIMEZONE_CURRENT}</select></slot>
66                         <input  title="{$APP.LBL_SAVE_BUTTON_TITLE}"
67                                         accessKey="{$APP.LBL_SAVE_BUTTON_KEY}"
68                                         class="button primary"
69                                         type="submit"
70                                         name="button"
71                                         value="  {$APP.LBL_SAVE_BUTTON_LABEL}  " ><br />
72                         {* <span class="dateFormat">{$MOD.LBL_DST_INSTRUCTIONS}</span> *}
73                 </td>
74         </tr>
75 </table>
76 </form>
77 </div>
78 <div class="mr"></div>
79 </div>
80 <div class="ft"><div class="bl"></div><div class="ft-center"></div><div class="br"></div></div>
81 </div>
82 {literal}
83 <script type="text/javascript" language="JavaScript">
84 <!--
85 lookupTimezone = function() {
86     var success = function(data) {
87         eval(data.responseText);
88         if(typeof userTimezone != 'undefined') {
89             document.EditView.timezone.value = userTimezone;
90         }
91     }
92
93     var now = new Date();
94     now = new Date(now.toString()); // reset milliseconds
95     var nowGMTString = now.toGMTString();
96     var nowGMT = new Date(nowGMTString.substring(0, nowGMTString.lastIndexOf(' ')));
97     offset = ((now - nowGMT) / (1000 * 60));
98     url = 'index.php?module=Users&action=SetTimezone&to_pdf=1&userOffset=' + offset;
99     var cObj = YAHOO.util.Connect.asyncRequest('GET', url, {success: success, failure: success});
100 }
101 YAHOO.util.Event.addListener(window, 'load', lookupTimezone);
102 -->
103 </script>
104 {/literal}