{% extends 'assets/base.html' %}
{% load assets bob i18n history_tags %}

{% block content %}
<div class="row-fluid">
    <h3>{% block form_title %}{{caption}}{% endblock %}</h3>
</div>
{% for error in form.non_field_errors %}
<div class="alert alert-danger">
{{ error }}
</div>
{% endfor %}
<form id="{{ form_id }}" class="form form-horizontal" method="POST"{% if edit_mode %} enctype="multipart/form-data"{% endif %} {% dependency_data asset_form %}>
  {% csrf_token %}
  <div class="row-fluid">
    <div class="span6">
    {% form_as_fieldsets form %}
    {% if support %}{% object_list_search support 'assets' %}{% endif %}
    </div>
    <div class="span6">
      {% include 'assets/attachment_table.html' with attachment_parent=support parent_name='support' %}
      {% short_history support %}
    </div>
  </div>
  <div class="row-fluid">
    <div class="span12">
      <div class="form-actions">
        <button name="asset" type="submit" class="btn btn-primary">Save</button>
      </div>
    </div>
  </div>
</form>

{% include 'assets/attachment_deletion.html' with attachment_parent=support parent_name='support'%}
{% endblock %}


