{% extends "base.html" %}
{% from "macros.html" import render_field, form_tag %}

{% block content %}
  {% call form_tag(form) %}
  <div class="row">
    <div class="col-md-9 col-sm-8 col-xs-12">
      <h1>{{ form.name.data }}</h1>
    </div>
    <div class="col-md-9 col-sm-8 col-xs-12">
      {{ render_field(form.client_id) }}
      {{ render_field(form.client_secret) }}
      <div class="form-group">
        {{ form.revoke }}
        {{ form.reset }}
      </div>
    </div>
  </div>
  <div class="row">
    <div class="col-md-4 col-sm-4 col-xs-4">
      {{ render_field(form.name) }}
      {{ render_field(form.homepage_url) }}
    </div>
    <div class="col-md-6 col-sm-6 col-xs-12">
      {{ render_field(form.description) }}
      {{ render_field(form.callback_urls) }}
      <div class="form-group">
        {{ form.update_app }}
        {{ form.delete }}
      </div>
    </div>
  </div>
  {% endcall %}
  <div>
    <p>
      <small>Click
      <a target="_blank" href="{{ url_for('api_docs') }}" class="btw btn-info" role="button">here</a>
      to see available ORCID Hub API specification.</small></p>
  </div>
{% endblock %}
