{% extends "misago/admin/generic/form.html" %}
{% load i18n misago_admin_form %}


{% block title %}
{{ target }} | {{ active_link.name }} | {{ block.super }}
{% endblock title %}


{% block page-header %}
{{ block.super }} <small>{{ target }}</small>
{% endblock page-header %}


{% block form-header %}
{% if target.is_active %}
  {% trans "Edit social login" context "admin social auth provider form" %}
{% else %}
  {% trans "Setup social login" context "admin social auth provider form" %}
{% endif %}
{% endblock %}


{% block form-body %}
<div class="form-fieldset">
  <fieldset>
    <legend>{% trans "General" context "admin social auth provider form" %}</legend>

    {% form_row form.is_active %}
    {% block form-settings %}
    {% form_row form.key %}
    {% form_row form.secret %}
    {% form_row form.associate_by_email %}
    {% endblock form-settings %}

  </fieldset>
</div>
<div class="form-fieldset">
  <fieldset>
    <legend>{% trans "Button appearance" context "admin social auth provider form" %}</legend>

    {% form_row form.button_text %}
    {% form_row form.button_color %}

  </fieldset>
</div>
{% endblock form-body %}


{% block javascripts %}
<script type="text/javascript">
  window.misago.initColorpicker({
    elementId: "id_button_color"
  })
</script>
{% endblock %}
