{# -*- coding: utf-8 -*-

  Copyright (C) 2025 Graz University of Technology.

  invenio-edugain is free software; you can redistribute it and/or modify it
  under the terms of the MIT License; see LICENSE file for more details.
#}

{% extends config.ACCOUNTS_BASE_TEMPLATE %}


{% block javascript %}
  {{ super() }}
  {{ webpack['invenio-edugain-discovery.js'] }}
{% endblock javascript %}

{% block css %}
  {{ super() }}
  {{ webpack[config.EDUGAIN_DISCOVERY_CSS] }}
{% endblock css %}

{% block page_body %}
  <div class="spacer-long"></div>
  <div class="spacer-long"></div>
  <div class="ui container">
    <div class="ui centered grid padded">
      <div class="ui padded segments large form">
        <div class="ui segment padded">
          <div class="divider hidden"></div>
          <h3 class="ui login header">{{ _("Find your institution") }}</h3>
          <div class="ui divider"></div>
          <div id="idpSelect" data-shibboleth-eds-config='{{ shibboleth_eds_config | tojson }}'>
            <!-- content is provided by shibboleth-eds -->
          </div>
          {% if config.EDUGAIN_DISCOVERY_CONTACT_EMAIL is not none %}
            <div style="margin-top: 1rem; text-align: left; width: 600px;">
              <details>
                <summary>
                  {{ _("Why isn't my institution showing?") }}
                </summary>
                <p>
                  {{ _("To ensure security of the platform, organizations are only added after our IT team found them to be secure.") }}
                  <br>
                  {{ _("To get your organization white-listed, send an email to our IT team:") }}
                  <a href="mailto:{{ config.EDUGAIN_DISCOVERY_ADDITION_REQUEST_EMAIL }}">{{ config.EDUGAIN_DISCOVERY_ADDITION_REQUEST_EMAIL }}</a>
                </p>
              </details>
            </div>
          {% endif %}
        </div>
      </div>
    </div>
  </div>
{% endblock page_body %}
