MDL-27562 formslib: applydst should be always true, hence option removed from dateselector and datetimeselector form elements

This commit is contained in:
Rajesh Taneja 2012-05-04 13:46:08 +08:00
parent fa70f63522
commit c106a9bff0
3 changed files with 4 additions and 8 deletions

View File

@ -49,12 +49,11 @@ class MoodleQuickForm_date_selector extends MoodleQuickForm_group
* If not specified, then date is caclulated based on current user timezone.
* Note: dst will be calculated for string timezones only
* {@link http://docs.moodle.org/dev/Time_API#Timezone}
* applydst => apply users daylight savings adjustment?
* optional => if true, show a checkbox beside the date to turn it on (or off)
* @var array
*/
protected $_options = array('startyear' => 1970, 'stopyear' => 2020,
'timezone' => 99, 'applydst' => true, 'optional' => false);
'timezone' => 99, 'optional' => false);
/** @var array These complement separators, they are appended to the resultant HTML */
protected $_wrap = array('', '');
@ -236,7 +235,7 @@ class MoodleQuickForm_date_selector extends MoodleQuickForm_group
$valuearray['day'],
0, 0, 0,
$this->_options['timezone'],
$this->_options['applydst']);
true);
return $value;
} else {

View File

@ -49,13 +49,12 @@ class MoodleQuickForm_date_time_selector extends MoodleQuickForm_group{
* If not specified, then date is caclulated based on current user timezone.
* Note: dst will be calculated for string timezones only
* {@link http://docs.moodle.org/dev/Time_API#Timezone}
* applydst => apply users daylight savings adjustment?
* step => step to increment minutes by
* optional => if true, show a checkbox beside the date to turn it on (or off)
* @var array
*/
var $_options = array('startyear' => 1970, 'stopyear' => 2020, 'defaulttime' => 0,
'timezone' => 99, 'applydst' => true, 'step' => 5, 'optional' => false);
'timezone' => 99, 'step' => 5, 'optional' => false);
/** @var array These complement separators, they are appended to the resultant HTML */
var $_wrap = array('', '');
@ -258,7 +257,7 @@ class MoodleQuickForm_date_time_selector extends MoodleQuickForm_group{
$valuearray['minute'],
0,
$this->_options['timezone'],
$this->_options['applydst']);
true);
return $value;
} else {

View File

@ -26,8 +26,6 @@ class profile_field_datetime extends profile_field_base {
$attributes = array(
'startyear' => $this->field->param1,
'stopyear' => $this->field->param2,
'timezone' => 99,
'applydst' => true,
'optional' => $optional
);