mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-55564 core_admin: Convert admin settings to use templates
Part of MDL-55071
This commit is contained in:
parent
58357d41af
commit
df7602298a
@ -77,20 +77,23 @@ if (empty($SITE->fullname)) {
|
||||
|
||||
// ---------------------------------------------------------------------------------------------------------------
|
||||
|
||||
echo '<form action="' . $PAGE->url . '" method="post" id="adminsettings">';
|
||||
echo '<div class="settingsform clearfix">';
|
||||
echo html_writer::input_hidden_params($PAGE->url);
|
||||
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
|
||||
echo '<input type="hidden" name="return" value="'.$return.'" />';
|
||||
// HACK to prevent browsers from automatically inserting the user's password into the wrong fields.
|
||||
echo prevent_form_autofill_password();
|
||||
$pageparams = $PAGE->url->params();
|
||||
$context = [
|
||||
'actionurl' => $PAGE->url->out(false),
|
||||
'params' => array_map(function($param) use ($pageparams) {
|
||||
return [
|
||||
'name' => $param,
|
||||
'value' => $pageparams[$param]
|
||||
];
|
||||
}, array_keys($pageparams)),
|
||||
'sesskey' => sesskey(),
|
||||
'return' => $return,
|
||||
'title' => null,
|
||||
'settings' => $settingspage->output_html(),
|
||||
'showsave' => true
|
||||
];
|
||||
|
||||
echo $settingspage->output_html();
|
||||
|
||||
echo '<div class="form-buttons"><input class="form-submit" type="submit" value="'.get_string('savechanges','admin').'" /></div>';
|
||||
|
||||
echo '</div>';
|
||||
echo '</form>';
|
||||
echo $OUTPUT->render_from_template('core_admin/settings', $context);
|
||||
|
||||
} else {
|
||||
if ($PAGE->user_allowed_editing()) {
|
||||
@ -121,23 +124,23 @@ if (empty($SITE->fullname)) {
|
||||
|
||||
// ---------------------------------------------------------------------------------------------------------------
|
||||
|
||||
echo '<form action="' . $PAGE->url . '" method="post" id="adminsettings">';
|
||||
echo '<div class="settingsform clearfix">';
|
||||
echo html_writer::input_hidden_params($PAGE->url);
|
||||
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
|
||||
echo '<input type="hidden" name="return" value="'.$return.'" />';
|
||||
// HACK to prevent browsers from automatically inserting the user's password into the wrong fields.
|
||||
echo prevent_form_autofill_password();
|
||||
echo $OUTPUT->heading($settingspage->visiblename);
|
||||
$pageparams = $PAGE->url->params();
|
||||
$context = [
|
||||
'actionurl' => $PAGE->url->out(false),
|
||||
'params' => array_map(function($param) use ($pageparams) {
|
||||
return [
|
||||
'name' => $param,
|
||||
'value' => $pageparams[$param]
|
||||
];
|
||||
}, array_keys($pageparams)),
|
||||
'sesskey' => sesskey(),
|
||||
'return' => $return,
|
||||
'title' => $settingspage->visiblename,
|
||||
'settings' => $settingspage->output_html(),
|
||||
'showsave' => $settingspage->show_save()
|
||||
];
|
||||
|
||||
echo $settingspage->output_html();
|
||||
|
||||
if ($settingspage->show_save()) {
|
||||
echo '<div class="form-buttons"><input class="form-submit" type="submit" value="'.get_string('savechanges','admin').'" /></div>';
|
||||
}
|
||||
|
||||
echo '</div>';
|
||||
echo '</form>';
|
||||
echo $OUTPUT->render_from_template('core_admin/settings', $context);
|
||||
}
|
||||
|
||||
$PAGE->requires->yui_module('moodle-core-formchangechecker',
|
||||
|
43
admin/templates/setting.mustache
Normal file
43
admin/templates/setting.mustache
Normal file
@ -0,0 +1,43 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
Setting.
|
||||
}}
|
||||
<div class="form-item clearfix" id="{{id}}">
|
||||
<div class="form-label">
|
||||
<label {{#labelfor}}for="{{labelfor}}"{{/labelfor}}>
|
||||
{{{title}}}
|
||||
{{#override}}
|
||||
<div class="form-overridden">{{override}}</div>
|
||||
{{/override}}
|
||||
{{#warning}}
|
||||
<div class="form-warning">{{warning}}</div>
|
||||
{{/warning}}
|
||||
</label>
|
||||
<span class="form-shortname">{{{name}}}</span>
|
||||
</div>
|
||||
<div class="form-setting">
|
||||
{{#error}}
|
||||
<div><span class="error">{{error}}</span></div>
|
||||
{{/error}}
|
||||
{{{element}}}
|
||||
{{#default}}
|
||||
<div class="form-defaultinfo">{{{default}}}</div>
|
||||
{{/default}}
|
||||
</div>
|
||||
<div class="form-description">{{{description}}}</div>
|
||||
</div>
|
23
admin/templates/setting_configcheckbox.mustache
Normal file
23
admin/templates/setting_configcheckbox.mustache
Normal file
@ -0,0 +1,23 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
Setting configdirectory.
|
||||
}}
|
||||
<div class="form-checkbox defaultsnext">
|
||||
<input type="hidden" name="{{name}}" value="{{no}}">
|
||||
<input type="checkbox" name="{{name}}" value="{{value}}" id="{{id}}" {{#checked}}checked{{/checked}}>
|
||||
</div>
|
30
admin/templates/setting_configcolourpicker.mustache
Normal file
30
admin/templates/setting_configcolourpicker.mustache
Normal file
@ -0,0 +1,30 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
Setting configcolourpicker.
|
||||
}}
|
||||
<div class="form-colourpicker defaultsnext">
|
||||
<div class="admin_colourpicker clearfix">
|
||||
{{#icon}}
|
||||
{{>core/pix_icon}}
|
||||
{{/icon}}
|
||||
</div>
|
||||
<input type="text" name="{{name}}" id="{{id}}" value="{{value}}" size="12">
|
||||
{{#haspreviewconfig}}
|
||||
<input type="button" id="{{id}}_preview" value={{#quote}}{{#str}}preview{{/str}}{{/quote}} class="admin_colourpicker_preview">
|
||||
{{/haspreviewconfig}}
|
||||
</div>
|
20
admin/templates/setting_configdirectory.mustache
Normal file
20
admin/templates/setting_configdirectory.mustache
Normal file
@ -0,0 +1,20 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
Setting configdirectory.
|
||||
}}
|
||||
{{>core_admin/setting_configfile}}
|
29
admin/templates/setting_configduration.mustache
Normal file
29
admin/templates/setting_configduration.mustache
Normal file
@ -0,0 +1,29 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
Setting configduration.
|
||||
}}
|
||||
<div class="form-duration defaultsnext">
|
||||
<input type="text" size="5" id="{{id}}v" name="{{name}}[v]" value="{{value}}">
|
||||
<label class="accesshide" for="{{id}}u">{{#str}}durationunits, admin{{/str}}</label>
|
||||
<select id="{{id}}u" name="{{name}}[u]">
|
||||
{{#options}}
|
||||
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
|
||||
{{/options}}
|
||||
</select>
|
||||
</div>
|
||||
|
22
admin/templates/setting_configempty.mustache
Normal file
22
admin/templates/setting_configempty.mustache
Normal file
@ -0,0 +1,22 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
Setting configempty.
|
||||
}}
|
||||
<div class="form-empty">
|
||||
<input type="hidden" name="{{name}}" id="{{id}}" value="">
|
||||
</div>
|
20
admin/templates/setting_configexecutable.mustache
Normal file
20
admin/templates/setting_configexecutable.mustache
Normal file
@ -0,0 +1,20 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
Setting configexecutable.
|
||||
}}
|
||||
{{>core_admin/setting_configfile}}
|
31
admin/templates/setting_configfile.mustache
Normal file
31
admin/templates/setting_configfile.mustache
Normal file
@ -0,0 +1,31 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
Setting configfile.
|
||||
}}
|
||||
<div class="form-file defaultsnext">
|
||||
<input type="text" name="{{name}}" id="{{id}}" size="{{size}}" value="{{value}}" {{#readonly}}readonly{{/readonly}}>
|
||||
{{#showvalidity}}
|
||||
{{#valid}}
|
||||
<span class="pathok">✔</span>
|
||||
{{/valid}}
|
||||
{{^valid}}
|
||||
<span class="patherror">✘</span>
|
||||
{{/valid}}
|
||||
{{/showvalidity}}
|
||||
</div>
|
||||
|
20
admin/templates/setting_confightmleditor.mustache
Normal file
20
admin/templates/setting_confightmleditor.mustache
Normal file
@ -0,0 +1,20 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
Setting confightmleditor.
|
||||
}}
|
||||
{{>core_admin/setting_configtextarea}}
|
32
admin/templates/setting_configmulticheckbox.mustache
Normal file
32
admin/templates/setting_configmulticheckbox.mustache
Normal file
@ -0,0 +1,32 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
Setting configmulticheckbox.
|
||||
}}
|
||||
<div class="form-multicheckbox">
|
||||
<input type="hidden" name="{{name}}[xxxxx]" value="1">
|
||||
{{#hasoptions}}
|
||||
<ul>
|
||||
{{#options}}
|
||||
<li>
|
||||
<input type="checkbox" name="{{name}}[{{key}}]" value="1" id="{{id}}_{{key}}" {{#checked}}checked{{/checked}}>
|
||||
<label for="{{id}}_{{key}}">{{{label}}}</label>
|
||||
</li>
|
||||
{{/options}}
|
||||
</ul>
|
||||
{{/hasoptions}}
|
||||
</div>
|
28
admin/templates/setting_configmultiselect.mustache
Normal file
28
admin/templates/setting_configmultiselect.mustache
Normal file
@ -0,0 +1,28 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
Setting configmultiselect.
|
||||
}}
|
||||
<div class="form-select">
|
||||
<input type="hidden" name="{{name}}[xxxxx]" value="1">
|
||||
<select id="{{id}}" name="{{name}}[]" size="{{size}}" multiple>
|
||||
{{#options}}
|
||||
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
|
||||
{{/options}}
|
||||
</select>
|
||||
</div>
|
||||
|
57
admin/templates/setting_configpasswordunmask.mustache
Normal file
57
admin/templates/setting_configpasswordunmask.mustache
Normal file
@ -0,0 +1,57 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
Setting configpasswordunmask.
|
||||
}}
|
||||
<div class="form-password">
|
||||
<input type="password" name="{{name}}" size="{{size}}" id="{{id}}" value="{{value}}">
|
||||
<div class="unmask" id="{{id}}unmaskdiv"></div>
|
||||
</div>
|
||||
{{#js}}
|
||||
(function() {
|
||||
var id = '{{id}}';
|
||||
var unmaskid = id + 'unmask';
|
||||
var unmaskdivid = id + 'unmaskdiv';
|
||||
var unmaskstr = {{#quote}}{{#str}}unmaskpassword, form{{/str}}{{/quote}};
|
||||
var is_ie = (navigator.userAgent.toLowerCase().indexOf("msie") != -1);
|
||||
|
||||
document.getElementById(id).setAttribute("autocomplete", "off");
|
||||
|
||||
var unmaskdiv = document.getElementById(unmaskdivid);
|
||||
|
||||
var unmaskchb = document.createElement("input");
|
||||
unmaskchb.setAttribute("type", "checkbox");
|
||||
unmaskchb.setAttribute("id", unmaskid);
|
||||
unmaskchb.onchange = function() {unmaskPassword(id);};
|
||||
unmaskdiv.appendChild(unmaskchb);
|
||||
|
||||
var unmasklbl = document.createElement("label");
|
||||
unmasklbl.innerHTML = unmaskstr;
|
||||
if (is_ie) {
|
||||
unmasklbl.setAttribute("htmlFor", unmaskid);
|
||||
} else {
|
||||
unmasklbl.setAttribute("for", unmaskid);
|
||||
}
|
||||
unmaskdiv.appendChild(unmasklbl);
|
||||
|
||||
if (is_ie) {
|
||||
// Ugly hack to work around the famous onchange IE bug.
|
||||
unmaskchb.onclick = function() {this.blur();};
|
||||
unmaskdiv.onclick = function() {this.blur();};
|
||||
}
|
||||
})()
|
||||
{{/js}}
|
27
admin/templates/setting_configselect.mustache
Normal file
27
admin/templates/setting_configselect.mustache
Normal file
@ -0,0 +1,27 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
Setting configselect.
|
||||
}}
|
||||
<div class="form-select defaultsnext">
|
||||
<select id="{{id}}" name="{{name}}">
|
||||
{{#options}}
|
||||
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
|
||||
{{/options}}
|
||||
</select>
|
||||
</div>
|
||||
|
22
admin/templates/setting_configtext.mustache
Normal file
22
admin/templates/setting_configtext.mustache
Normal file
@ -0,0 +1,22 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
Setting configtext.
|
||||
}}
|
||||
<div class="form-text defaultsnext">
|
||||
<input type="text" name="{{name}}" value="{{value}}" size="{{size}}" id="{{id}}" {{#attributes}} {{name}}="{{value}}"{{/attributes}}>
|
||||
</div>
|
22
admin/templates/setting_configtextarea.mustache
Normal file
22
admin/templates/setting_configtextarea.mustache
Normal file
@ -0,0 +1,22 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
Setting configtextarea.
|
||||
}}
|
||||
<div class="form-textarea">
|
||||
<textarea rows="{{rows}}" cols="{{cols}}" id="{{id}}" name="{{name}}" spellcheck="true">{{value}}</textarea>
|
||||
</div>
|
34
admin/templates/setting_configtime.mustache
Normal file
34
admin/templates/setting_configtime.mustache
Normal file
@ -0,0 +1,34 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
Setting configtime.
|
||||
}}
|
||||
<div class="form-time defaultsnext">
|
||||
<label class="accesshide" for="{{id}}h">{{#str}}hours{{/str}}</label>
|
||||
<select id="{{id}}h" name="{{name}}[h]">
|
||||
{{#hours}}
|
||||
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
|
||||
{{/hours}}
|
||||
</select>:
|
||||
<label class="accesshide" for="{{id}}m">{{#str}}minutes{{/str}}</label>
|
||||
<select id="{{id}}m" name="{{name}}[m]">
|
||||
{{#minutes}}
|
||||
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
|
||||
{{/minutes}}
|
||||
</select>
|
||||
</div>
|
||||
|
29
admin/templates/setting_courselist_frontpage.mustache
Normal file
29
admin/templates/setting_courselist_frontpage.mustache
Normal file
@ -0,0 +1,29 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
Setting courselist_frontpage.
|
||||
}}
|
||||
<div class="form-group">
|
||||
{{#selects}}
|
||||
<select id="{{id}}{{key}}" name="{{name}}[]">
|
||||
{{#options}}
|
||||
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
|
||||
{{/options}}
|
||||
</select>
|
||||
<br>
|
||||
{{/selects}}
|
||||
</div>
|
39
admin/templates/setting_devicedetectregex.mustache
Normal file
39
admin/templates/setting_devicedetectregex.mustache
Normal file
@ -0,0 +1,39 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
Setting devicedetectregex.
|
||||
}}
|
||||
<table class="generaltable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{#str}}devicedetectregexexpression, admin{{/str}}</th>
|
||||
<th>{{#str}}devicedetectregexvalue, admin{{/str}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#expressions}}
|
||||
<tr>
|
||||
<td class="c{{index}}">
|
||||
<input type="text" name="{{name}}[expression{{index}}]" class="form-text" value="{{expression}}">
|
||||
</td>
|
||||
<td class="c{{index}}">
|
||||
<input type="text" name="{{name}}[value{{index}}]" class="form-text" value="{{value}}">
|
||||
</td>
|
||||
</tr>
|
||||
{{/expressions}}
|
||||
</tbody>
|
||||
</table>
|
51
admin/templates/setting_emoticons.mustache
Normal file
51
admin/templates/setting_emoticons.mustache
Normal file
@ -0,0 +1,51 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
Setting emoticons.
|
||||
}}
|
||||
<div class="form-group">
|
||||
<table id="emoticonsetting" class="admintable generaltable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{#str}}emoticontext, admin{{/str}}</th>
|
||||
<th>{{#str}}emoticonimagename, admin{{/str}}</th>
|
||||
<th>{{#str}}emoticoncomponent, admin{{/str}}</th>
|
||||
<th colspan="2">{{#str}}emoticonalt, admin{{/str}}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#emoticons}}
|
||||
<tr>
|
||||
{{#fields}}
|
||||
<td class="c{{index}}">
|
||||
<input type="text" name="{{name}}[{{field}}]" class="form-text" value="{{value}}">
|
||||
</td>
|
||||
{{/fields}}
|
||||
<td>
|
||||
{{#icon}}
|
||||
{{>core/pix_icon}}
|
||||
{{/icon}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/emoticons}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
<a href="{{reseturl}}">{{#str}}emoticonsreset, admin{{/str}}</a>
|
||||
</div>
|
21
admin/templates/setting_flag.mustache
Normal file
21
admin/templates/setting_flag.mustache
Normal file
@ -0,0 +1,21 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
Setting flag.
|
||||
}}
|
||||
<input type="checkbox" name="{{name}}" value="{{value}}" id="{{id}}" {{#checked}}checked{{/checked}}>
|
||||
<label for="{{id}}">{{label}}</label>
|
31
admin/templates/setting_gradecat_combo.mustache
Normal file
31
admin/templates/setting_gradecat_combo.mustache
Normal file
@ -0,0 +1,31 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
Setting gradecat_combo.
|
||||
}}
|
||||
<div class="form-group">
|
||||
<select id="{{id}}" name="{{name}}[value]" class="form-select">
|
||||
{{#options}}
|
||||
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
|
||||
{{/options}}
|
||||
</select>
|
||||
<input type="checkbox" id="{{id}}force" name="{{name}}[forced]" value="1" {{#forced}}checked{{/forced}}>
|
||||
<label for="{{id}}force">{{#str}}force{{/str}}</label>
|
||||
<input type="checkbox" id="{{id}}adv" name="{{name}}[adv]" value="1" {{#advanced}}checked{{/advanced}}>
|
||||
<label for="{{id}}adv">{{#str}}advanced{{/str}}</label>
|
||||
</div>
|
||||
|
25
admin/templates/setting_heading.mustache
Normal file
25
admin/templates/setting_heading.mustache
Normal file
@ -0,0 +1,25 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
Setting heading.
|
||||
}}
|
||||
{{#title}}
|
||||
<h3 class="main">{{title}}</h3>
|
||||
{{/title}}
|
||||
{{#description}}
|
||||
<div class="box generalbox formsettingheading">{{{descriptionformatted}}}</div>
|
||||
{{/description}}
|
40
admin/templates/setting_special_calendar_weekend.mustache
Normal file
40
admin/templates/setting_special_calendar_weekend.mustache
Normal file
@ -0,0 +1,40 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
Setting special_calendar_weekend.
|
||||
}}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<input type="hidden" name="{{name}}[xxxxx]" value="1">
|
||||
{{#days}}
|
||||
<td>
|
||||
<label for="{{id}}{{index}}">{{label}}</label>
|
||||
</td>
|
||||
{{/days}}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
{{#days}}
|
||||
<td>
|
||||
<input type="checkbox" class="form-checkbox" id="{{id}}{{index}}" name="{{name}}[]" value="{{index}}" {{#checked}}checked{{/checked}}>
|
||||
</td>
|
||||
{{/days}}
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
38
admin/templates/settings.mustache
Normal file
38
admin/templates/settings.mustache
Normal file
@ -0,0 +1,38 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
Settings.
|
||||
}}
|
||||
<form action="{{actionurl}}" method="post" id="adminsettings">
|
||||
<div class="settingsform clearfix">
|
||||
{{#params}}
|
||||
<input type="hidden" name="{{name}}" value="{{value}}">
|
||||
{{/params}}
|
||||
<input type="hidden" name="sesskey" value="{{sesskey}}">
|
||||
<input type="hidden" name="return" value="{{return}}">
|
||||
{{>core/prevent_form_autofill_password}}
|
||||
{{#title}}
|
||||
<h2>{{title}}</h2>
|
||||
{{/title}}
|
||||
{{{settings}}}
|
||||
{{#showsave}}
|
||||
<div class="form-buttons">
|
||||
<input type="submit" class="form-submit" value={{#quote}}{{#str}}savechanges, admin{{/str}}{{/quote}}>
|
||||
</div>
|
||||
{{/showsave}}
|
||||
</div>
|
||||
</form>
|
849
lib/adminlib.php
849
lib/adminlib.php
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user