{% extends theme_base %}
{% load static %}

{% block title %}{{ page_title }}{% endblock %}

{% block extra-top-head %}
  {{script|safe}}
{% endblock %}

{% block extra-body-class %}
  {{ block.super }}
  wcs-page
  {% if global_context.form_slug %}
    {% if global_context.category_slug %}formdef-category-{{global_context.category_slug}}{% endif %}
    formdef-{{global_context.form_slug}}
  {% endif %}
{% endblock %}

{% block placeholder-content %}
  {% block content %}
    <div class="form-content {% if form_side %}form-content--with-sidebox{% endif %}">
      {% block wcs-form-title %}
        {% if title %}
          <div class="form-content--titlebar"><h1 class="form-content--title">{{title}}</h1></div>
        {% endif %}
      {% endblock %}
      {% if form_side %}
        <div class="form-content--sidebox" id="gauche">
          {{ form_side|safe }}
        </div>
      {% endif %}

      <div id="{{bigdiv|default:'rub_service'}}" class="form-content--body {% if form_side %}has-sidebox{% endif %}">
        {% if title %} {# hidden by default, displayed with $form-titlebar-mode: form #}
          <h2 class="form-content--body--title">{{title}}</h2>
        {% endif %}
        {% block body %}
          {{ body|safe }}
        {% endblock %}
      </div>
    </div>
  {% endblock %}
{% endblock %}
