{% extends 'base_templates/flask_wide_base.html' %}

{% block content %}
{% from "base_templates/form_macros.html" import render_field, render_file_field, render_submit_field with context %}
          <p>{{ version }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ word("Python version %s" % (underlying_python_version,)) }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ free_disk_space + ' ' + word('remaining on disk') }}</p>
          {%- if config_errors %}
          <h3>{{ word("Errors") }}</h3>
          <p>{{ word("The following errors were detected in your Configuration.") }}</p>
          <ul>
              {%- for error_message in config_errors %}
              <li>{{ error_message }}</li>
              {%- endfor %}
          </ul>
          {%- endif %}
          <form action="" method="POST" role="form" class="daconfigform">
            {{ form.hidden_tag() }}
            <div class="da-form-group">
              <textarea rows="24" cols="80" id="config_content" name="config_content"></textarea>
            </div>
            {{ render_submit_field(form.submit, class="btn " + config['BUTTON_STYLE'] + "primary " + config['BUTTON_CLASS']) }}
            {{ render_submit_field(form.cancel, class="btn " + config['BUTTON_STYLE'] + "secondary " + config['BUTTON_CLASS']) }}
            </div>
          </form>
          {%- if config_messages %}
          <h3>{{ word("Overrides") }}</h3>
          <p>{{ word("The following overrides were applied.") }}</p>
          <ul>
              {%- for config_message in config_messages %}
              <li>{{ config_message }}</li>
              {%- endfor %}
          </ul>
          {%- endif %}
{% endblock %}
