{% extends 'flask_user/public_base.html' %}

{% block content %}
{% from "base_templates/form_macros.html" import render_field, render_submit_field with context %}
<h1>{{ header }}</h1>
{%- if description %}
<div class="card mb-2">
  <div class="card-body">
    {{ description }}
  </div>
</div>
{%- endif %}
<form action="" method="POST" role="form">
  {{ form.hidden_tag() }}
  <div class="da-form-group">
    <label class="form-label" for="{{ form.folder.id }}">{{ word("Linked folder") }}</label>
    <select class="form-select" name="{{ form.folder.id }}" id="{{ form.folder.id }}">
      {%- for item in items %}
      <option value="{{ item['id'] }}"{% if item['id'] == the_folder %} selected{% endif %}>{{ item['name'] }}</option>
      {%- endfor %}
    </select>
  </div>
  {{ render_submit_field(form.submit) }}
  {{ render_submit_field(form.cancel, class="btn " + config['BUTTON_STYLE'] + "secondary " + config['BUTTON_CLASS']) }}
</form>
{% endblock %}
