Skip to content

Commit

Permalink
Merge branch 'MDL-56190-master' of git://github.com/damyon/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
danpoltawski committed Nov 10, 2016
2 parents 55f171a + 560a43f commit 158ab03
Show file tree
Hide file tree
Showing 32 changed files with 203 additions and 260 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ M.availability_completion.form.initInner = function(cms) {

M.availability_completion.form.getNode = function(json) {
// Create HTML structure.
var html = M.util.get_string('title', 'availability_completion') + ' <span class="availability-group"><label>' +
var html = '<span class="col-form-label p-r-1"> ' + M.util.get_string('title', 'availability_completion') + '</span>' +
' <span class="availability-group form-group"><label>' +
'<span class="accesshide">' + M.util.get_string('label_cm', 'availability_completion') + ' </span>' +
'<select name="cm" title="' + M.util.get_string('label_cm', 'availability_completion') + '">' +
'<select class="custom-select" name="cm" title="' + M.util.get_string('label_cm', 'availability_completion') + '">' +
'<option value="0">' + M.util.get_string('choosedots', 'moodle') + '</option>';
for (var i = 0; i < this.cms.length; i++) {
var cm = this.cms[i];
Expand All @@ -36,13 +37,14 @@ M.availability_completion.form.getNode = function(json) {
}
html += '</select></label> <label><span class="accesshide">' +
M.util.get_string('label_completion', 'availability_completion') +
' </span><select name="e" title="' + M.util.get_string('label_completion', 'availability_completion') + '">' +
' </span><select class="custom-select" ' +
'name="e" title="' + M.util.get_string('label_completion', 'availability_completion') + '">' +
'<option value="1">' + M.util.get_string('option_complete', 'availability_completion') + '</option>' +
'<option value="0">' + M.util.get_string('option_incomplete', 'availability_completion') + '</option>' +
'<option value="2">' + M.util.get_string('option_pass', 'availability_completion') + '</option>' +
'<option value="3">' + M.util.get_string('option_fail', 'availability_completion') + '</option>' +
'</select></label></span>';
var node = Y.Node.create('<span>' + html + '</span>');
var node = Y.Node.create('<span class="form-inline">' + html + '</span>');

// Set initial values.
if (json.cm !== undefined &&
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ M.availability_completion.form.initInner = function(cms) {

M.availability_completion.form.getNode = function(json) {
// Create HTML structure.
var html = M.util.get_string('title', 'availability_completion') + ' <span class="availability-group"><label>' +
var html = '<span class="col-form-label p-r-1"> ' + M.util.get_string('title', 'availability_completion') + '</span>' +
' <span class="availability-group form-group"><label>' +
'<span class="accesshide">' + M.util.get_string('label_cm', 'availability_completion') + ' </span>' +
'<select name="cm" title="' + M.util.get_string('label_cm', 'availability_completion') + '">' +
'<select class="custom-select" name="cm" title="' + M.util.get_string('label_cm', 'availability_completion') + '">' +
'<option value="0">' + M.util.get_string('choosedots', 'moodle') + '</option>';
for (var i = 0; i < this.cms.length; i++) {
var cm = this.cms[i];
Expand All @@ -36,13 +37,14 @@ M.availability_completion.form.getNode = function(json) {
}
html += '</select></label> <label><span class="accesshide">' +
M.util.get_string('label_completion', 'availability_completion') +
' </span><select name="e" title="' + M.util.get_string('label_completion', 'availability_completion') + '">' +
' </span><select class="custom-select" ' +
'name="e" title="' + M.util.get_string('label_completion', 'availability_completion') + '">' +
'<option value="1">' + M.util.get_string('option_complete', 'availability_completion') + '</option>' +
'<option value="0">' + M.util.get_string('option_incomplete', 'availability_completion') + '</option>' +
'<option value="2">' + M.util.get_string('option_pass', 'availability_completion') + '</option>' +
'<option value="3">' + M.util.get_string('option_fail', 'availability_completion') + '</option>' +
'</select></label></span>';
var node = Y.Node.create('<span>' + html + '</span>');
var node = Y.Node.create('<span class="form-inline">' + html + '</span>');

// Set initial values.
if (json.cm !== undefined &&
Expand Down
10 changes: 6 additions & 4 deletions availability/condition/completion/yui/src/form/js/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ M.availability_completion.form.initInner = function(cms) {

M.availability_completion.form.getNode = function(json) {
// Create HTML structure.
var html = M.util.get_string('title', 'availability_completion') + ' <span class="availability-group"><label>' +
var html = '<span class="col-form-label p-r-1"> ' + M.util.get_string('title', 'availability_completion') + '</span>' +
' <span class="availability-group form-group"><label>' +
'<span class="accesshide">' + M.util.get_string('label_cm', 'availability_completion') + ' </span>' +
'<select name="cm" title="' + M.util.get_string('label_cm', 'availability_completion') + '">' +
'<select class="custom-select" name="cm" title="' + M.util.get_string('label_cm', 'availability_completion') + '">' +
'<option value="0">' + M.util.get_string('choosedots', 'moodle') + '</option>';
for (var i = 0; i < this.cms.length; i++) {
var cm = this.cms[i];
Expand All @@ -34,13 +35,14 @@ M.availability_completion.form.getNode = function(json) {
}
html += '</select></label> <label><span class="accesshide">' +
M.util.get_string('label_completion', 'availability_completion') +
' </span><select name="e" title="' + M.util.get_string('label_completion', 'availability_completion') + '">' +
' </span><select class="custom-select" ' +
'name="e" title="' + M.util.get_string('label_completion', 'availability_completion') + '">' +
'<option value="1">' + M.util.get_string('option_complete', 'availability_completion') + '</option>' +
'<option value="0">' + M.util.get_string('option_incomplete', 'availability_completion') + '</option>' +
'<option value="2">' + M.util.get_string('option_pass', 'availability_completion') + '</option>' +
'<option value="3">' + M.util.get_string('option_fail', 'availability_completion') + '</option>' +
'</select></label></span>';
var node = Y.Node.create('<span>' + html + '</span>');
var node = Y.Node.create('<span class="form-inline">' + html + '</span>');

// Set initial values.
if (json.cm !== undefined &&
Expand Down
2 changes: 1 addition & 1 deletion availability/condition/date/classes/frontend.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ protected function get_javascript_init_params($course, \cm_info $cm = null,
// NOTE: The fields need to have these weird names in order that they
// match the standard Moodle form control, otherwise the date selector
// won't find them.
$html .= \html_writer::start_tag('select', array('name' => 'x[' . $field . ']'));
$html .= \html_writer::start_tag('select', array('name' => 'x[' . $field . ']', 'class' => 'custom-select'));
foreach ($options as $key => $value) {
$params = array('value' => $key);
if ($current[$field] == $key) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ M.availability_date.form.initInner = function(html, defaultTime) {
};

M.availability_date.form.getNode = function(json) {
var html = M.util.get_string('direction_before', 'availability_date') + ' <span class="availability-group">' +
var html = '<span class="col-form-label p-r-1">' +
M.util.get_string('direction_before', 'availability_date') + '</span> <span class="availability-group">' +
'<label><span class="accesshide">' + M.util.get_string('direction_label', 'availability_date') + ' </span>' +
'<select name="direction">' +
'<select name="direction" class="custom-select">' +
'<option value="&gt;=">' + M.util.get_string('direction_from', 'availability_date') + '</option>' +
'<option value="&lt;">' + M.util.get_string('direction_until', 'availability_date') + '</option>' +
'</select></label></span> ' + this.html;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ M.availability_date.form.initInner = function(html, defaultTime) {
};

M.availability_date.form.getNode = function(json) {
var html = M.util.get_string('direction_before', 'availability_date') + ' <span class="availability-group">' +
var html = '<span class="col-form-label p-r-1">' +
M.util.get_string('direction_before', 'availability_date') + '</span> <span class="availability-group">' +
'<label><span class="accesshide">' + M.util.get_string('direction_label', 'availability_date') + ' </span>' +
'<select name="direction">' +
'<select name="direction" class="custom-select">' +
'<option value="&gt;=">' + M.util.get_string('direction_from', 'availability_date') + '</option>' +
'<option value="&lt;">' + M.util.get_string('direction_until', 'availability_date') + '</option>' +
'</select></label></span> ' + this.html;
Expand Down
Loading

0 comments on commit 158ab03

Please sign in to comment.