1 |
efrain |
1 |
{{!
|
|
|
2 |
This file is part of Moodle - http://moodle.org/
|
|
|
3 |
|
|
|
4 |
Moodle is free software: you can redistribute it and/or modify
|
|
|
5 |
it under the terms of the GNU General Public License as published by
|
|
|
6 |
the Free Software Foundation, either version 3 of the License, or
|
|
|
7 |
(at your option) any later version.
|
|
|
8 |
|
|
|
9 |
Moodle is distributed in the hope that it will be useful,
|
|
|
10 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
11 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
12 |
GNU General Public License for more details.
|
|
|
13 |
|
|
|
14 |
You should have received a copy of the GNU General Public License
|
|
|
15 |
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
|
|
16 |
}}
|
|
|
17 |
{{!
|
|
|
18 |
@template mod_unilabel/element_action_buttons
|
|
|
19 |
Template to get the action buttons for a draggable element.
|
|
|
20 |
|
|
|
21 |
Example context (json):
|
|
|
22 |
{
|
|
|
23 |
"type": "grid",
|
|
|
24 |
"repeatindex": 1,
|
|
|
25 |
"repeatnr": 2
|
|
|
26 |
}
|
|
|
27 |
}}
|
|
|
28 |
|
|
|
29 |
<span class="ml-auto"><!-- A dummy to move the buttons to the right side. --></span>
|
|
|
30 |
<span>
|
|
|
31 |
<i class="fa fa-arrows fa-fw draghandle"></i>
|
|
|
32 |
</span>
|
|
|
33 |
<a href="#" class="delete-button">
|
|
|
34 |
<i class="fa fa-trash fa-fw text-danger" data-toggle="modal" data-target="#unilabel_{{type}}_confirm_{{repeatindex}}"></i>
|
|
|
35 |
<span class="sr-only">{{#str}} delete_element, mod_unilabel {{/str}}-{{repeatnr}}</span>
|
|
|
36 |
</a>
|
|
|
37 |
<div id="unilabel_{{type}}_confirm_{{repeatindex}}" class="modal" tabindex="-1">
|
|
|
38 |
<div class="modal-dialog">
|
|
|
39 |
<div class="modal-content">
|
|
|
40 |
<div class="modal-header">
|
|
|
41 |
<h5 class="modal-title">
|
|
|
42 |
{{#str}}confirm{{/str}}
|
|
|
43 |
</h5>
|
|
|
44 |
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
45 |
<span aria-hidden="true">×</span>
|
|
|
46 |
</button>
|
|
|
47 |
</div>
|
|
|
48 |
<div class="modal-body">
|
|
|
49 |
{{#str}} delete_element_nr, mod_unilabel, {{repeatnr}} {{/str}}
|
|
|
50 |
</div>
|
|
|
51 |
<div class="modal-footer">
|
|
|
52 |
<button type="button" class="btn btn-secondary" data-dismiss="modal">{{#str}} no {{/str}}</button>
|
|
|
53 |
<button type="button" class="btn btn-primary" data-dismiss="modal" data-action="deleteelement" data-id="{{repeatindex}}">{{#str}} yes {{/str}}</button>
|
|
|
54 |
</div>
|
|
|
55 |
</div>
|
|
|
56 |
</div>
|
|
|
57 |
</div>
|