mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-40008 forms: fixed ordering of the calendar icon and enable checkbox for the date selector element
This commit is contained in:
parent
b6f8a93642
commit
85c402a89d
@ -119,12 +119,12 @@ class MoodleQuickForm_date_selector extends MoodleQuickForm_group
|
||||
$this->_elements[] = @MoodleQuickForm::createElement('select', 'day', get_string('day', 'form'), $days, $this->getAttributes(), true);
|
||||
$this->_elements[] = @MoodleQuickForm::createElement('select', 'month', get_string('month', 'form'), $months, $this->getAttributes(), true);
|
||||
$this->_elements[] = @MoodleQuickForm::createElement('select', 'year', get_string('year', 'form'), $years, $this->getAttributes(), true);
|
||||
$this->_elements[] = @MoodleQuickForm::createElement('image', 'calendar', $OUTPUT->pix_url('i/calendar', 'moodle'),
|
||||
array('title' => get_string('calendar', 'calendar'), 'class' => 'visibleifjs'));
|
||||
// If optional we add a checkbox which the user can use to turn if on
|
||||
if($this->_options['optional']) {
|
||||
$this->_elements[] = @MoodleQuickForm::createElement('checkbox', 'enabled', null, get_string('enable'), $this->getAttributes(), true);
|
||||
}
|
||||
$this->_elements[] = @MoodleQuickForm::createElement('image', 'calendar', $OUTPUT->pix_url('i/calendar', 'moodle'),
|
||||
array('title' => get_string('calendar', 'calendar'), 'class' => 'visibleifjs'));
|
||||
foreach ($this->_elements as $element){
|
||||
if (method_exists($element, 'setHiddenLabel')){
|
||||
$element->setHiddenLabel(true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user