Skip to content

Commit

Permalink
MDL-82187 core: Add default type for single button in template
Browse files Browse the repository at this point in the history
  • Loading branch information
djarran committed Jul 21, 2024
1 parent d7cb2a6 commit f0c5d66
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/templates/single_button.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
{{#params}}
<input type="hidden" name="{{name}}" value="{{value}}">
{{/params}}
<button type="submit" class="btn btn-{{type}}"
<button type="submit" class="btn btn-{{type}}{{^type}}secondary{{/type}}"
id="{{id}}"
{{#tooltip}}title="{{tooltip}}"{{/tooltip}}
{{#disabled}}disabled{{/disabled}}
Expand Down
12 changes: 10 additions & 2 deletions mod/quiz/templates/overrides_actions.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@
Example context (json):
{
"overridesnav": {
"id": "url_select_test",
"action": "https://example.com/post",
"formid": "url_select_form",
"sesskey": "sesskey",
"label": "core/url_select",
"options": [{
"name": "User overrides",
"value": "/mod/quiz/overrides.php?cmid=71&mode=user"
Expand All @@ -39,13 +44,16 @@
"name": "Group overrides",
"value": "/mod/quiz/overrides.php?cmid=71&mode=group"
}
]
],
"disabled": false,
"title": "Some cool title"
},
"addoverridebutton": {
"id": "single_button1234",
"type": "primary",
"method": "get",
"url": "http://localhost/moodle/mod/quiz/overrideedit.php",
"lablel": "Add user override",
"label": "Add user override",
"classes": "singlebutton",
"disabled": false,
"params": [
Expand Down

0 comments on commit f0c5d66

Please sign in to comment.