CC-2951: Allow users to select the starting day of the week
Added system preference in Preference page for user to select the start day of a week (defaults to Sunday). Calendar will utilize this information and update the calendar UI accordingly.
This commit is contained in:
parent
0989a1c13f
commit
d9186a3bf2
6 changed files with 70 additions and 3 deletions
|
@ -65,6 +65,14 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
|
|||
$timezone->setValue(Application_Model_Preference::GetTimezone());
|
||||
$timezone->setDecorators(array('ViewHelper'));
|
||||
$this->addElement($timezone);
|
||||
|
||||
/* Form Element for setting which day is the start of the week */
|
||||
$week_start_day = new Zend_Form_Element_Select("weekStartDay");
|
||||
$week_start_day->setLabel("Week Starts On");
|
||||
$week_start_day->setMultiOptions($this->getWeekStartDays());
|
||||
$week_start_day->setValue(Application_Model_Preference::GetWeekStartDay());
|
||||
$week_start_day->setDecorators(array('ViewHelper'));
|
||||
$this->addElement($week_start_day);
|
||||
}
|
||||
|
||||
private function getTimezones(){
|
||||
|
@ -90,7 +98,19 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
|
|||
|
||||
return $tzlist;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private function getWeekStartDays() {
|
||||
$days = array(
|
||||
'Sunday',
|
||||
'Monday',
|
||||
'Tuesday',
|
||||
'Wednesday',
|
||||
'Thursday',
|
||||
'Friday',
|
||||
'Saturday'
|
||||
);
|
||||
return $days;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue