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
|
@ -124,11 +124,7 @@ class UserController extends Zend_Controller_Action
|
||||||
}
|
}
|
||||||
|
|
||||||
public function editUserAction()
|
public function editUserAction()
|
||||||
{
|
{
|
||||||
if (Application_Model_User::getCurrentUser()->isSuperAdmin()) {
|
|
||||||
$this->_redirect('billing/client');
|
|
||||||
}
|
|
||||||
|
|
||||||
$request = $this->getRequest();
|
$request = $this->getRequest();
|
||||||
$form = new Application_Form_EditUser();
|
$form = new Application_Form_EditUser();
|
||||||
if ($request->isPost()) {
|
if ($request->isPost()) {
|
||||||
|
|
|
@ -38,7 +38,7 @@ class Application_Form_EditUser extends Zend_Form
|
||||||
$login->addFilter('StringTrim');
|
$login->addFilter('StringTrim');
|
||||||
$login->setDecorators(array('viewHelper'));
|
$login->setDecorators(array('viewHelper'));
|
||||||
$this->addElement($login);
|
$this->addElement($login);
|
||||||
|
|
||||||
$password = new Zend_Form_Element_Password('cu_password');
|
$password = new Zend_Form_Element_Password('cu_password');
|
||||||
$password->setLabel(_('Password:'));
|
$password->setLabel(_('Password:'));
|
||||||
$password->setAttrib('class', 'input_text');
|
$password->setAttrib('class', 'input_text');
|
||||||
|
@ -123,6 +123,17 @@ class Application_Form_EditUser extends Zend_Form
|
||||||
$timezone->setValue(Application_Model_Preference::GetUserTimezone($currentUserId));
|
$timezone->setValue(Application_Model_Preference::GetUserTimezone($currentUserId));
|
||||||
$timezone->setDecorators(array('ViewHelper'));
|
$timezone->setDecorators(array('ViewHelper'));
|
||||||
$this->addElement($timezone);
|
$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) {
|
public function validateLogin($p_login, $p_userId) {
|
||||||
|
|
|
@ -1,5 +1,14 @@
|
||||||
<h2><?php echo sprintf(_("%s's Settings"), $this->escape($this->currentUser)) ?></h2>
|
<h2><?php echo sprintf(_("%s's Settings"), $this->escape($this->currentUser)) ?></h2>
|
||||||
<div id="current-user-container">
|
<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">
|
<form id="current-user-form" class="edit-user-global" method="post" enctype="application/x-www-form-urlencoded">
|
||||||
<dl class="zend_form">
|
<dl class="zend_form">
|
||||||
<?php echo $this->element->getElement('cu_user_id') ?>
|
<?php echo $this->element->getElement('cu_user_id') ?>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue