{% extends "objects/forms/form_base.html" %}

{% block title %}{{ _('Object') }} #{{ object_id }} — {{ service_name }}{% endblock %}

{% block content %}
  {{ super() }}
  <form class="form-horizontal" method="post" action="{{ url_for('.object', object_id=object_id, mode=mode) }}">
    {{ form.csrf_token() }}
    <input type="hidden" name="context_id_token" value="{{ context_id_token }}" />
    <input type="hidden" name="array_buttons" id="input-array_buttons" value="[]" />
    {% set id_prefix_root = "object" %}
    {% set property_path = () %}
    {% set id_prefix = id_prefix_for_property_path(property_path, id_prefix_root) %}
    {% include "objects/forms/form_any.html" %}
    <div class="form-group row clearfix" style="padding-right:0.75em; margin-top: 15px">
      <div class="col-md-6 text-muted">* {{ _('required') }}</div>
      <div class="col-md-3">
        <a href="{{ url_for('.object', object_id=object_id) }}" class="btn btn-default pull-right" style="width:20em">{{ _('Cancel') }}</a>
      </div>
      <div class="col-md-3">
        <button type="submit" name="action_submit" class="btn btn-primary pull-right" style="width:20em">{{ _('Save') }}</button>
      </div>
    </div>
  </form>
  {% include "objects/view/timeseries_modals.html" %}
{% endblock %}

{% block scripts %}
  {{ super() }}
  <script src="{{ fingerprinted_static('sampledb/js/markdown_image_viewer.js') }}" type="module"></script>
  <script src="{{ fingerprinted_static('plotly/js/plotly-latest.min.js') }}"></script>
  {% if get_user_language(current_user).lang_code == 'de' %}
    <script src="{{ fingerprinted_static('plotly/js/plotly-locale-de.js') }}"></script>
  {% endif %}
  <script src="{{ fingerprinted_static('sampledb/js/timeseries.js') }}" type="module"></script>
{% endblock %}
