CC-6127 - Add 'Use station default' option to user settings timezone, don't set user timezone by default when creating the admin user

This commit is contained in:
Duncan Sommerville 2015-09-01 16:10:33 -04:00
parent a99bc26715
commit 37df86723d
4 changed files with 12 additions and 11 deletions

View file

@ -121,11 +121,14 @@ class Application_Form_EditUser extends Zend_Form
$locale->setValue(Application_Model_Preference::GetUserLocale($currentUserId));
$locale->setDecorators(array('ViewHelper'));
$this->addElement($locale);
$stationTz = Application_Model_Preference::GetTimezone($currentUserId);
$userTz = Application_Model_Preference::GetUserTimezone($currentUserId);
$timezone = new Zend_Form_Element_Select("cu_timezone");
$timezone->setLabel(_("Interface Timezone:"));
$timezone->setMultiOptions(Application_Common_Timezone::getTimezones());
$timezone->setValue(Application_Model_Preference::GetUserTimezone($currentUserId));
$timezone->setValue($userTz == $stationTz ? null : $userTz);
$timezone->setDecorators(array('ViewHelper'));
$this->addElement($timezone);