first commit

This commit is contained in:
CHIEFSOFT\ameye
2024-09-30 18:11:26 -04:00
commit e592ca6823
27270 changed files with 5002257 additions and 0 deletions
@@ -0,0 +1,52 @@
{{!
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/>.
}}
{{!
@template core_admin/header_search_input
Admin search input for page header.
Example context (json):
{
"action": "http://moodle.local/admin/search.php",
"query": "themedesigner"
}
}}
<div class="simplesearchform d-flex justify-content-end">
<form autocomplete="off" action="{{action}}" method="get" accept-charset="utf-8" class="mform d-flex flex-wrap align-items-center simplesearchform">
<div class="input-group">
<label for="searchinput-{{uniqid}}">
<span class="sr-only">{{#str}} search, core {{/str}}</span>
</label>
<input type="text"
id="searchinput-{{uniqid}}"
class="form-control"
placeholder="{{#str}} search, core {{/str}}"
aria-label="{{#str}} search, core {{/str}}"
name="query"
data-region="input"
autocomplete="off"
{{#query}}value="{{.}}"{{/query}}
>
<div class="input-group-append">
<button type="submit" class="btn btn-primary search-icon">
{{#pix}} a/search, core {{/pix}}
<span class="sr-only">{{#str}} search, core {{/str}}</span>
</button>
</div>
</div>
</form>
</div>
@@ -0,0 +1,87 @@
{{!
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/>.
}}
{{!
@template core_admin\local\settings\autocomplete
Admin setting auto complete.
Context variables required for this template:
* name - element name
* id - element id
* options - choices
* multiple - is multiple choices?
* manageurl - url to manage choices
* managetext - string to display manage url
* tags - Should we allow typing new entries to the field?
* ajax - Name of an AMD module to send/process ajax requests
* placeholder - Placeholder text for an empty list
* casesensitive - Whether the search has to be case-sensitive
* showsuggestions - Show suggestions by default - but this can be turned off
* noselectionstring - String that is shown when there are no selections
Example context (json):
{
"name": "name0",
"id": "id0",
"options": [{
"value": "1",
"text": "option 1",
"selected": true,
"disabled": false
}],
"multiple": true,
"manageurl": "",
"managetext": "",
"tags": false,
"ajax": "",
"placeholder": "",
"casesensitive": false,
"showsuggestions": true,
"noselectionstring": ""
}
}}
{{!
Setting autocomplete.
}}
<div class="form-select defaultsnext">
<input type="hidden" name="{{name}}[xxxxx]" value="_qf__force_multiselect_submission">
<select class="custom-select" name="{{name}}[]"
id="{{id}}"
{{#multiple}}multiple{{/multiple}}>
{{#options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{{text}}}</option>
{{/options}}
</select>
{{#manageurl}}
<a href="{{manageurl}}">{{managetext}}</a>
{{/manageurl}}
</div>
<br/>
{{#js}}
require(['core/form-autocomplete'], function(module) {
module.enhance({{#quote}}#{{id}}{{/quote}},
{{tags}},
{{#quote}}{{ajax}}{{/quote}},
{{#quote}}{{placeholder}}{{/quote}},
{{casesensitive}},
{{showsuggestions}},
{{#quote}}{{noselectionstring}}{{/quote}});
});
{{/js}}
+100
View File
@@ -0,0 +1,100 @@
{{!
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/>.
}}
{{!
@template core_admin/setting
Admin setting template.
Context variables required for this template:
* labelfor - id of the form element
* title - Setting title
* override - Overridden message
* warning - Warning message
* name - Setting name
* error - Error message
* element - The Element HTML
* forceltr - Force this element to be displayed LTR
* default - Default value
* dependenton - optional message listing the settings this one is dependent on
Example context (json):
{
"title": "Setting title",
"labelfor": "id0",
"override": "Overidden",
"warning": "Warning",
"name": "Name",
"error": "Error",
"element": "Raw HTML",
"forceltr": false,
"default": "Default value"
}
}}
{{!
Setting.
}}
<div class="form-item row" id="{{id}}">
<div class="form-label col-sm-3 text-sm-right">
{{#customcontrol}}
<p {{#labelfor}}id="{{labelfor}}_label"{{/labelfor}}>
{{{title}}}
{{#override}}
<div class="alert alert-info">{{override}}</div>
{{/override}}
{{#warning}}
<div class="alert alert-warning">{{warning}}</div>
{{/warning}}
</p>
{{/customcontrol}}
{{^customcontrol}}
<label {{#labelfor}}for="{{labelfor}}"{{/labelfor}}>
{{{title}}}
{{#override}}
<div class="alert alert-info">{{override}}</div>
{{/override}}
{{#warning}}
<div class="alert alert-warning">{{warning}}</div>
{{/warning}}
</label>
{{/customcontrol}}
<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 {{#forceltr}}text-ltr{{/forceltr}}">{{{default}}}</div>
{{/default}}
<div class="form-description mt-3">{{{description}}}</div>
{{#dependenton}}<div class="form-dependenton mb-4 text-muted">{{{.}}}</div>{{/dependenton}}
</div>
</div>
{{#customcontrol}}
{{#js}}
require(['jquery'], function($) {
$('#{{id}}_label').css('cursor', 'default');
$('#{{id}}_label').click(function() {
$('#{{id}}')
.find('button, a, input:not([type="hidden"]), select, textarea, [tabindex]')
.filter(':not([disabled]):not([tabindex="0"]):not([tabindex="-1"])')
.first().focus();
});
});
{{/js}}
{{/customcontrol}}
@@ -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/>.
}}
{{!
@template core_admin/setting_configcheckbox
Admin checkbox setting template.
Context variables required for this template:
* name - form element name
* no - no value
* value - yes value
* id - element id
* checked - boole
* readonly - bool
Example context (json):
{
"name": "test",
"no": "False",
"value": "True",
"id": "test0",
"checked": "checked",
"readonly": false
}
}}
<div class="form-checkbox defaultsnext">
{{^readonly}}<input type="hidden" name="{{name}}" value="{{no}}">{{/readonly}}
<input {{#readonly}}disabled{{/readonly}} type="checkbox" name="{{name}}" value="{{value}}" id="{{id}}" {{#checked}}checked{{/checked}}>
</div>
@@ -0,0 +1,53 @@
{{!
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/>.
}}
{{!
@template core_admin/setting_configcolourpicker
Admin setting colour picker template.
Context variables required for this template:
* icon - optional icon context (see pix_icon)
* name - element name
* id - element id
* value - element value
* haspreviewconfig - show preview of selected color
* readonly - bool
Example context (json):
{
"icon": false,
"name": "name0",
"id": "id0",
"value": "#555655",
"readonly": false,
"haspreviewconfig": false
}
}}
{{!
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 text-ltr" {{#readonly}}disabled{{/readonly}}>
{{#haspreviewconfig}}
<input type="button" id="{{id}}_preview" value="{{#cleanstr}}preview{{/cleanstr}}" class="admin_colourpicker_preview">
{{/haspreviewconfig}}
</div>
@@ -0,0 +1,41 @@
{{!
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/>.
}}
{{!
@template core_admin/setting_configdirectory
Admin directory setting template.
Context variables required for this template:
* name - form element name
* id - element id
* size - size of the field
* readonly - Make the field readonly
* value - value
* showvalidity - Show a green check if the path is readable
* valid - True if the path is readable
Example context (json):
{
"name": "test",
"value": "/my-super-secret-path/",
"id": "test0",
"readonly": false,
"showvalidity": true,
"valid": false
}
}}
{{>core_admin/setting_configfile}}
@@ -0,0 +1,52 @@
{{!
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/>.
}}
{{!
@template core_admin/setting_configduration
Admin duration setting template.
Context variables required for this template:
* name - form element name
* options - list of options for units containing name, value, selected
* value - yes
* readonly - bool
* id - element id
Example context (json):
{
"name": "test",
"value": "5",
"id": "test0",
"readonly": false,
"options": [ { "name": "Minutes", "value": "mins", "selected": true } ]
}
}}
{{!
Setting configduration.
}}
<div class="form-duration defaultsnext">
<div class="d-flex flex-wrap align-items-center">
<input type="text" size="5" id="{{id}}v" name="{{name}}[v]" value="{{value}}" class="form-control text-ltr" {{#readonly}}disabled{{/readonly}}>
<label class="sr-only" for="{{id}}u">{{#str}}durationunits, admin{{/str}}</label>
<select id="{{id}}u" name="{{name}}[u]" class="form-control custom-select" {{#readonly}}disabled{{/readonly}}>
{{#options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/options}}
</select>
</div>
</div>
@@ -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/>.
}}
{{!
@template core_admin/setting_configempty
Admin empty setting template.
Context variables required for this template:
* name - form element name
* id - element id
Example context (json):
{
"name": "test",
"id": "test0"
}
}}
<div class="form-empty">
<input type="hidden" name="{{name}}" id="{{id}}" value="">
</div>
@@ -0,0 +1,41 @@
{{!
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/>.
}}
{{!
@template core_admin/setting_configexecutable
Admin executable setting template.
Context variables required for this template:
* name - form element name
* id - element id
* size - size of the field
* readonly - Make the field readonly
* value - value
* showvalidity - Show a green check if the path is readable
* valid - True if the path is readable
Example context (json):
{
"name": "test",
"value": "/usr/bin/cowsay",
"id": "test0",
"readonly": false,
"showvalidity": true,
"valid": false
}
}}
{{>core_admin/setting_configfile}}
@@ -0,0 +1,59 @@
{{!
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/>.
}}
{{!
@template core_admin/setting_configfile
Admin file setting template.
Context variables required for this template:
* name - form element name
* id - element id
* size - size of the field
* readonly - Make the field readonly
* value - value
* showvalidity - Show a green check if the path is readable
* readonly - bool
* valid - True if the path is readable
Example context (json):
{
"name": "test",
"value": "/my-super-secret-path/file",
"id": "test0",
"readonly": false,
"showvalidity": true,
"readonly": false,
"valid": false
}
}}
{{!
Setting configfile.
}}
<div class="form-file defaultsnext">
<div class="d-flex flex-wrap align-items-center">
<input type="text" name="{{name}}" id="{{id}}" size="{{size}}" value="{{value}}" class="form-control text-ltr" {{#readonly}}readonly{{/readonly}}>
{{#showvalidity}}
{{#valid}}
<span class="text-success">&#x2714;</span>
{{/valid}}
{{^valid}}
<span class="text-danger">&#x2718;</span>
{{/valid}}
{{/showvalidity}}
</div>
</div>
@@ -0,0 +1,52 @@
{{!
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/>.
}}
{{!
@template core_admin/setting_configfilesize
Admin file size setting template.
Context variables required for this template:
* name - form element name
* options - list of options for units containing name, value, selected
* value - yes
* id - element id
* readonly - bool
Example context (json):
{
"name": "test",
"value": "5",
"id": "test0",
"readonly": false,
"options": [ { "name": "KB", "value": "1024", "selected": true } ]
}
}}
{{!
Setting configfilesize.
}}
<div class="form-filesize defaultsnext">
<div class="d-flex flex-wrap align-items-center">
<input type="text" size="5" id="{{id}}v" name="{{name}}[v]" value="{{value}}" class="form-control text-ltr" {{#readonly}}disabled{{/readonly}}>
<label class="sr-only" for="{{id}}u">{{#str}}filesizeunits, admin{{/str}}</label>
<select id="{{id}}u" name="{{name}}[u]" class="form-control custom-select" {{#readonly}}disabled{{/readonly}}>
{{#options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/options}}
</select>
</div>
</div>
@@ -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/>.
}}
{{!
@template core_admin/setting_confightmleditor
Admin htmleditor setting template.
Context variables required for this template:
* rows - number of rows
* cols - number of cols
* id - element id
* name - element name
* value - default text
* forceltr - always ltr
Example context (json):
{
"name": "test",
"id": "test0",
"value": "Your aims are high, and you are capable of much.",
"rows": 5,
"cols": 30
}
}}
{{>core_admin/setting_configtextarea}}
@@ -0,0 +1,49 @@
{{!
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/>.
}}
{{!
@template core_admin/setting_configmulticheckbox
Admin multicheckbox setting template.
Context variables required for this template:
* name - form element name
* hasoptions - there are some options
* options - list of options containing name, key, id, checked, label
* readonly - bool
Example context (json):
{
"name": "test",
"hasoptions": true,
"options": [ { "name": "Option", "key": "k1", "id": "id0", "checked": true, "label": "Option label"} ],
"readonly": false
}
}}
<div class="form-multicheckbox">
{{^readonly}}<input type="hidden" name="{{name}}[xxxxx]" value="1">{{/readonly}}
{{#hasoptions}}
<ul>
{{#options}}
<li>
<input type="checkbox" name="{{name}}[{{key}}]" value="1" id="{{id}}_{{key}}" {{#readonly}}disabled{{/readonly}} {{#checked}}checked{{/checked}}>
<label for="{{id}}_{{key}}">{{{label}}}</label>
</li>
{{/options}}
</ul>
{{/hasoptions}}
</div>
@@ -0,0 +1,50 @@
{{!
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/>.
}}
{{!
@template core_admin/setting_configmultiselect
Admin multiselect setting template.
Context variables required for this template:
* name - form element name
* id - element id
* size - element size
* options - list of options containing name, value, selected
* readonly - bool
Example context (json):
{
"name": "test",
"id": "test0",
"readonly": false,
"size": "3",
"options": [ { "name": "Option 1", "value": "V", "selected": true },
{ "name": "Option 2", "value": "V", "selected": true } ]
}
}}
{{!
Setting configmultiselect.
}}
<div class="form-select">
{{^readonly}}<input type="hidden" name="{{name}}[xxxxx]" value="1">{{/readonly}}
<select {{#readonly}}disabled{{/readonly}} id="{{id}}" name="{{name}}[]" size="{{size}}" class="form-control" multiple>
{{#options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/options}}
</select>
</div>
@@ -0,0 +1,76 @@
{{!
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/>.
}}
{{!
@template core_admin/setting_configmultiselect_optgroup
Admin multiselect setting template with optgroup support.
Context variables required for this template:
* name - form element name
* id - element id
* size - element size
* options - list of options not grouped
* optgroups - list of options grouped containing the group label and for each option: name, value, selected
* readonly - bool
Example context (json):
{
"name": "test",
"id": "test0",
"readonly": false,
"size": "3",
"options": [
{ "name": "Option 1", "value": "V", "selected": false },
{ "name": "Option 2", "value": "V", "selected": true }
],
"optgroups": [
{
"label": "Group 1",
"options": [
{ "name": "Option 3", "value": "V", "selected": false },
{ "name": "Option 4", "value": "V", "selected": true }
]
},
{
"label": "Group 2",
"options": [
{ "name": "Option 5", "value": "V", "selected": false },
{ "name": "Option 6", "value": "V", "selected": true }
]
}
]
}
}}
{{!
Setting configmultiselect with optgroup support.
}}
<div class="form-select">
{{^readonly}}<input type="hidden" name="{{name}}[xxxxx]" value="1">{{/readonly}}
<select {{#readonly}}disabled{{/readonly}} id="{{id}}" name="{{name}}[]" size="{{size}}" class="form-control" multiple>
{{#options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/options}}
{{#optgroups}}
<optgroup label="{{label}}">
{{#options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/options}}
</optgroup>
{{/optgroups}}
</select>
</div>
@@ -0,0 +1,80 @@
{{!
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/>.
}}
{{!
@template core_admin/setting_configpasswordunmask
Admin password unmask setting template.
Context variables required for this template:
* name - form element name
* size - form element size
* value - form element value
* id - element id
* readonly - has value been defined in config.php
Example context (json):
{
"name": "test",
"id": "test0",
"size": "8",
"value": "secret",
"readonly": false
}
}}
{{#readonly}}
<div class="form-password">
<input type="text"
name = "{{ name }}"
id="{{ id }}"
value="********"
size="{{ size }}"
class="form-control"
disabled
>
</div>
{{/readonly}}
{{^readonly}}
<div class="form-password">
<span data-passwordunmask="wrapper" data-passwordunmaskid="{{ id }}">
<span data-passwordunmask="editor">
<input type="password"
autocomplete="new-password"
name="{{ name }}"
id="{{ id }}"
value="{{ value }}"
data-size="{{ size }}"
class="form-control d-none"
>
</span>
<a href="#" data-passwordunmask="edit" title="{{ edithint }}">
<span data-passwordunmask="displayvalue">{{> core_form/element-passwordunmask-fill }}</span>
{{# pix }} t/passwordunmask-edit, core, {{# str }} passwordunmaskedithint, form {{/ str }}{{/ pix }}
</a>
<a href="#" data-passwordunmask="unmask" title="{{ unmaskhint }}">
{{# pix }} t/passwordunmask-reveal, core, {{# str }} passwordunmaskrevealhint, form {{/ str }}{{/ pix }}
</a>
<span data-passwordunmask="instructions" class="form-text text-muted" style="display: none;">
{{# str }} passwordunmaskinstructions, form {{/ str }}
</span>
</span>
</div>
{{#js}}
require(['core_form/passwordunmask'], function(PasswordUnmask) {
new PasswordUnmask("{{ id }}");
});
{{/js}}
{{/readonly}}
@@ -0,0 +1,49 @@
{{!
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/>.
}}
{{!
@template core_admin/setting_configselect
Admin select setting template.
Context variables required for this template:
* name - form element name
* id - element id
* options - list of options containing name, value, selected
* readonly - bool
Example context (json):
{
"name": "test",
"id": "test0",
"readonly": false,
"options": [
{ "name": "Option 1", "value": "V", "selected": true },
{ "name": "Option 2", "value": "V", "selected": true }
]
}
}}
{{!
Setting configselect.
}}
<div class="form-select defaultsnext">
<select {{#readonly}}disabled{{/readonly}} id="{{id}}" name="{{name}}" class="custom-select">
{{#options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/options}}
</select>
</div>
@@ -0,0 +1,74 @@
{{!
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/>.
}}
{{!
@template core_admin/setting_configselect_optgroup
Admin select with optgroup setting template.
Context variables required for this template:
* name - form element name
* id - element id
* readonly - bool
* options - list of options (not grouped)
* optgroups - list of options grouped containing the group label and for each option: name, value, selected
Example context (json):
{
"name": "test",
"id": "test0",
"readonly": false,
"options": [
{ "name": "Option 1", "value": "V", "selected": false },
{ "name": "Option 2", "value": "V", "selected": false }
],
"optgroups": [
{
"label": "Group 1",
"options": [
{ "name": "Option 3", "value": "V", "selected": true },
{ "name": "Option 4", "value": "V", "selected": false }
]
},
{
"label": "Group 2",
"options": [
{ "name": "Option 5", "value": "V", "selected": false },
{ "name": "Option 6", "value": "V", "selected": false }
]
}
]
}
}}
{{!
Setting configselect with optgroup support.
}}
<div class="form-select defaultsnext">
<select {{#readonly}}disabled{{/readonly}} id="{{id}}" name="{{name}}" class="custom-select">
{{#options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/options}}
{{#optgroups}}
<optgroup label="{{label}}">
{{#options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/options}}
</optgroup>
{{/optgroups}}
</select>
</div>
@@ -0,0 +1,56 @@
{{!
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/>.
}}
{{!
@template core_admin/setting_configtext
Admin text setting template.
Context variables required for this template:
* name - form element name
* id - element id
* value - element value
* size - element size
* forceltr - always display as ltr
* attributes - list of additional attributes containing name, value
* readonly - bool
* data - list of arbitrary data attributes
* maxcharacter - maximum character
Example context (json):
{
"name": "test",
"id": "test0",
"value": "A tall, dark stranger will have more fun than you.",
"size": "21",
"forceltr": false,
"readonly": false,
"attributes": [ { "name": "readonly", "value": "readonly" } ],
"data": [ { "key": "validation_max_length", "value": "10" } ],
"maxcharacter": false
}
}}
{{!
Setting configtext.
}}
<div class="form-text defaultsnext">
<input type="text" name="{{name}}" value="{{value}}" size="{{size}}" id="{{id}}" class="form-control {{#forceltr}}text-ltr{{/forceltr}}" {{#readonly}}disabled{{/readonly}} {{#data}} data-{{key}}={{#quote}}{{{value}}}{{/quote}}{{/data}}>
{{#data}}
{{#maxcharacter}}
<div class="form-defaultinfo text-muted d-block">{{#str}} maxcharacter, admin, {{value}} {{/str}}</div>
{{/maxcharacter}}
{{/data}}
</div>
@@ -0,0 +1,45 @@
{{!
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/>.
}}
{{!
@template core_admin/setting_configtextarea
Admin textarea setting template.
Context variables required for this template:
* name - form element name
* id - element id
* rows - number of rows
* cols - number of cols
* value - default value
* forceltr - always display as ltr
Example context (json):
{
"name": "test",
"cols": "30",
"rows": "3",
"value": "Excellent day for putting Slinkies on an escalator.",
"readonly": false,
"id": "test0"
}
}}
{{!
Setting configtextarea.
}}
<div class="form-textarea">
<textarea {{#readonly}}disabled{{/readonly}} rows="{{rows}}" cols="{{cols}}" id="{{id}}" name="{{name}}" spellcheck="true" class="form-control {{#forceltr}}text-ltr{{/forceltr}}">{{value}}</textarea>
</div>
@@ -0,0 +1,63 @@
{{!
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/>.
}}
{{!
@template core_admin/setting_configtime
Admin time setting template.
Context variables required for this template:
* name - form element name
* id - element id
* hours - list of valid hour options containing name, value, selected
* minutes - list of valid minute options containing name, value, selected
* readonly - bool
Example context (json):
{
"name": "test",
"id": "test0",
"readonly": false,
"minutes": [
{ "name": "00", "value": "0", "selected": true },
{ "name": "01", "value": "1", "selected": false }
],
"hours": [
{ "name": "1", "value": "1", "selected": true },
{ "name": "2", "value": "2", "selected": false }
]
}
}}
{{!
Setting configtime.
}}
<div class="form-time defaultsnext">
<div class="d-flex flex-wrap align-items-center text-ltr">
<label class="sr-only" for="{{id}}h">{{#str}}hours{{/str}}</label>
<select id="{{id}}h" name="{{name}}[h]" class="custom-select" {{#readonly}}disabled{{/readonly}}>
{{#hours}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/hours}}
</select>:
<label class="sr-only" for="{{id}}m">{{#str}}minutes{{/str}}</label>
<select id="{{id}}m" name="{{name}}[m]" class="custom-select" {{#readonly}}disabled{{/readonly}}>
{{#minutes}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/minutes}}
</select>
</div>
</div>
@@ -0,0 +1,52 @@
{{!
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/>.
}}
{{!
@template core_admin/setting_courselist_frontpage
Admin courselist_frontpage setting template.
Context variables required for this template:
* selects list of select objects containing id, name, key and options.
options is another nested list of items containing name, value and selected
Example context (json):
{
"selects": [
{
"id": "i1",
"name": "s1",
"key": "k1",
"options": [
{ "name": "Fish", "value": "snapper", "selected": true }
]
}
]
}
}}
{{!
Setting courselist_frontpage.
}}
<div class="mb-3">
{{#selects}}
<select id="{{id}}{{key}}" name="{{name}}[]" class="custom-select mb-1">
{{#options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/options}}
</select>
<br>
{{/selects}}
</div>
@@ -0,0 +1,46 @@
{{!
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/>.
}}
{{!
@template core_admin/setting_description
Admin setting description template.
Context variables required for this template:
* labelfor - id of the form element
* title - Setting title
* name - Setting name
Example context (json):
{
"title": "Setting title",
"name": "Name",
"description": "Description goes here"
}
}}
{{!
Setting description.
}}
<div class="form-item row">
<div class="form-label col-sm-3 text-sm-right">
<label>
{{{title}}}
</label>
</div>
<div class="form-setting col-sm-9">
<div class="form-description">{{{description}}}</div>
</div>
</div>
@@ -0,0 +1,56 @@
{{!
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/>.
}}
{{!
@deprecated since Moodle 4.3
@todo Final deprecation on Moodle 4.7 MDL-79052
@template core_admin/setting_devicedetectregex
Admin devicedetectregex setting template.
Context variables required for this template:
* expressions - List of expressions containing index, name, expression and value
Example context (json):
{
"expressions": [
{ "index": "i1", "name": "Name", "expression": "/bird|yellow/", "value": "Canary" }
]
}
}}
{{!
Setting devicedetectregex.
}}
<table class="table table-striped">
<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-control" value="{{expression}}">
</td>
<td class="c{{index}}">
<input type="text" name="{{name}}[value{{index}}]" class="form-control" value="{{value}}">
</td>
</tr>
{{/expressions}}
</tbody>
</table>
@@ -0,0 +1,69 @@
{{!
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/>.
}}
{{!
@template core_admin/setting_emoticons
Admin emoticons setting template.
Context variables required for this template:
* name - form element name
* id - element id
Example context (json):
{
"emoticons": [
{ "fields": [
{ "name": "Smile", "field": "f1", "value": ":)" }
]}
]
}
}}
{{!
Setting emoticons.
}}
<div class="mb-3">
<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 form-control text-ltr" 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>
@@ -0,0 +1,64 @@
{{!
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/>.
}}
{{!
@template core_admin/setting_encryptedpassword
Admin encrypted password template.
Context variables required for this template:
* name - form element name
* set - whether it is set or empty
* id - element id
Example context (json):
{
"name": "test",
"id": "test0",
"set": true
}
}}
<div class="core_admin_encryptedpassword" data-encryptedpasswordid="{{ id }}"
{{#novalue}}data-novalue="y"{{/novalue}}>
{{#set}}
<span>{{# str }} encryptedpassword_set, admin {{/ str }}</span>
{{/set}}
{{^set}}
<a href="#" title="{{# str }} encryptedpassword_edit, admin {{/ str }}">
<span>{{# str }} novalueclicktoset, form {{/ str }}</span>
{{# pix }} t/passwordunmask-edit, core, {{# str }} passwordunmaskedithint, form {{/ str }}{{/ pix }}
</a>
{{/set}}
<input style="display: none" type="password" name="{{name}}" disabled>
{{!
Using buttons instead of links here allows them to be connected to the label, so the button
works if you click the label.
}}
{{#set}}
<button type="button" id="{{id}}" title="{{# str }} encryptedpassword_edit, admin {{/ str }}" class="btn btn-link" data-editbutton>
{{# pix }} t/passwordunmask-edit, core, {{/ pix }}
</button>
{{/set}}
<button type="button" style="display: none" title="{{# str }} cancel {{/ str }}" class="btn btn-link" data-cancelbutton>
<i class="icon fa fa-times"></i>
</button>
</div>
{{#js}}
require(['core_form/encryptedpassword'], function(encryptedpassword) {
new encryptedpassword.EncryptedPassword("{{ id }}");
});
{{/js}}
@@ -0,0 +1,52 @@
{{!
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/>.
}}
{{!
@template core_admin/setting_filetypes
Renders the admin_setting_filetypes setting element.
Context variables required for this template:
* id - element id
* name - form element name
* value - element value
* descriptions - data for the core_form/filetypes-descriptions template
Example context (json):
{
"id": "test0",
"name": "test",
"value": ".jpg,.gif",
"descriptions": {
"hasdescriptions": true,
"descriptions": [
{
"description": "Image (JPEG)",
"extensions": ".jpeg .jpe .jpg"
},
{
"description": "Image (GIF)",
"extensions": ".gif"
}
]
}
}
}}
<div class="form-text defaultsnext">
<input type="text" name="{{name}}" value="{{value}}" size="30" id="{{id}}" class="text-ltr">
<span data-filetypesbrowser="{{id}}"></span>
<div data-filetypesdescriptions="{{id}}">{{#descriptions}}{{>core_form/filetypes-descriptions}}{{/descriptions}}</div>
</div>
+38
View 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/>.
}}
{{!
@template core_admin/setting_flag
Admin flag setting template.
Context variables required for this template:
* name - form element name
* value - form element value
* checked - is it checked
* id - element id
* label - element label
Example context (json):
{
"name": "test",
"id": "test0",
"checked": true,
"label": "Do you like crackers?"
}
}}
<input type="checkbox" name="{{name}}" value="{{value}}" id="{{id}}" {{#checked}}checked{{/checked}}>
<label for="{{id}}">{{label}}</label>
@@ -0,0 +1,50 @@
{{!
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/>.
}}
{{!
@template core_admin/setting_gradecat_combo
Admin gradecat_combo setting template.
Context variables required for this template:
* name - form element name
* id - element id
* options - list of options containing name, value and selected
* forced - is it forced
Example context (json):
{
"name": "test",
"id": "test0",
"options": [
{ "name": "Option name", "value": "Value", "selected": true }
],
"forced": true
}
}}
{{!
Setting configselect.
}}
<div class="mb-3">
<select id="{{id}}" name="{{name}}[value]" class="form-select custom-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>
</div>
+38
View 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/>.
}}
{{!
@template core_admin/setting_heading
Admin heading setting template.
Context variables required for this template:
* title - Title text
* description - Description containing descriptionformatted
Example context (json):
{
"title": "Favourite cheeses",
"description": true,
"descriptionformatted": "Stilton, Cheddar, Edam"
}
}}
{{#title}}
<h3 class="main">{{{title}}}</h3>
{{/title}}
{{#description}}
<div class="box generalbox formsettingheading">{{{descriptionformatted}}}</div>
{{/description}}
@@ -0,0 +1,116 @@
{{!
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/>.
}}
{{!
@template core_admin/setting_manage_plugins
Admin plugin management template.
Context variables required for this template:
* plugins
Example context (json):
{
"infocolumnname": "Food",
"plugins": [
{
"enabled": true,
"plugin": "Forum",
"info": "Lettuce",
"movedownlink": "#",
"toggletarget": false,
"togglelink": "#",
"settingslink": "#",
"uninstalllink": "#"
},
{
"enabled": false,
"plugin": "Database",
"info": "Cheese",
"moveuplink": "#",
"toggletarget": true,
"togglelink": "#",
"settingslink": "#",
"uninstalllink": "#"
}
]
}
}}
<table class="admintable generaltable">
<thead>
<tr>
<th class="header">{{#str}}name, moodle{{/str}}</th>
{{#infocolumnname}}
<th class="header">{{infocolumnname}}</th>
{{/infocolumnname}}
<th class="header">{{#str}}order, moodle{{/str}}</th>
<th class="header">{{#str}}isenabled, plugin{{/str}}</th>
<th class="header">{{#str}}settings, moodle{{/str}}</th>
<th class="header">{{#str}}uninstall, plugin{{/str}}</th>
</tr>
</thead>
<tbody>
{{#plugins}}
<tr {{^enabled}}class="dimmed_text"{{/enabled}}>
<td>{{plugin}}</td>
{{#infocolumnname}}
<td>
{{info}}
</td>
{{/infocolumnname}}
<td class="text-nowrap">
{{#moveuplink}}
<a href="{{{moveuplink}}}">
{{#pix}}t/up, moodle, {{#str}} up, moodle {{/str}}{{/pix}}
</a>
{{/moveuplink}}
{{^moveuplink}}
{{#pix}}spacer, moodle{{/pix}}
{{/moveuplink}}
{{#movedownlink}}
<a href="{{{movedownlink}}}">
{{#pix}}t/down, moodle, {{#str}} down, moodle {{/str}}{{/pix}}
</a>
{{/movedownlink}}
{{^movedownlink}}
{{#pix}}spacer, moodle{{/pix}}
{{/movedownlink}}
</td>
<td>
<a href="{{{togglelink}}}">
{{#toggletarget}}
{{#pix}}i/show, moodle, {{#str}} enable, moodle {{/str}}{{/pix}}
{{/toggletarget}}
{{^toggletarget}}
{{#pix}}i/hide, moodle, {{#str}} disable, moodle {{/str}}{{/pix}}
{{/toggletarget}}
</a>
</td>
<td>
{{#settingslink}}
<a href="{{{settingslink}}}">{{#str}}settings,plugin{{/str}}</a>
{{/settingslink}}
</td>
<td>
{{#uninstalllink}}
<a href="{{{uninstalllink}}}">{{#str}}uninstall,plugin{{/str}}</a>
{{/uninstalllink}}
</td>
</tr>
{{/plugins}}
</tbody>
</table>
@@ -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/>.
}}
{{!
@template core_admin/setting_special_calendar_weekend
Admin special_calendar_weekend setting template.
Context variables required for this template:
* name - form element name
* id - form element id
* days - list of days containing index, label, checked
Example context (json):
{
"name": "test",
"id": "i1",
"days": [
{ "index": 0, "label": "Monday", "checked": true },
{ "index": 0, "label": "Tuesday", "checked": false }
]
}
}}
<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>
+62
View File
@@ -0,0 +1,62 @@
{{!
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/>.
}}
{{!
@template core_admin/settings
Admin settings form template.
Context variables required for this template:
* actionurl - url to submit to
* params - list of parameters containing name and value
* return - page to return to
* title - form title
* settings - raw html for settings
* showsave - true if we need save buttons
Example context (json):
{
"actionurl": "/",
"return": "/",
"title": "Settings Form",
"settings": "RAW HTML",
"showsave": true
}
}}
{{!
Settings.
}}
<form action="{{actionurl}}" method="post" id="adminsettings">
<div class="settingsform">
{{#params}}
<input type="hidden" name="{{name}}" value="{{value}}">
<input type="hidden" name="action" value="save-settings">
{{/params}}
<input type="hidden" name="sesskey" value="{{sesskey}}">
<input type="hidden" name="return" value="{{return}}">
{{#title}}
<h2>{{title}}</h2>
{{/title}}
{{{settings}}}
{{#showsave}}
<div class="row">
<div class="offset-sm-3 col-sm-3">
<button type="submit" class="btn btn-primary">{{#str}}savechanges, admin{{/str}}</button>
</div>
</div>
{{/showsave}}
</div>
</form>
@@ -0,0 +1,72 @@
{{!
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/>.
}}
{{!
@template core_admin/settings_search_results
Admin setting search results template.
Context variables required for this template:
* actionurl - Url to post to
* hasresults - True if there are results
* results - List of results containing url, title, path (array of strings), settings (array of raw html)
* showsave - Show save buttons
Example context (json):
{
"actionurl": "/",
"hasresults": true,
"results": [
{ "url": "/", "title": "Match!", "path": ["Administration", "Match!"], "settings": [ "blah blah blah" ] }
]
}
}}
<form action="{{actionurl}}" method="post" id="adminsettings">
<div>
<input type="hidden" name="sesskey" value="{{sesskey}}">
<input type="hidden" name="action" value="save-settings">
</div>
<fieldset>
<div class="clearer"></div>
<h2 class="main">{{#str}}searchresults, admin{{/str}}</h2>
{{#hasresults}}
{{#results}}
<h3 class="adminpagetitle"><a href="{{url}}">{{{title}}}</a></h3>
<ul class="adminpagepath" aria-label="{{#str}} pagepath, core {{/str}}">
{{#path}}
<li class="small text-muted">{{.}}</li>
{{/path}}
</ul>
<fieldset class="adminsettings">
{{#settings}}
<div class="clearer"></div>
{{{.}}}
{{/settings}}
</fieldset>
{{/results}}
{{#showsave}}
<div class="row">
<div class="offset-sm-3 col-sm-3">
<button type="submit" class="btn btn-primary">{{#str}}savechanges, admin{{/str}}</button>
</div>
</div>
{{/showsave}}
{{/hasresults}}
{{^hasresults}}
{{#str}}noresults, admin{{/str}}
{{/hasresults}}
</fieldset>
</form>
@@ -0,0 +1,101 @@
{{!
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/>.
}}
{{!
@template core_admin/themeselector/theme_card
This template renders the singular card for a theme.
Example context (json):
{
"name": "Boost",
"choose": "boost",
"image": "http://moodlesite/theme/image.php?theme=boost&image=screenshot&component=theme",
"current": true,
"actionurl": "http://moodlesite/admin/themeselector.php",
"sesskey": "123XYZ",
"settingsurl": "http://moodlesite/admin/settings.php?section=themesettingboost",
"reporturl": "http://moodlesite/report/themeusage/index.php?themechoice=boost"
}
}}
<div class="card theme-card" role="listitem" id="theme-card-{{choose}}" aria-labelledby="theme-name-{{choose}} {{#current}}current-theme-{{choose}}{{/current}}">
<div class="card-img card-img-top" style='background-image: url("{{image}}");'></div>
<div class="card-body p-3">
<div class="d-flex">
<div class="flex-grow-1">
<h3 class="h5" id="theme-name-{{choose}}">{{name}}</h3>
</div>
<div>
<button
type="button"
id="theme-preview-{{choose}}"
class="btn btn-link p-0"
title="{{#str}}previewthemename, moodle, {{name}}{{/str}}"
data-action="preview"
data-name="{{name}}"
data-image="{{image}}"
data-current="{{current}}"
data-actionurl="{{actionurl}}"
data-choose="{{choose}}"
data-sesskey="{{sesskey}}">
<i class="icon fa fa-info-circle m-0" aria-hidden="true"></i>
<span class="sr-only">{{#str}}previewthemename, moodle, {{name}}{{/str}}</span>
</button>
{{#reporturl}}
<a
href="{{reporturl}}"
id="theme-usage-report-{{choose}}"
class="btn btn-link p-0 ml-2"
title="{{#str}}themeusagereportname, admin, {{name}}{{/str}}">
<i class="icon fa fa-area-chart m-0" aria-hidden="true"></i>
<span class="sr-only">{{#str}}themeusagereportname, admin, {{name}}{{/str}}</span>
</a>
{{/reporturl}}
{{#settingsurl}}
<a
href="{{settingsurl}}"
id="theme-settings-{{choose}}"
class="btn btn-link p-0 ml-2"
title="{{#str}}themeeditsettingsname, admin, {{name}}{{/str}}">
<i class="icon fa fa-cog m-0" aria-hidden="true"></i>
<span class="sr-only">{{#str}}themeeditsettingsname, admin, {{name}}{{/str}}</span>
</a>
{{/settingsurl}}
</div>
</div>
</div>
<div class="d-flex align-items-end flex-column p-3">
{{#current}}
<strong><span class="text-success" id="current-theme-{{choose}}">{{#str}}currenttheme, moodle{{/str}}</span></strong>
{{#definedinconfig}}
<div class="alert alert-info p-1">{{#str}}configoverride, admin{{/str}}</div>
{{/definedinconfig}}
{{/current}}
{{^current}}
{{#actionurl}}
<form method="post" action="{{actionurl}}" id="theme-select-form-{{choose}}">
<input type="hidden" name="sesskey" value="{{sesskey}}">
<input type="hidden" name="choose" value="{{choose}}">
<button type="submit" class="btn btn-primary">
<span aria-hidden="true">{{#str}}selecttheme, moodle{{/str}}</span>
<span class="sr-only">{{#str}}selectthemename, moodle, {{name}}{{/str}}</span>
</button>
</form>
{{/actionurl}}
{{/current}}
</div>
</div>
@@ -0,0 +1,58 @@
{{!
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/>.
}}
{{!
@template core_admin/themeselector/theme_preview_modal
This template renders the modal for the selected theme.
Example context (json):
{
"name": "Boost",
"choose": "boost",
"image": "http://moodlesite/theme/image.php?theme=boost&image=screenshot&component=theme",
"description": "Boost is a modern highly-customisable theme...",
"current": true,
"actionurl": "http://moodlesite/admin/themeselector.php",
"sesskey": "123XYZ"
}
}}
<div>
<div>
<img
src="{{image}}"
alt=""
id="modal-theme-preview-{{choose}}"
class="w-100 mb-3">
</div>
<div class="d-flex">
<div class="flex-grow-1">
<p><strong>{{#str}}themepreviewdescription, moodle, {{name}}{{/str}}</strong></p>
</div>
<div class="d-flex align-items-end flex-column">
{{#current}}
<strong><span class="text-success">{{#str}}currenttheme, moodle{{/str}}</span></strong>
{{#definedinconfig}}
<div class="alert alert-info p-1">{{#str}}configoverride, admin{{/str}}</div>
{{/definedinconfig}}
{{/current}}
</div>
</div>
<p>{{description}}</p>
{{#actionurl}}
<form method="post" action="{{actionurl}}" id="modal-theme-select-form-{{choose}}">
<input type="hidden" name="sesskey" value="{{sesskey}}">
<input type="hidden" name="choose" value="{{choose}}">
</form>
{{/actionurl}}
</div>
@@ -0,0 +1,77 @@
{{!
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/>.
}}
{{!
@template core_admin/themeselector/theme_selector
This template renders the cards view for choosing a theme.
Example context (json):
{
"themes": [
{
"name": "Boost",
"choose": "boost",
"image": "http://moodlesite/theme/image.php?theme=boost&image=screenshot&component=theme",
"current": true,
"actionurl": "http://moodlesite/admin/themeselector.php",
"sesskey": "123XYZ"
},
{
"name": "Classic",
"choose": "classic",
"image": "http://moodlesite/theme/image.php?theme=classic&image=screenshot&component=theme",
"actionurl": "http://moodlesite/admin/themeselector.php",
"sesskey": "123XYZ"
}
],
"resetbutton": {
"id": "single_button123",
"method": "post",
"url": "index.php",
"label": "Clear theme caches",
"params": [
{
"name": "sesskey",
"value": "123XYZ"
},
{
"name": "reset",
"value": "1"
}
]
}
}
}}
<h2>{{#str}}themeselector, admin{{/str}}</h2>
{{#resetbutton}}
<div class="mb-3">
{{>core/single_button}}
</div>
{{/resetbutton}}
<div class="card-grid row row-cols-1 row-cols-md-3 mx-0" id="themelist" data-region="card-deck" role="list" data-definedinconfig="{{definedinconfig}}">
{{#themes}}
<div class="col d-flex px-1 mb-2">
{{>core_admin/themeselector/theme_card}}
</div>
{{/themes}}
</div>
{{#js}}
require(['core_admin/themeselector/preview_modal'], function(Modal) {
Modal.init();
});
{{/js}}
@@ -0,0 +1,47 @@
{{!
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/>.
}}
{{!
@template core_admin/webservice_token_new
This is the template for displaying the newly created webservice token.
Context variable required for this template:
* token - Token value
Example context (json):
{
"token": "ef9ee4d0c6eed5eab8453a63b93b5b8b"
}
}}
<div class="d-inline-block">
<div class="alert alert-warning">
<div class="lead">{{#str}}tokennewmessage, webservice{{/str}}</div>
</div>
<div class="alert alert-primary">
<div class="lead">{{tokenname}}</div>
<div class="d-flex justify-content-start align-middle">
<div class="lead text-break pt-1" id="copytoclipboardtoken">{{token}}</div>
<button class="btn btn-primary ml-2" data-action="copytoclipboard" data-clipboard-target="#copytoclipboardtoken" data-clipboard-success-message="{{#str}}tokencopied, webservice{{/str}}">
{{#pix}}t/copy, core {{/pix}}{{#str}}copytoclipboard{{/str}}</button>
</div>
</div>
</div>
{{#js}}
require(['core/copy_to_clipboard']);
{{/js}}