{% extends "sentry/bases/organization.html" %}

{% load i18n %}

{% block org_auth_settings_nav %}active{% endblock %}

{% block inner %}
  <div class="page-header">
    <h2>{{ provider_name }} Authentication</h2>
  </div>

  <div class="row">
    <div class="span9">
      <form method="POST">
        {% csrf_token %}

        <h3>Login URL</h3>

        <p>While Sentry will try to be clever about directing members to the appropriate login form, you're safest just to hit up your organization-specific login when visiting the app:</p>

        <pre class="clippy" data-text="{{ login_url }}"><a href="{{ login_url }}">{{ login_url }}</a></pre>

        {% if pending_links_count %}
          <hr>

          <h3>Unlinked Members</h3>

          <button class="btn btn-primary pull-right" name="op"
                  value="reinvite" style="margin-left: 20px">Send Reminders</button>

          <p>There are currently {{ pending_links_count }} member(s) who have not yet linked their account with {{ provider_name }}. Until this is done they will be unable to access the organization.</p>

        {% endif %}

        {% if content %}
          <hr>

          {{ content }}
        {% endif %}

        <hr>

        <h3>Disable {{ provider_name }} Authentication</h3>

        <button class="btn btn-danger pull-right" name="op"
                value="disable" style="margin-left: 20px">Disable {{ provider_name }} Auth</button>

        <p>Your organization will no longer being able to authenticate with their existing accounts. This will prevent any existing users from logging in unless they have access outside of SSO.</p>

      </form>
    </div>
  </div>
{% endblock %}
