2020-05-06 13:25:17 -04:00
|
|
|
{% extends 'users/base.html' %}
|
2020-04-24 09:23:58 -04:00
|
|
|
{% load helpers %}
|
2021-12-21 16:29:01 -05:00
|
|
|
{% load form_helpers %}
|
2020-04-24 09:23:58 -04:00
|
|
|
|
|
|
|
{% block title %}User Preferences{% endblock %}
|
|
|
|
|
2021-08-24 15:24:03 -04:00
|
|
|
{% block content %}
|
2021-12-08 16:36:06 -05:00
|
|
|
<form method="post" action="" id="preferences-update">
|
2021-04-25 20:11:46 -07:00
|
|
|
{% csrf_token %}
|
2021-12-21 16:29:01 -05:00
|
|
|
|
2022-01-31 15:52:36 -05:00
|
|
|
{% for group, fields in form.fieldsets %}
|
2021-12-21 16:29:01 -05:00
|
|
|
<div class="field-group my-5">
|
|
|
|
<div class="row mb-2">
|
|
|
|
<h5 class="offset-sm-3">{{ group }}</h5>
|
|
|
|
</div>
|
|
|
|
{% for name in fields %}
|
2021-12-22 09:35:29 -05:00
|
|
|
{% render_field form|getfield:name %}
|
2021-12-21 16:29:01 -05:00
|
|
|
{% endfor %}
|
2021-12-08 16:36:06 -05:00
|
|
|
</div>
|
2021-12-21 16:29:01 -05:00
|
|
|
{% endfor %}
|
2021-12-22 09:10:50 -05:00
|
|
|
|
2021-12-22 09:35:29 -05:00
|
|
|
{% with plugin_fields=form.plugin_fields %}
|
|
|
|
{% if plugin_fields %}
|
|
|
|
<div class="field-group my-5">
|
|
|
|
<div class="row mb-2">
|
|
|
|
<h5 class="offset-sm-3">Plugins</h5>
|
|
|
|
</div>
|
|
|
|
{% for name in plugin_fields %}
|
|
|
|
{% render_field form|getfield:name %}
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% endwith %}
|
2021-12-21 16:29:01 -05:00
|
|
|
|
|
|
|
<div class="text-end my-3">
|
|
|
|
<a class="btn btn-outline-secondary" href="{% url 'user:preferences' %}">Cancel</a>
|
|
|
|
<button type="submit" name="_update" class="btn btn-primary">Save </button>
|
2021-04-25 20:11:46 -07:00
|
|
|
</div>
|
2021-12-08 16:36:06 -05:00
|
|
|
</form>
|
2020-04-24 09:23:58 -04:00
|
|
|
{% endblock %}
|