{% extends 'admin/master.html' %}
{% import 'admin/lib.html' as lib with context %}

{% macro extra() %}
  <input name="_continue_editing" type="submit" class="btn btn-large" value="{{ _gettext('Save and Continue') }}" />
{% endmacro %}

{% block head %}
    {{ super() }}
    <link href="{{ url_for('admin.static', filename='select2/select2.css') }}" rel="stylesheet">
    <link href="{{ url_for('admin.static', filename='datetimepicker/bootstrap-datetimepicker.css') }}" rel="stylesheet">
{% endblock %}

{% block body %}
    {% call lib.form_tag(form) %}
        {{ lib.render_form_fields(form, form_opts=form_opts, form_rules=form_rules) }}
        {{ lib.render_form_buttons(return_url, extra()) }}
    {% endcall %}
{% endblock %}

{% block tail %}
  {{ super() }}
  <script src="{{ url_for('admin.static', filename='datetimepicker/bootstrap-datetimepicker.js') }}"></script>
  <script src="{{ url_for('admin.static', filename='admin/js/form.js') }}"></script>
{% endblock %}
