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 auth_oauth2/idps
19
 
20
    Render available oauth2 idps for testing.
21
 
22
    Classes required for JS:
23
    * none
24
 
25
    Data attributes required for JS:
26
    * none
27
 
28
    Context variables required for this template:
29
    * idps - array of oAuth IdP objects
30
      * name - the display name of the IdP
31
      * url - the url of the oAuth test endpoint
32
      * iconurl - the icon of the oAuth IdP
33
 
34
    Example context (json):
35
    {
36
        "idps": [{
37
            "name": "Microsoft",
38
            "url": "http:\/\/localhost\/auth\/oauth2\/test.php?id=2&amp;sesskey=4js6afElZh",
39
            "iconurl": "https:\/\/www.microsoft.com\/favicon.ico"
40
        }]
41
    }
42
}}
43
 
44
<div class="container mb-3">
45
    <div class="potentialidps-header row">
46
        <h3>{{#str}}testidplogin, auth_oauth2{{/str}}</h3>
47
    </div>
48
    <div class="potentialidps row">
49
        <div class="potentialidplist">
50
            {{#idps}}
51
            <div class="potentialidp mb-2">
52
                <a class="btn btn-secondary btn-block" href="{{{url}}}" title="{{name}}">
53
                    {{#iconurl}}<img src="{{{iconurl}}}" alt="{{name}}" width="24" height="24" class="mr-1"/>{{/iconurl}}
54
                    {{name}}
55
                </a>
56
            </div>
57
            {{/idps}}
58
        </div>
59
    </div>
60
</div>