mirror of
https://github.com/moodle/moodle.git
synced 2025-08-10 03:16:42 +02:00
MDL-62191 output: New extra attributes for single_button
Useful for data- attributes.
This commit is contained in:
parent
9528b1ff5b
commit
ca81e906e0
4 changed files with 36 additions and 3 deletions
|
@ -42,7 +42,13 @@
|
|||
"url" : "#",
|
||||
"primary" : true,
|
||||
"tooltip" : "This is a tooltip",
|
||||
"label" : "This is a the button text"
|
||||
"label" : "This is a the button text",
|
||||
"attributes": [
|
||||
{
|
||||
"name": "data-attribute",
|
||||
"value": "yeah"
|
||||
}
|
||||
]
|
||||
}
|
||||
}}
|
||||
<div class="{{classes}}">
|
||||
|
@ -53,7 +59,8 @@
|
|||
<button type="submit" class="btn {{#primary}}btn-primary{{/primary}}{{^primary}}btn-secondary{{/primary}}"
|
||||
id="{{id}}"
|
||||
title={{#quote}}{{tooltip}}{{/quote}}
|
||||
{{#disabled}}disabled{{/disabled}}>{{label}}</button>
|
||||
{{#disabled}}disabled{{/disabled}}
|
||||
{{#attributes}} {{name}}={{#quote}}{{value}}{{/quote}} {{/attributes}}>{{label}}</button>
|
||||
</form>
|
||||
</div>
|
||||
{{#hasactions}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue