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

{% macro extra() %}
  <input name="_add_another" type="submit" class="btn" value="{{ _gettext('Save and add another') }}" />
{% endmacro %}

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

{% block body %}
  <ul class="nav nav-tabs">
      <li>
	  <a href="{{ return_url }}">{{ _gettext('List') }}</a>
      </li>
      <li class="active">
	  <a href="javascript:void(0)">{{ _gettext('Create') }}</a>
      </li>
	</ul>

  {% 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="{{ theme_static('datetimepicker/bootstrap-datetimepicker.js') }}"></script>
  <script src="{{ theme_static('admin/js/form.js') }}"></script>
{% endblock %}
