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 tool_mfa/mfa_card
|
|
|
19 |
|
|
|
20 |
This template renders the singular card for an authentication factor.
|
|
|
21 |
|
|
|
22 |
Example context (json):
|
|
|
23 |
{
|
|
|
24 |
"label": "SMS Mobile phone",
|
|
|
25 |
"name": "sms",
|
|
|
26 |
"info": "Have a verification number sent to the mobile number you choose.",
|
|
|
27 |
"icon": "fa-commenting-o",
|
|
|
28 |
"active": true,
|
|
|
29 |
"button": {
|
|
|
30 |
"id": "single_button123",
|
|
|
31 |
"method": "post",
|
|
|
32 |
"action": "action.php",
|
|
|
33 |
"label": "Setup",
|
|
|
34 |
"params": [
|
|
|
35 |
{
|
|
|
36 |
"name": "sesskey",
|
|
|
37 |
"value": "123XYZ"
|
|
|
38 |
},
|
|
|
39 |
{
|
|
|
40 |
"name": "factor",
|
|
|
41 |
"value": "sms"
|
|
|
42 |
},
|
|
|
43 |
{
|
|
|
44 |
"name": "action",
|
|
|
45 |
"value": "setup"
|
|
|
46 |
}
|
|
|
47 |
]
|
|
|
48 |
}
|
|
|
49 |
}
|
|
|
50 |
}}
|
|
|
51 |
<div class="card dashboard-card {{#active}}active{{/active}}" role="listitem" id="factor-card-{{name}}" aria-labelledby="factor-name-{{name}} {{#active}}active-factor-{{name}}{{/active}}">
|
|
|
52 |
<div class="card-img p-3">
|
|
|
53 |
<div class="icon-circle {{^active}}reversed{{/active}}">
|
|
|
54 |
<i class="icon iconsize-big fa {{icon}}" role="presentation"></i>
|
|
|
55 |
</div>
|
|
|
56 |
</div>
|
|
|
57 |
<div class="card-body p-3">
|
|
|
58 |
<div class="d-flex">
|
|
|
59 |
<div class="flex-grow-1">
|
|
|
60 |
<h3 class="h5" id="factor-name-{{name}}">{{label}}</h3>
|
|
|
61 |
{{{info}}}
|
|
|
62 |
</div>
|
|
|
63 |
</div>
|
|
|
64 |
</div>
|
|
|
65 |
<div class="d-flex align-items-end justify-content-between p-3">
|
|
|
66 |
{{#active}}
|
|
|
67 |
<div class="d-flex">
|
|
|
68 |
<strong><span class="text-success" id="active-factor-{{name}}">{{#str}}active, moodle{{/str}}</span></strong>
|
|
|
69 |
</div>
|
|
|
70 |
{{/active}}
|
|
|
71 |
{{#button}}
|
|
|
72 |
<div class="d-flex ml-auto">
|
|
|
73 |
{{>core/single_button}}
|
|
|
74 |
</div>
|
|
|
75 |
{{/button}}
|
|
|
76 |
</div>
|
|
|
77 |
</div>
|
|
|
78 |
|