{% extends "objects/view/base.html" %}

{% block stylesheets %}
    {{ super() }}
    <link rel="stylesheet" href="{{ fingerprinted_static('bootstrap-tagsinput/css/bootstrap-tagsinput.css') }}"/>
    <link rel="stylesheet" href="{{ fingerprinted_static('inscrybmde/css/inscrybmde.min.css') }}"/>
    <link rel="stylesheet" href="{{ fingerprinted_static('sampledb/css/inline-edit.css') }}"/>
{% endblock %}

{% set id_prefix_root = "object" %}
{% set property_path = () %}
{% set id_prefix = id_prefix_for_property_path(property_path, id_prefix_root) %}

{% block includes %}
    {% set indent_level = 0 %}
    {% set show_indent_border = False %}
    <form class="form-horizontal" action="{{ url_for('.object', object_id=object_id, mode='edit') }}" id="data-form" autocomplete="off" style="margin-left: -15px; margin-right:-15px">
        {{ form.csrf_token() }}
        <input type="hidden" name="context_id_token" value="{{ context_id_token }}" />
        {% include "objects/inline_edit/inline_edit_any.html" %}
    </form>
{% endblock %}

{% block content %}
    <div class="alert alert-danger alert-dismissible" role="alert" style="display: none" id="inline-edit-alert">
      <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span>
      </button>
      {{ _('There are errors in other fields. Please click "Edit Object" to perform this change.') }}
    </div>
  {{ super() }}
{% endblock %}

{% block template_values %}
  {% do set_template_value("tags", tags) %}
  {% do set_template_value("temporary_file_upload_url", url_for(".temporary_file_upload")) %}
  {% do set_template_value("translations.filter_by_action", _('Filter by Action…')) %}

  {{ super() }}
{% endblock %}

{% block scripts %}
    {{ super() }}
    <script src="{{ fingerprinted_static('bootstrap-tagsinput/js/bootstrap-tagsinput.min.js') }}"></script>
    <script src="{{ fingerprinted_static('typeahead/js/typeahead.bundle.min.js') }}"></script>
    <script src="{{ fingerprinted_static('inscrybmde/js/inscrybmde.min.js') }}"></script>
    <script src="{{ fingerprinted_static('sampledb/js/inline-edit.js') }}" type="module"></script>
    <script src="{{ fingerprinted_static('sampledb/js/sampledb-load-objects.js') }}" type="module"></script>
    <script src="{{ fingerprinted_static('sampledb/js/markdown_image_upload.js') }}" type="module"></script>
    <script src="{{ fingerprinted_static('sampledb/js/object_form/hazards.js') }}" type="module"></script>
    <script src="{{ fingerprinted_static('sampledb/js/object_form/tags.js') }}" type="module"></script>
    <script src="{{ fingerprinted_static('sampledb/js/object_form/datetime.js') }}" type="module"></script>
    <script src="{{ fingerprinted_static('sampledb/js/object_form/file.js') }}" type="module"></script>
    <script src="{{ fingerprinted_static('sampledb/js/object_form/text.js') }}" type="module"></script>
{% endblock %}
