2 /*********************************************************************************
3 * SugarCRM Community Edition is a customer relationship management program developed by
4 * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
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.
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
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
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.
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.
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 ********************************************************************************/
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}';
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>
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="{$RETURN_ID}">
64 <input type="hidden" name="return_action" value="EditView">
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 <input type="hidden" name="isDuplicate" id="isDuplicate" value="{$isDuplicate}">
89 <div id="popup_window"></div>
91 <script type="text/javascript">
92 var EditView_tabs = new YAHOO.widget.TabView("EditView_tabs");
95 //Override so we do not force submit, just simulate the 'save button' click
96 SUGAR.EmailAddressWidget.prototype.forceSubmit = function() { document.getElementById('Save').click();}
98 EditView_tabs.on('contentReady', function(e){
102 var eapmTabIndex = 4;
103 {/literal}{if !$SHOW_THEMES}{literal}eapmTabIndex = 3;{/literal}{/if}{literal}
104 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');
105 EditView_tabs.getTab(eapmTabIndex).set('cacheData',true);
107 if ( document.location.hash == '#tab5' ) {
108 EditView_tabs.selectTab(eapmTabIndex);
115 <table width="100%" cellpadding="0" cellspacing="0" border="0" class="actionsContainer">
118 <input id="Save" title="{$APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}"
119 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();"
120 type="button" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}" >
121 <input title="{$APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}"
122 class="button" onclick="this.form.action.value='{$RETURN_ACTION}'; this.form.module.value='{$RETURN_MODULE}'; this.form.record.value='{$RETURN_ID}'; this.form.submit()"
123 type="button" name="button" value="{$APP.LBL_CANCEL_BUTTON_LABEL}">
126 <td align="right" nowrap>
127 <span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span> {$APP.NTC_REQUIRED}
132 <div id="EditView_tabs" class="yui-navset">
134 <li class="selected"><a id="tab1" href="#tab1"><em>{$MOD.LBL_USER_INFORMATION}</em></a></li>
135 <li {if $CHANGE_PWD == 0}style='display:none'{/if}><a id="tab2" href="#tab2"><em>{$MOD.LBL_CHANGE_PASSWORD_TITLE}</em></a></li>
137 <li><a id="tab3" href="#tab3" style='display:{$HIDE_FOR_GROUP_AND_PORTAL};'><em>{$MOD.LBL_THEME}</em></a></li>
139 <li><a id="tab4" href="#tab4" style='display:{$HIDE_FOR_GROUP_AND_PORTAL};'><em>{$MOD.LBL_ADVANCED}</em></a></li>
141 <li><a id="tab5" href="#tab5" style='display:{$HIDE_FOR_GROUP_AND_PORTAL};'><em>{$MOD.LBL_EAPM_SUBPANEL_TITLE}</em></a></li>
144 <div class="yui-content">
146 <!-- BEGIN METADATA GENERATED CONTENT -->