mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
Merge branch 'MDL-78607-master' of https://github.com/roland04/moodle
This commit is contained in:
commit
8dece72737
@ -146,9 +146,10 @@ M.core_availability.form = {
|
||||
this.updateRestrictByGroup();
|
||||
}
|
||||
|
||||
// Everything is ready. Make sure the div is visible.
|
||||
// Everything is ready. Make sure the div is visible and hide the loading indicator.
|
||||
this.parent = Y.one('#fitem_id_availabilityconditionsjson');
|
||||
this.parent.removeClass('d-none');
|
||||
document.getElementById('availabilityconditions-loading').remove();
|
||||
},
|
||||
|
||||
/**
|
||||
|
File diff suppressed because one or more lines are too long
@ -146,9 +146,10 @@ M.core_availability.form = {
|
||||
this.updateRestrictByGroup();
|
||||
}
|
||||
|
||||
// Everything is ready. Make sure the div is visible.
|
||||
// Everything is ready. Make sure the div is visible and hide the loading indicator.
|
||||
this.parent = Y.one('#fitem_id_availabilityconditionsjson');
|
||||
this.parent.removeClass('d-none');
|
||||
document.getElementById('availabilityconditions-loading').remove();
|
||||
},
|
||||
|
||||
/**
|
||||
|
3
availability/yui/src/form/js/form.js
vendored
3
availability/yui/src/form/js/form.js
vendored
@ -144,9 +144,10 @@ M.core_availability.form = {
|
||||
this.updateRestrictByGroup();
|
||||
}
|
||||
|
||||
// Everything is ready. Make sure the div is visible.
|
||||
// Everything is ready. Make sure the div is visible and hide the loading indicator.
|
||||
this.parent = Y.one('#fitem_id_availabilityconditionsjson');
|
||||
this.parent.removeClass('d-none');
|
||||
document.getElementById('availabilityconditions-loading').remove();
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -17,7 +17,7 @@ require_once($CFG->libdir.'/gradelib.php');
|
||||
class editsection_form extends moodleform {
|
||||
|
||||
function definition() {
|
||||
global $CFG;
|
||||
global $CFG, $OUTPUT;
|
||||
|
||||
$mform = $this->_form;
|
||||
$course = $this->_customdata['course'];
|
||||
@ -60,6 +60,13 @@ class editsection_form extends moodleform {
|
||||
get_string('accessrestrictions', 'availability'),
|
||||
['class' => 'd-none']
|
||||
);
|
||||
// Availability loading indicator.
|
||||
$loadingcontainer = $OUTPUT->container(
|
||||
$OUTPUT->render_from_template('core/loading', []),
|
||||
'd-flex justify-content-center py-5 icon-size-5',
|
||||
'availabilityconditions-loading'
|
||||
);
|
||||
$mform->addElement('html', $loadingcontainer);
|
||||
}
|
||||
|
||||
$mform->_registerCancelButton('cancel');
|
||||
|
@ -506,7 +506,7 @@ abstract class moodleform_mod extends moodleform {
|
||||
* Adds all the standard elements to a form to edit the settings for an activity module.
|
||||
*/
|
||||
protected function standard_coursemodule_elements() {
|
||||
global $COURSE, $CFG, $DB;
|
||||
global $COURSE, $CFG, $DB, $OUTPUT;
|
||||
$mform =& $this->_form;
|
||||
|
||||
$this->_outcomesused = false;
|
||||
@ -629,6 +629,13 @@ abstract class moodleform_mod extends moodleform {
|
||||
get_string('accessrestrictions', 'availability'),
|
||||
['class' => 'd-none']
|
||||
);
|
||||
// Availability loading indicator.
|
||||
$loadingcontainer = $OUTPUT->container(
|
||||
$OUTPUT->render_from_template('core/loading', []),
|
||||
'd-flex justify-content-center py-5 icon-size-5',
|
||||
'availabilityconditions-loading'
|
||||
);
|
||||
$mform->addElement('html', $loadingcontainer);
|
||||
|
||||
// The _cm variable may not be a proper cm_info, so get one from modinfo.
|
||||
if ($this->_cm) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user