]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/Users/tpls/EditViewHeader.tpl
Release 6.4.0beta1
[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-2011 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_overlib.js'}'></script>
45 <script type="text/javascript" src="{sugar_getjspath file='cache/include/javascript/sugar_grp_yui_widgets.js'}"></script>
46 <script type='text/javascript' src='{sugar_getjspath file='include/SubPanel/SubPanelTiles.js'}'></script>
47 <script type='text/javascript'>
48 var ERR_RULES_NOT_MET = '{$MOD.ERR_RULES_NOT_MET}';
49 var ERR_ENTER_OLD_PASSWORD = '{$MOD.ERR_ENTER_OLD_PASSWORD}';
50 var ERR_ENTER_NEW_PASSWORD = '{$MOD.ERR_ENTER_NEW_PASSWORD}';
51 var ERR_ENTER_CONFIRMATION_PASSWORD = '{$MOD.ERR_ENTER_CONFIRMATION_PASSWORD}';
52 var ERR_REENTER_PASSWORDS = '{$MOD.ERR_REENTER_PASSWORDS}';
53 </script>
54 <script type='text/javascript' src='{sugar_getjspath file='modules/Users/User.js'}'></script>
55 <script type='text/javascript' src='{sugar_getjspath file='modules/Users/UserEditView.js'}'></script>
56 <script type='text/javascript' src='{sugar_getjspath file='modules/Users/PasswordRequirementBox.js'}'></script>
57 {$ERROR_STRING}
58 <!-- This is here for the external API forms -->
59 <form name="DetailView" id="DetailView" method="POST" action="index.php">
60         <input type="hidden" name="record" id="record" value="{$ID}">
61         <input type="hidden" name="module" value="Users">
62         <input type="hidden" name="return_module" value="Users">
63         <input type="hidden" name="return_id" value="{$ID}">
64         <input type="hidden" name="return_action" value="EditView">
65 </form>
66
67 <form name="EditView" enctype="multipart/form-data" id="EditView" method="POST" action="index.php">
68         <input type="hidden" name="display_tabs_def">
69         <input type="hidden" name="hide_tabs_def">
70         <input type="hidden" name="remove_tabs_def">
71         <input type="hidden" name="module" value="Users">
72         <input type="hidden" name="record" id="record" value="{$ID}">
73         <input type="hidden" name="action">
74         <input type="hidden" name="page" value="EditView">
75         <input type="hidden" name="return_module" value="{$RETURN_MODULE}">
76         <input type="hidden" name="return_id" value="{$RETURN_ID}">
77         <input type="hidden" name="return_action" value="{$RETURN_ACTION}">
78         <input type="hidden" name="password_change" id="password_change" value="false">
79     <input type="hidden" name="required_password" id="required_password" value='{$REQUIRED_PASSWORD}' >
80         <input type="hidden" name="old_user_name" value="{$USER_NAME}">
81         <input type="hidden" name="type" value="{$REDIRECT_EMAILS_TYPE}">
82         <input type="hidden" id="is_group" name="is_group" value='{$IS_GROUP}' {$IS_GROUP_DISABLED}>
83         <input type="hidden" id='portal_only' name='portal_only' value='{$IS_PORTALONLY}' {$IS_PORTAL_ONLY_DISABLED}>
84         <input type="hidden" name="is_admin" id="is_admin" value='{$IS_FOCUS_ADMIN}' {$IS_ADMIN_DISABLED} >
85         <input type="hidden" name="is_current_admin" id="is_current_admin" value='{$IS_ADMIN}' >
86         <input type="hidden" name="edit_self" id="edit_self" value='{$EDIT_SELF}' >
87         <input type="hidden" name="required_email_address" id="required_email_address" value='{$REQUIRED_EMAIL_ADDRESS}' >
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
106     if ( document.location.hash == '#tab5' ) {
107         EditView_tabs.selectTab(eapmTabIndex);
108     }
109 {/literal}
110 {/if}
111 });
112 </script>
113
114 <table width="100%" cellpadding="0" cellspacing="0" border="0" class="actionsContainer">
115     <tr>
116         <td>
117             <input      id="Save" title="{$APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}"
118                     class="button primary" onclick="if (!set_password(form,newrules('{$PWDSETTINGS.minpwdlength}','{$PWDSETTINGS.maxpwdlength}','{$REGEX}'))) return false; if (!Admin_check()) return false; this.form.action.value='Save'; {$CHOOSER_SCRIPT} {$REASSIGN_JS} if(verify_data(EditView)) this.form.submit();"
119                     type="button" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}" >
120             <input      title="{$APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}"
121                     class="button" onclick="this.form.action.value='{$RETURN_ACTION}'; this.form.module.value='{$RETURN_MODULE}'; this.form.record.value='{$RETURN_ID}'; this.form.submit()"
122                     type="button" name="button" value="{$APP.LBL_CANCEL_BUTTON_LABEL}">
123             {$BUTTONS}
124         </td>
125         <td align="right" nowrap>
126             <span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span> {$APP.NTC_REQUIRED}
127         </td>
128     </tr>
129 </table>
130
131 <div id="EditView_tabs" class="yui-navset">
132     <ul class="yui-nav">
133         <li class="selected"><a id="tab1" href="#tab1"><em>{$MOD.LBL_USER_INFORMATION}</em></a></li>
134         <li {if $CHANGE_PWD == 0}style='display:none'{/if}><a id="tab2" href="#tab2"><em>{$MOD.LBL_CHANGE_PASSWORD_TITLE}</em></a></li>
135         {if $SHOW_THEMES}
136         <li><a id="tab3" href="#tab3" style='display:{$HIDE_FOR_GROUP_AND_PORTAL};'><em>{$MOD.LBL_THEME}</em></a></li>
137         {/if}
138         <li><a id="tab4" href="#tab4" style='display:{$HIDE_FOR_GROUP_AND_PORTAL};'><em>{$MOD.LBL_ADVANCED}</em></a></li>
139         {if $ID}
140         <li><a id="tab5" href="#tab5" style='display:{$HIDE_FOR_GROUP_AND_PORTAL};'><em>{$MOD.LBL_EAPM_SUBPANEL_TITLE}</em></a></li>
141         {/if}
142     </ul>
143     <div class="yui-content">
144         <div>
145 <!-- BEGIN METADATA GENERATED CONTENT -->