{% load i18n admin_static %}<div class="inline-group" id="{{ inline_admin_formset.formset.prefix }}-group">
							<h2{% if inline_admin_formset.opts.collapse %} class="pointer" data-toggle="collapse" data-target="#{{inline_admin_formset.formset.prefix}}-wrapper"{% endif %}>{{ inline_admin_formset.opts.verbose_name_plural|title }}{% if inline_admin_formset.opts.collapse %} <i class="h2-icon icon-arrow-down"></i>{% endif %}</h2>
							<div class="inline-wrapper{% if inline_admin_formset.opts.modal %} inline-related-modal-wrapper{% endif %}{% if inline_admin_formset.opts.collapse %} collapse{% endif %}" id="{{inline_admin_formset.formset.prefix}}-wrapper">
								{{ inline_admin_formset.formset.management_form }}{% if inline_admin_formset.formset.non_form_errors %}
								<div class="alert alert-error">
									{{ inline_admin_formset.formset.non_form_errors }}
								</div>{% endif %}{% for inline_admin_form in inline_admin_formset %}
								<div class="inline-related{% if inline_admin_formset.opts.modal %} inline-related-modal{% endif %}{% if forloop.last %} empty-form last-related{% endif %}" id="{{ inline_admin_formset.formset.prefix }}-{% if not forloop.last %}{{ forloop.counter0 }}{% else %}empty{% endif %}">
									<h3 class="{% if not inline_admin_formset.opts.modal %}light-blue-degrade{% else %}inline-modal-header{% endif %}{%if inline_admin_form.form.errors or inline_admin_form.form.non_field_errors %} error{% endif %}"><b>{{ inline_admin_formset.opts.verbose_name|title }}:</b>&nbsp;<span class="inline_label">{% if inline_admin_form.original %}{{ inline_admin_form.original }}{% else %}#{{ forloop.counter }}{% endif %}</span>{% if inline_admin_formset.opts.modal %}
										<span class="inline-edit"><i class="admin-inline-icon icon-edit"></i> <a class="inline-modal" data-toggle="modal" role="button" href="#modal-wrapper-{{ inline_admin_formset.formset.prefix }}-{% if not forloop.last %}{{ forloop.counter0 }}{% else %}empty{% endif %}">{% trans 'Edit' %}</a></span>{% endif %}{% if inline_admin_form.show_url %}
										<a href="../../../r/{{ inline_admin_form.original_content_type_id }}/{{ inline_admin_form.original.id }}/">{% trans "View on site" %}</a>{% endif %}{% if inline_admin_formset.formset.can_delete and inline_admin_form.original %}
										<span class="delete">{{ inline_admin_form.deletion_field.field }} {{ inline_admin_form.deletion_field.label_tag }}</span>{% endif %}
									</h3>{% if inline_admin_formset.opts.modal %}
									<div class="modal hide fade" id="modal-wrapper-{{ inline_admin_formset.formset.prefix }}-{% if not forloop.last %}{{ forloop.counter0 }}{% else %}empty{% endif %}">
  										<div class="modal-header">
  											<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
  											<h3>Edit {{ inline_admin_formset.opts.verbose_name|title }}</h3>
  										</div>
  										<div class="modal-body">
										{% endif %}{% if inline_admin_form.form.non_field_errors %}
										{{ inline_admin_form.form.non_field_errors }}{% endif %}{% for fieldset in inline_admin_form %}
										{% include "admin/includes/fieldset.html" %}{% endfor %}{% if inline_admin_form.has_auto_field %}
										{{ inline_admin_form.pk_field.field }}{% endif %}
										{{ inline_admin_form.fk_field.field }}{% if inline_admin_formset.opts.modal %}
										</div>
										<div class="modal-footer">
											<button class="btn btn-success" data-dismiss="modal" aria-hidden="true">OK</button>
										</div>
									</div>{% endif %}
								</div>{% endfor %}
							</div>
						</div>
						<script>
							(function($) {
								$("#{{ inline_admin_formset.formset.prefix }}-group .inline-related").stackedFormset({
									prefix: '{{ inline_admin_formset.formset.prefix }}',
									adminStaticPrefix: '{% static "admin/" %}',
									deleteText: "{% trans "Remove" %}",
									addText: "{% blocktrans with verbose_name=inline_admin_formset.opts.verbose_name|title %}Add another {{ verbose_name }}{% endblocktrans %}"
								});
							})(yawdadmin.jQuery);
						</script>