]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/Users/tpls/EditViewHeader.tpl
Release 6.5.6
[Github/sugarcrm.git] / modules / Users / tpls / EditViewHeader.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 {$ROLLOVER}
41 <script type="text/javascript" src="{sugar_getjspath file='modules/Emails/javascript/vars.js'}"></script>
42 <script type="text/javascript" src="{sugar_getjspath file='cache/include/javascript/sugar_grp_emails.js'}"></script>
43 <link rel="stylesheet" type="text/css" href="{sugar_getjspath file='modules/Users/PasswordRequirementBox.css'}">
44 <script type="text/javascript" src="{sugar_getjspath file='cache/include/javascript/sugar_grp_yui_widgets.js'}"></script>
45 <script type='text/javascript' src='{sugar_getjspath file='include/SubPanel/SubPanelTiles.js'}'></script>
46 <script type='text/javascript'>
47 var ERR_RULES_NOT_MET = '{$MOD.ERR_RULES_NOT_MET}';
48 var ERR_ENTER_OLD_PASSWORD = '{$MOD.ERR_ENTER_OLD_PASSWORD}';
49 var ERR_ENTER_NEW_PASSWORD = '{$MOD.ERR_ENTER_NEW_PASSWORD}';
50 var ERR_ENTER_CONFIRMATION_PASSWORD = '{$MOD.ERR_ENTER_CONFIRMATION_PASSWORD}';
51 var ERR_REENTER_PASSWORDS = '{$MOD.ERR_REENTER_PASSWORDS}';
52 </script>
53 <script type='text/javascript' src='{sugar_getjspath file='modules/Users/User.js'}'></script>
54 <script type='text/javascript' src='{sugar_getjspath file='modules/Users/UserEditView.js'}'></script>
55 <script type='text/javascript' src='{sugar_getjspath file='modules/Users/PasswordRequirementBox.js'}'></script>
56 {$ERROR_STRING}
57 <!-- This is here for the external API forms -->
58 <form name="DetailView" id="DetailView" method="POST" action="index.php">
59         <input type="hidden" name="record" id="record" value="{$ID}">
60         <input type="hidden" name="module" value="Users">
61         <input type="hidden" name="return_module" value="Users">
62         <input type="hidden" name="return_id" value="{$RETURN_ID}">
63         <input type="hidden" name="return_action" value="EditView">
64 </form>
65
66 <form name="EditView" enctype="multipart/form-data" id="EditView" method="POST" action="index.php">
67         <input type="hidden" name="display_tabs_def">
68         <input type="hidden" name="hide_tabs_def">
69         <input type="hidden" name="remove_tabs_def">
70         <input type="hidden" name="module" value="Users">
71         <input type="hidden" name="record" id="record" value="{$ID}">
72         <input type="hidden" name="action">
73         <input type="hidden" name="page" value="EditView">
74         <input type="hidden" name="return_module" value="{$RETURN_MODULE}">
75         <input type="hidden" name="return_id" value="{$RETURN_ID}">
76         <input type="hidden" name="return_action" value="{$RETURN_ACTION}">
77         <input type="hidden" name="password_change" id="password_change" value="false">
78     <input type="hidden" name="required_password" id="required_password" value='{$REQUIRED_PASSWORD}' >
79         <input type="hidden" name="old_user_name" value="{$USER_NAME}">
80         <input type="hidden" name="type" value="{$REDIRECT_EMAILS_TYPE}">
81         <input type="hidden" id="is_group" name="is_group" value='{$IS_GROUP}' {$IS_GROUP_DISABLED}>
82         <input type="hidden" id='portal_only' name='portal_only' value='{$IS_PORTALONLY}' {$IS_PORTAL_ONLY_DISABLED}>
83         <input type="hidden" name="is_admin" id="is_admin" value='{$IS_FOCUS_ADMIN}' {$IS_ADMIN_DISABLED} >
84         <input type="hidden" name="is_current_admin" id="is_current_admin" value='{$IS_ADMIN}' >
85         <input type="hidden" name="edit_self" id="edit_self" value='{$EDIT_SELF}' >
86         <input type="hidden" name="required_email_address" id="required_email_address" value='{$REQUIRED_EMAIL_ADDRESS}' >
87     <input type="hidden" name="isDuplicate" id="isDuplicate" value="{$isDuplicate}">
88         <div id="popup_window"></div>
89
90 <script type="text/javascript">
91 var EditView_tabs = new YAHOO.widget.TabView("EditView_tabs");
92
93 {literal}
94 //Override so we do not force submit, just simulate the 'save button' click
95 SUGAR.EmailAddressWidget.prototype.forceSubmit = function() { document.getElementById('Save').click();}
96
97 EditView_tabs.on('contentReady', function(e){
98 {/literal}
99 {if $ID}
100 {literal}
101     var eapmTabIndex = 4;
102     {/literal}{if !$SHOW_THEMES}{literal}eapmTabIndex = 3;{/literal}{/if}{literal}
103     EditView_tabs.getTab(eapmTabIndex).set('dataSrc','index.php?sugar_body_only=1&module=Users&subpanel=eapm&action=SubPanelViewer&inline=1&record={/literal}{$ID}{literal}&layout_def_key=UserEAPM&inline=1&ajaxSubpanel=true');
104     EditView_tabs.getTab(eapmTabIndex).set('cacheData',true);
105     EditView_tabs.getTab(eapmTabIndex).on('dataLoadedChange',function(){
106         //reinit action menus
107         $("ul.clickMenu").each(function(index, node){
108             $(node).sugarActionMenu();
109         });
110     });
111
112     if ( document.location.hash == '#tab5' ) {
113         EditView_tabs.selectTab(eapmTabIndex);
114     }
115 {/literal}
116 {/if}
117
118 {if $scroll_to_cal}
119     {literal}
120         //we are coming from the tour welcome page, so we need to simulate a click on the 4th tab
121         // and scroll to the calendar_options div after the tabs have rendered
122         document.getElementById('tab4').click();
123         document.getElementById('calendar_options').scrollIntoView();
124     {/literal}
125 {/if}
126
127 });
128 </script>
129
130 <table width="100%" cellpadding="0" cellspacing="0" border="0" class="actionsContainer">
131     <tr>
132         <td>
133             {sugar_action_menu id="userEditActions" class="clickMenu fancymenu" buttons=$ACTION_BUTTON_HEADER flat=true}
134         </td>
135         <td align="right" nowrap>
136             <span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span> {$APP.NTC_REQUIRED}
137         </td>
138     </tr>
139 </table>
140
141 <div id="EditView_tabs" class="yui-navset">
142     <ul class="yui-nav">
143         <li class="selected"><a id="tab1" href="#tab1"><em>{$MOD.LBL_USER_INFORMATION}</em></a></li>
144         <li {if $CHANGE_PWD == 0}style='display:none'{/if}><a id="tab2" href="#tab2"><em>{$MOD.LBL_CHANGE_PASSWORD_TITLE}</em></a></li>
145         {if $SHOW_THEMES}
146         <li><a id="tab3" href="#tab3" style='display:{$HIDE_FOR_GROUP_AND_PORTAL};'><em>{$MOD.LBL_THEME}</em></a></li>
147         {/if}
148         <li><a id="tab4" href="#tab4" style='display:{$HIDE_FOR_GROUP_AND_PORTAL};'><em>{$MOD.LBL_ADVANCED}</em></a></li>
149         {if $ID}
150         <li><a id="tab5" href="#tab5" style='display:{$HIDE_FOR_GROUP_AND_PORTAL};'><em>{$MOD.LBL_EAPM_SUBPANEL_TITLE}</em></a></li>
151         {/if}
152     </ul>
153     <div class="yui-content">
154         <div>
155 <!-- BEGIN METADATA GENERATED CONTENT -->