forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDL-55564 theme_noname: Override admin setting templates
Part of MDL-55071
- Loading branch information
1 parent
df76022
commit 2c773bb
Showing
18 changed files
with
544 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 row" id="{{id}}"> | ||
<div class="form-label col-sm-3 text-sm-right"> | ||
<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 d-block small text-muted">{{{name}}}</span> | ||
</div> | ||
<div class="form-setting col-sm-9"> | ||
{{#error}} | ||
<div><span class="error">{{error}}</span></div> | ||
{{/error}} | ||
{{{element}}} | ||
{{#default}} | ||
<div class="form-defaultinfo text-muted">{{{default}}}</div> | ||
{{/default}} | ||
<div class="form-description m-t-1">{{{description}}}</div> | ||
</div> | ||
</div> |
30 changes: 30 additions & 0 deletions
30
theme/noname/templates/core_admin/setting_configcolourpicker.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" class="form-control"> | ||
{{#haspreviewconfig}} | ||
<input type="button" id="{{id}}_preview" value={{#quote}}{{#str}}preview{{/str}}{{/quote}} class="admin_colourpicker_preview"> | ||
{{/haspreviewconfig}} | ||
</div> |
31 changes: 31 additions & 0 deletions
31
theme/noname/templates/core_admin/setting_configduration.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 configduration. | ||
}} | ||
<div class="form-duration defaultsnext"> | ||
<div class="form-inline"> | ||
<input type="text" size="5" id="{{id}}v" name="{{name}}[v]" value="{{value}}" class="form-control"> | ||
<label class="sr-only" for="{{id}}u">{{#str}}durationunits, admin{{/str}}</label> | ||
<select id="{{id}}u" name="{{name}}[u]" class="form-control"> | ||
{{#options}} | ||
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option> | ||
{{/options}} | ||
</select> | ||
</div> | ||
</div> | ||
|
33 changes: 33 additions & 0 deletions
33
theme/noname/templates/core_admin/setting_configfile.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{{! | ||
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"> | ||
<div class="form-inline"> | ||
<input type="text" name="{{name}}" id="{{id}}" size="{{size}}" value="{{value}}" class="form-control" {{#readonly}}readonly{{/readonly}}> | ||
{{#showvalidity}} | ||
{{#valid}} | ||
<span class="text-success">✔</span> | ||
{{/valid}} | ||
{{^valid}} | ||
<span class="text-danger">✘</span> | ||
{{/valid}} | ||
{{/showvalidity}} | ||
</div> | ||
</div> | ||
|
28 changes: 28 additions & 0 deletions
28
theme/noname/templates/core_admin/setting_configmultiselect.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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}}" class="form-control" multiple> | ||
{{#options}} | ||
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option> | ||
{{/options}} | ||
</select> | ||
</div> | ||
|
57 changes: 57 additions & 0 deletions
57
theme/noname/templates/core_admin/setting_configpasswordunmask.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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}}" class="form-control d-inline-block"> | ||
<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 changes: 27 additions & 0 deletions
27
theme/noname/templates/core_admin/setting_configselect.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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}}" class="custom-select"> | ||
{{#options}} | ||
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option> | ||
{{/options}} | ||
</select> | ||
</div> | ||
|
Oops, something went wrong.