Merge branch 'MDL-40119-25' of git://github.com/andrewnicols/moodle into MOODLE_25_STABLE
This commit is contained in:
@@ -119,8 +119,11 @@ 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'));
|
||||
$image = $OUTPUT->pix_icon('i/calendar', get_string('calendar', 'calendar'), 'moodle');
|
||||
$this->_elements[] = @MoodleQuickForm::createElement('link', 'calendar',
|
||||
null, '#', $image,
|
||||
array('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);
|
||||
|
||||
@@ -133,8 +133,10 @@ class MoodleQuickForm_date_time_selector extends MoodleQuickForm_group{
|
||||
$this->_elements[] = @MoodleQuickForm::createElement('select', 'hour', get_string('hour', 'form'), $hours, $this->getAttributes(), true);
|
||||
$this->_elements[] = @MoodleQuickForm::createElement('select', 'minute', get_string('minute', 'form'), $minutes, $this->getAttributes(), true);
|
||||
}
|
||||
$this->_elements[] = @MoodleQuickForm::createElement('image', 'calendar', $OUTPUT->pix_url('i/calendar', 'moodle'),
|
||||
array('title' => get_string('calendar', 'calendar'), 'class' => 'visibleifjs'));
|
||||
$image = $OUTPUT->pix_icon('i/calendar', get_string('calendar', 'calendar'), 'moodle');
|
||||
$this->_elements[] = @MoodleQuickForm::createElement('link', 'calendar',
|
||||
null, '#', $image,
|
||||
array('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);
|
||||
|
||||
+1
-1
@@ -73,7 +73,7 @@ YUI.add('moodle-form-dateselector', function(Y) {
|
||||
}, this);
|
||||
|
||||
// Loop through the input fields.
|
||||
var inputs = this.get('node').all('input');
|
||||
var inputs = this.get('node').all('input, a');
|
||||
inputs.each(function(node) {
|
||||
// Check if the current node is a calendar image field.
|
||||
if (node.get('name').match(/\[calendar]/)) {
|
||||
|
||||
Reference in New Issue
Block a user