{% extends "dartcms/views/grid.html" %}

{% load i18n static %}

{% block breadcrumbs_current_path %}
    {{ block.super }}
    <li class="active">{% trans 'Add Record' %}</li>
{% endblock %}

{% block js %}
    {{ block.super }}
    <script type="text/javascript" src="{% static 'dartcms/assets/tinymce/tinymce.min.js' %}"></script>
    <script type="text/javascript"
            src="{% static 'dartcms/js/lib/jquery-validation/jquery.validate.min.js' %}"></script>
    <script type="text/javascript"
            src="{% static 'dartcms/assets/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js' %}"></script>
    <script type="text/javascript"
            src="{% static 'dartcms/assets/bootstrap-multiselect/js/bootstrap-multiselect.js' %}"></script>
    <script type="text/javascript" src="{% static 'dartcms/js/apps/base/forms.js' %}"></script>

    {% get_current_language as LANG %}

    {% if LANG == 'ru-ru' %}
        <script type="text/javascript"
                src="{% static 'dartcms/js/lib/jquery-validation/localization/messages_ru.min.js' %}"></script>
    {% endif %}
{% endblock %}

{% block css %}
    {{ block.super }}
    <link rel="stylesheet" href="{% static 'dartcms/assets/tinymce/skins/lightgray/skin.min.css' %}"/>
    <link rel="stylesheet"
          href="{% static 'dartcms/assets/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css' %}"/>
    <link rel="stylesheet"
          href="{% static 'dartcms/assets/bootstrap-multiselect/css/bootstrap-multiselect.css' %}"/>
{% endblock %}

{% block inline_js %}
    {% include 'dartcms/views/partials/tinymce.html' %}
    {% include 'dartcms/views/partials/datepickers.html' %}
{% endblock %}

{% block page_content %}
    <div class="page-header">
        <h1>
            {{ page_header|capfirst }}
            <small>{% trans 'Add Record' %}</small>
        </h1>
    </div>
    <div class="well well-sm">
        <form method="POST" class="form-horizontal" enctype="multipart/form-data">
            {% csrf_token %}
            {% include "dartcms/forms/horizontal.html" %}
            {% block additional_form_fields %}{% endblock %}
            <div class="form-group">
                <div class="col-xs-9 col-xs-offset-3">
                    {% block form_actions %}
                        <button type="submit" class="btn btn-primary">{% trans 'Add' %}</button>
                        <a href="{{ index_url }}" class="btn btn-link">{% trans 'Cancel' %}</a>
                    {% endblock %}
                </div>
            </div>
        </form>
    </div>
{% endblock %}