Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
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_selector
19
 
20
    This template renders the cards view for displaying available authentications to a user.
21
 
22
    Example context (json):
23
    {
24
        "factors": [
25
            {
26
                "label": "SMS Mobile phone",
27
                "name": "sms",
28
                "info": "Have a verification number sent to the mobile number you choose.",
29
                "icon": "fa-commenting-o",
30
                "active": true,
31
                "button": {
32
                    "id": "single_button123",
33
                    "method": "post",
34
                    "action": "action.php",
35
                    "label": "Setup",
36
                    "params": [
37
                        {
38
                            "name": "sesskey",
39
                            "value": "123XYZ"
40
                        },
41
                        {
42
                            "name": "factor",
43
                            "value": "sms"
44
                        },
45
                        {
46
                            "name": "action",
47
                            "value": "manage"
48
                        }
49
                    ]
50
                }
51
            },
52
            {
53
                "label": "Authenticator app",
54
                "name": "totp",
55
                "info": "Use an authenticator app on your mobile phone.",
56
                "icon": "fa-mobile-screen",
57
                "active": false,
58
                "button": {
59
                    "id": "single_button456",
60
                    "method": "post",
61
                    "action": "action.php",
62
                    "label": "Setup",
63
                    "params": [
64
                        {
65
                            "name": "sesskey",
66
                            "value": "123XYZ"
67
                        },
68
                        {
69
                            "name": "factor",
70
                            "value": "totp"
71
                        },
72
                        {
73
                            "name": "action",
74
                            "value": "setup"
75
                        }
76
                    ]
77
                }
78
            }
79
        ]
80
    }
81
}}
82
<h2>{{#str}}mfa, tool_mfa{{/str}}</h2>
83
<p>{{#str}}mfa:intro, tool_mfa{{/str}}</p>
84
<div class="card-deck dashboard-card-deck" id="mfalist" data-region="card-deck" role="list">
85
    {{#factors}}
86
        {{>tool_mfa/mfa_card}}
87
    {{/factors}}
88
</div>