{% extends "admin/base.html" %}
{% load admin_modify i18n admin_urls %}


{% block javascripts %}
	{{ block.super }}
	{{ media }}


{% endblock %}
{% block breadcrumbs %}
	{% if not is_popup %}
		<li>
			<a href='{% url 'admin:app_list' app_label=opts.app_label %}'>
				{% trans app_label|capfirst|escape %}
			</a>
		</li>
		<li>
			{% if has_change_permission %}
				<a href='{% url opts|admin_urlname:'changelist' %}'>
					{{ opts.verbose_name_plural|capfirst }}
				</a>
			{% else %}
				{{ opts.verbose_name_plural|capfirst }}


			{% endif %}
		</li>
	{% endif %}
{% endblock %}
{% block object-tools-items %}
	{% if has_add_permission %}
		<li>
			{% if not is_popup and save_as and change %}
				<button class='btn btn-default' form='{{ opts.model_name }}{{ opts.module_name }}_form' type='submit' name='_saveasnew' value='{% trans 'Duplicate' %}'>
					{% trans 'Duplicate' %}
				</button>
			{% endif %}
			<button class='btn btn-primary btn' type='submit' name='_save' form='{{ opts.model_name }}{{ opts.module_name }}_form'>
				{% trans 'Save' %}



			</button>
		</li>
	{% endif %}
{% endblock %}
{% block content %}

	<div class='row'>
		<form id='{{ opts.model_name }}{{ opts.module_name }}_form' action='' role='form' method='post'>
			{% csrf_token %}
			{% if errors %}
				<div class='col-md-12'>
					<div class='note note-danger'>
						{% if errors|length == 1 %}{% trans "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %}
						{% if adminform.form.non_field_errors %}
							<ul class='errorlist'>
								{% for error in adminform.form.non_field_errors %}
									<li>
										{{ error }}

									</li>
								{% endfor %}
							</ul>
						{% endif %}
					</div>
				</div>
			{% endif %}
			{% block field_sets %}
			{% for fieldset in adminform %}
				{% if fieldset.name or fieldset.description %}
					<div class='col-md-2 col-lg-3'>
						{% if fieldset.name %}
							<h4>
								{{ fieldset.name }}

							</h4>
						{% endif %}
						{% if fieldset.description %}
							<p>
								<small>
									{{ fieldset.description|safe }}

								</small>
							</p>
						{% endif %}
					</div>
					<div class='col-md-10 col-lg-9'>
						{% include "admin/includes/fieldset.html" %}
					</div>
				{% else %}
					<div class='col-md-12'>
						{% include "admin/includes/fieldset.html" %}

					</div>
				{% endif %}
			{% endfor %}
			{% endblock %}

			{% block after_field_sets %}{% endblock %}

			{% block inline_field_sets %}
			{% for inline_admin_formset in inline_admin_formsets %}
				<div class='col-md-12'>
					{% include inline_admin_formset.opts.template %}
				</div>
			{% endfor %}
			{% endblock %}

			{% block after_related_objects %}{% endblock %}

			<div class='form-actions col-md-12'>
				{% block submit_buttons_bottom %}
					{% submit_row %}

				{% endblock %}
			</div>
			{% prepopulated_fields_js %}
		</form>
	</div>
{% endblock %}

