{{!
    This file is part of Moodle - http://moodle.org/

    Moodle is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Moodle is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
}}
{{!
    @template auth_oauth2/idps

    Render available oauth2 idps for testing.

    Classes required for JS:
    * none

    Data attributes required for JS:
    * none

    Context variables required for this template:
    * idps - array of oAuth IdP objects
      * name - the display name of the IdP
      * url - the url of the oAuth test endpoint
      * iconurl - the icon of the oAuth IdP

    Example context (json):
    {
        "idps": [{
            "name": "Microsoft",
            "url": "http:\/\/localhost\/auth\/oauth2\/test.php?id=2&amp;sesskey=4js6afElZh",
            "iconurl": "https:\/\/www.microsoft.com\/favicon.ico"
        }]
    }
}}

<div class="container mb-3">
    <div class="potentialidps-header row">
        <h3>{{#str}}testidplogin, auth_oauth2{{/str}}</h3>
    </div>
    <div class="potentialidps row">
        <div class="potentialidplist">
            {{#idps}}
            <div class="potentialidp mb-2">
                <a class="btn btn-secondary btn-block" href="{{{url}}}" title="{{name}}">
                    {{#iconurl}}<img src="{{{iconurl}}}" alt="{{name}}" width="24" height="24" class="mr-1"/>{{/iconurl}}
                    {{name}}
                </a>
            </div>
            {{/idps}}
        </div>
    </div>
</div>
