moodle/theme/boost/templates/core/url_select.mustache
2016-09-23 10:57:13 +01:00

49 lines
1.9 KiB
Text

<div class="{{classes}}">
<form method="post" action="{{action}}" class="form-inline" id="{{formid}}">
<input type="hidden" name="sesskey" value="{{sesskey}}">
<div class="form-group">
{{#label}}
<label for="{{id}}" {{#labelattributes}}{{name}}="{{value}}" {{/labelattributes}}>
{{label}}
</label>
{{/label}}
{{#helpicon}}
{{>core/help_icon}}
{{/helpicon}}
<select {{#attributes}}{{name}}="{{value}}" {{/attributes}} id="{{id}}" class="form-control {{classes}}" name="jump">
{{#options}}
{{#isgroup}}
<optgroup label="{{name}}">
{{#options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/options}}
</optgroup>
{{/isgroup}}
{{^isgroup}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/isgroup}}
{{/options}}
</select>
</div>
{{#showbutton}}
<input type="submit" class="btn btn-secondary" value="{{showbutton}}">
{{/showbutton}}
{{^showbutton}}
<noscript>
<input type="submit" class="btn btn-secondary" value="{{#str}}go, core{{/str}}">
</noscript>
{{/showbutton}}
</form>
</div>
{{^showbutton}}
{{#js}}
require(['core/yui'], function(Y) {
Y.use('moodle-core-formautosubmit', function() {
M.core.init_formautosubmit({
selectid: '{{id}}',
nothing: {{#hasnothing}}'{{nothingkey}}'{{/hasnothing}}{{^hasnothing}}false{{/hasnothing}}
});
});
});
{{/js}}
{{/showbutton}}