mirror of
https://github.com/moodle/moodle.git
synced 2025-08-09 19:06:41 +02:00
Merge branch 'MDL-40119-master' of git://github.com/andrewnicols/moodle
This commit is contained in:
commit
ab7f498343
3 changed files with 9 additions and 5 deletions
|
@ -123,8 +123,10 @@ class MoodleQuickForm_date_selector extends MoodleQuickForm_group {
|
||||||
}
|
}
|
||||||
// The YUI2 calendar only supports the gregorian calendar type so only display the calendar image if this is being used.
|
// The YUI2 calendar only supports the gregorian calendar type so only display the calendar image if this is being used.
|
||||||
if ($calendartype->get_name() === 'gregorian') {
|
if ($calendartype->get_name() === 'gregorian') {
|
||||||
$this->_elements[] = @MoodleQuickForm::createElement('image', 'calendar', $OUTPUT->pix_url('i/calendar', 'moodle'),
|
$image = $OUTPUT->pix_icon('i/calendar', get_string('calendar', 'calendar'), 'moodle');
|
||||||
array('title' => get_string('calendar', 'calendar'), 'class' => 'visibleifjs'));
|
$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 optional we add a checkbox which the user can use to turn if on
|
||||||
if ($this->_options['optional']) {
|
if ($this->_options['optional']) {
|
||||||
|
|
|
@ -139,8 +139,10 @@ class MoodleQuickForm_date_time_selector extends MoodleQuickForm_group {
|
||||||
}
|
}
|
||||||
// The YUI2 calendar only supports the gregorian calendar type so only display the calendar image if this is being used.
|
// The YUI2 calendar only supports the gregorian calendar type so only display the calendar image if this is being used.
|
||||||
if ($calendartype->get_name() === 'gregorian') {
|
if ($calendartype->get_name() === 'gregorian') {
|
||||||
$this->_elements[] = @MoodleQuickForm::createElement('image', 'calendar', $OUTPUT->pix_url('i/calendar', 'moodle'),
|
$image = $OUTPUT->pix_icon('i/calendar', get_string('calendar', 'calendar'), 'moodle');
|
||||||
array('title' => get_string('calendar', 'calendar'), 'class' => 'visibleifjs'));
|
$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 optional we add a checkbox which the user can use to turn if on
|
||||||
if ($this->_options['optional']) {
|
if ($this->_options['optional']) {
|
||||||
|
|
2
lib/form/yui/dateselector/dateselector.js
vendored
2
lib/form/yui/dateselector/dateselector.js
vendored
|
@ -73,7 +73,7 @@ YUI.add('moodle-form-dateselector', function(Y) {
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
// Loop through the input fields.
|
// Loop through the input fields.
|
||||||
var inputs = this.get('node').all('input');
|
var inputs = this.get('node').all('input, a');
|
||||||
inputs.each(function(node) {
|
inputs.each(function(node) {
|
||||||
// Check if the current node is a calendar image field.
|
// Check if the current node is a calendar image field.
|
||||||
if (node.get('name').match(/\[calendar]/)) {
|
if (node.get('name').match(/\[calendar]/)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue