{% extends 'flask_user/public_base.html' %}

{% block content %}
{% from "base_templates/form_macros.html" import render_submit_field %}
<h1>{{ title }}</h1>

<p>{{ description }}</p>

<form action="" method="POST" role="form">
  {{ form.hidden_tag() }}
  {% if uses_github %}
  <div class="form-check">
    {{ form.shared(type='checkbox', class='form-check-input') }}
    <label class="form-check-label" for="{{ form.shared.id }}">{{ form.shared.label.text }}</label>
  </div>
  <div class="form-check">
    {{ form.orgs(type='checkbox', class='form-check-input') }}
    <label class="form-check-label" for="{{ form.orgs.id }}">{{ form.orgs.label.text }}</label>
  </div>
  {% endif %}
  <div class="mt-3">
    {% if uses_github %}
    {{ render_submit_field(form.save, class="btn " + config['BUTTON_STYLE'] + "success " + config['BUTTON_CLASS']) }}
    {{ render_submit_field(form.unconfigure, class="btn " + config['BUTTON_STYLE'] + "danger " + config['BUTTON_CLASS']) }}
    {% else %}
    {{ render_submit_field(form.configure, class="btn " + config['BUTTON_STYLE'] + "success " + config['BUTTON_CLASS']) }}
    {% endif %}
    {{ render_submit_field(form.cancel, class="btn " + config['BUTTON_STYLE'] + "secondary " + config['BUTTON_CLASS']) }}
  </div>
</form>

{% endblock %}
