SAAS-461: Re-enable timezone and language settings for Super Admins
This commit is contained in:
parent
4b4554476a
commit
d320651735
3 changed files with 22 additions and 6 deletions
|
@ -125,10 +125,6 @@ class UserController extends Zend_Controller_Action
|
|||
|
||||
public function editUserAction()
|
||||
{
|
||||
if (Application_Model_User::getCurrentUser()->isSuperAdmin()) {
|
||||
$this->_redirect('billing/client');
|
||||
}
|
||||
|
||||
$request = $this->getRequest();
|
||||
$form = new Application_Form_EditUser();
|
||||
if ($request->isPost()) {
|
||||
|
|
|
@ -123,6 +123,17 @@ class Application_Form_EditUser extends Zend_Form
|
|||
$timezone->setValue(Application_Model_Preference::GetUserTimezone($currentUserId));
|
||||
$timezone->setDecorators(array('ViewHelper'));
|
||||
$this->addElement($timezone);
|
||||
|
||||
if (Application_Model_User::getCurrentUser()->isSuperAdmin()) {
|
||||
$elemsToDisable = array($password, $passwordVerify, $email, $firstName, $lastName,
|
||||
$cellPhone, $skype, $jabber);
|
||||
foreach ($elemsToDisable as $element) {
|
||||
//$this->_redirect('billing/client');
|
||||
$element->setAttrib('disabled', 'disabled');
|
||||
$element->setAttrib('readonly', 'readonly');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function validateLogin($p_login, $p_userId) {
|
||||
|
|
|
@ -1,5 +1,14 @@
|
|||
<h2><?php echo sprintf(_("%s's Settings"), $this->escape($this->currentUser)) ?></h2>
|
||||
<div id="current-user-container">
|
||||
|
||||
<?php if(Application_Model_User::getCurrentUser()->isSuperAdmin()) : ?>
|
||||
<div class="user-data" id="user_details_superadmin_message" style="text-align: center;">
|
||||
<?=sprintf(_("Account details can be changed in your <a href=\"%s\">Billing Settings</a>."), "/billing/client");?>
|
||||
<br><br>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<form id="current-user-form" class="edit-user-global" method="post" enctype="application/x-www-form-urlencoded">
|
||||
<dl class="zend_form">
|
||||
<?php echo $this->element->getElement('cu_user_id') ?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue