{% import 'macros/form.html' as form %}
{% extends 'package/base.html' %}

{% set pkg = c.pkg_dict %}
{% set pkg_dict = c.pkg_dict %}

{% block breadcrumb_content_selected %}{% endblock %}

{% block breadcrumb_content %}
  {{ super() }}
  {% if pkg %}
    <li class="active">{% link_for _('Request DOI'), controller='ckanext.ands.controller:DatasetDoiController', action='dataset_doi', id=pkg.name %}</li>
  {% endif %}
{% endblock %}

{% block content_action %}
  {% link_for _('View dataset'), controller='package', action='read', id=pkg.name, class_='btn', icon='eye-open' %}
{% endblock %}

{% block content_primary_nav %}
{% endblock %}

{% block secondary_content %}

{% endblock %}


{% block primary_content_inner %}
<p>Below is the XML that will be sent to ANDS. Edit if required, and hit submit to create the DOI.</p>
<form id="dataset-doi" class="dataset-form form-horizontal" method="post" data-module="basic-form">
  {{ form.textarea('xml', 'xml', label='XML', value=xml, placeholder='Invalid XML', is_required=true, rows=25, cols=200, classes=['control-full', 'control-large']) }}

  {% block form_actions %}
      <div class="form-actions">
        {% block save_button %}
          <button class="btn btn-primary" type="submit" name="save">
            {% block save_button_text %}Submit DOI{% endblock %}
          </button>
        {% endblock %}
        {{ form.required_message() }}
      </div>
    {% endblock %}
  </form>

{% endblock %}
