| Línea 31... |
Línea 31... |
| 31 |
this.customFields = customFields;
|
31 |
this.customFields = customFields;
|
| 32 |
};
|
32 |
};
|
| Línea 33... |
Línea 33... |
| 33 |
|
33 |
|
| 34 |
M.availability_profile.form.getNode = function(json) {
|
34 |
M.availability_profile.form.getNode = function(json) {
|
| 35 |
// Create HTML structure.
|
35 |
// Create HTML structure.
|
| 36 |
var html = '<span class="availability-group"><label><span class="pr-3">' +
|
36 |
var html = '<span class="availability-group"><label><span class="pe-3">' +
|
| 37 |
M.util.get_string('conditiontitle', 'availability_profile') + '</span> ' +
|
37 |
M.util.get_string('conditiontitle', 'availability_profile') + '</span> ' +
|
| 38 |
'<select name="field" class="custom-select">' +
|
38 |
'<select name="field" class="form-select">' +
|
| 39 |
'<option value="choose">' + M.util.get_string('choosedots', 'moodle') + '</option>';
|
39 |
'<option value="choose">' + M.util.get_string('choosedots', 'moodle') + '</option>';
|
| 40 |
var fieldInfo;
|
40 |
var fieldInfo;
|
| 41 |
for (var i = 0; i < this.standardFields.length; i++) {
|
41 |
for (var i = 0; i < this.standardFields.length; i++) {
|
| 42 |
fieldInfo = this.standardFields[i];
|
42 |
fieldInfo = this.standardFields[i];
|
| Línea 48... |
Línea 48... |
| 48 |
// String has already been escaped using format_string.
|
48 |
// String has already been escaped using format_string.
|
| 49 |
html += '<option value="cf_' + fieldInfo.field + '">' + fieldInfo.display + '</option>';
|
49 |
html += '<option value="cf_' + fieldInfo.field + '">' + fieldInfo.display + '</option>';
|
| 50 |
}
|
50 |
}
|
| 51 |
html += '</select></label> <label><span class="accesshide">' + M.util.get_string('label_operator', 'availability_profile') +
|
51 |
html += '</select></label> <label><span class="accesshide">' + M.util.get_string('label_operator', 'availability_profile') +
|
| 52 |
' </span><select name="op" title="' + M.util.get_string('label_operator', 'availability_profile') + '"' +
|
52 |
' </span><select name="op" title="' + M.util.get_string('label_operator', 'availability_profile') + '"' +
|
| 53 |
' class="custom-select">';
|
53 |
' class="form-select">';
|
| 54 |
var operators = ['isequalto', 'contains', 'doesnotcontain', 'startswith', 'endswith',
|
54 |
var operators = ['isequalto', 'contains', 'doesnotcontain', 'startswith', 'endswith',
|
| 55 |
'isempty', 'isnotempty'];
|
55 |
'isempty', 'isnotempty'];
|
| 56 |
for (i = 0; i < operators.length; i++) {
|
56 |
for (i = 0; i < operators.length; i++) {
|
| 57 |
html += '<option value="' + operators[i] + '">' +
|
57 |
html += '<option value="' + operators[i] + '">' +
|
| 58 |
M.util.get_string('op_' + operators[i], 'availability_profile') + '</option>';
|
58 |
M.util.get_string('op_' + operators[i], 'availability_profile') + '</option>';
|