2020-05-24 16:20:43 +00:00
|
|
|
{% extends "base.html" %}
|
|
|
|
{% load i18n %}
|
|
|
|
{% block title %}{% trans "Edit Settings" %}{% endblock %}
|
|
|
|
{% block content %}
|
|
|
|
<!-- Page Heading -->
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-12">
|
|
|
|
<h2 class="page-header">{% trans "Edit Settings" %}</h2>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- /.row -->
|
|
|
|
|
|
|
|
{% include 'errors_block.html' %}
|
|
|
|
|
|
|
|
<div class="">
|
|
|
|
<div class="col-lg-12">
|
|
|
|
<h3 class="page-header">{% trans "App Settings" %}</h3>
|
2020-05-26 13:18:38 +00:00
|
|
|
<form action="{% url 'set_language' %}" method="post" style="display:inline" aria-label="Edit language.name_local settings form">{% csrf_token %}
|
2020-05-24 16:20:43 +00:00
|
|
|
<div class="form-group row">
|
|
|
|
<input name="next" type="hidden" value="{{ redirect_to }}">
|
|
|
|
<label class="col-sm-3 col-form-label">{% trans "Language" %}</label>
|
|
|
|
<div class="col-sm-6">
|
|
|
|
<select name="language" class="form-control" onchange="this.form.submit()">
|
|
|
|
{% get_current_language as LANGUAGE_CODE %}
|
|
|
|
{% get_available_languages as LANGUAGES %}
|
|
|
|
{% get_language_info_list for LANGUAGES as languages %}
|
|
|
|
{% for language in languages %}
|
|
|
|
<option value="{{ language.code }}"{% if language.code == LANGUAGE_CODE %} selected{% endif %}>
|
|
|
|
{{ language.name_local }} ({{ language.code }})
|
|
|
|
</option>
|
|
|
|
{% endfor %}
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
{% if request.user.is_superuser %}
|
2020-05-26 13:18:38 +00:00
|
|
|
<form method="post" action="" role="form" aria-label="Edit sass directory settings form">{% csrf_token %}
|
2020-05-24 16:20:43 +00:00
|
|
|
<div class="form-group row">
|
2020-06-12 11:46:17 +00:00
|
|
|
<label class="col-sm-3 col-form-label">{% trans sass_dir.name %}</label>
|
2020-05-24 16:20:43 +00:00
|
|
|
<div class="col-sm-6">
|
2020-06-12 11:46:17 +00:00
|
|
|
<input class="form-control" name="{{ sass_dir.key }}" value="{{ sass_dir.value }}" onchange="this.form.submit()" title="{% trans sass_dir.description %}"/>
|
2020-05-24 16:20:43 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
2020-05-26 13:18:38 +00:00
|
|
|
<form method="post" action="" role="form" aria-label="Edit theme settings form">{% csrf_token %}
|
2020-05-24 16:20:43 +00:00
|
|
|
<div class="form-group row">
|
|
|
|
<label class="col-sm-3 col-form-label">{% trans bootstrap_theme.name %}</label>
|
|
|
|
<div class="col-sm-6">
|
2020-06-12 11:46:17 +00:00
|
|
|
<select class="form-control" name="{{ bootstrap_theme.key }}" onchange="this.form.submit()" title="{% trans bootstrap_theme.description %}">
|
2020-05-24 16:20:43 +00:00
|
|
|
{% for theme in themes_list %}
|
|
|
|
<option {% if bootstrap_theme.value == theme %}selected{% endif %} value="{{ theme }}">{{ theme }}</option>
|
|
|
|
{% endfor %}
|
|
|
|
</select>
|
2020-05-25 19:23:33 +00:00
|
|
|
<span class="text-muted">{% trans "After change please full refresh page with 'Ctrl + F5' "%}</span>
|
2020-05-24 16:20:43 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
{% endif %}
|
2020-05-28 21:43:26 +00:00
|
|
|
<h3 class="page-header">{% trans "Other Settings" %}</h3>
|
|
|
|
{% for setting in appsettings %}
|
|
|
|
<form method="post" action="" role="form" aria-label="{{setting.name}} form">{% csrf_token %}
|
|
|
|
<div class="form-group row">
|
2020-06-12 11:46:17 +00:00
|
|
|
<label class="col-sm-3 col-form-label">{% trans setting.name %}</label>
|
2020-05-28 21:43:26 +00:00
|
|
|
<div class="col-sm-6">
|
|
|
|
{% if setting.choices %}
|
2020-06-12 11:46:17 +00:00
|
|
|
<select class="form-control" name="{{ setting.key }}" onchange="this.form.submit()" title="{% trans setting.description %}">
|
2020-05-28 21:43:26 +00:00
|
|
|
{% for choice in setting.choices_as_list %}
|
|
|
|
<option {% if setting.value == choice %} selected {% endif %} value={{ choice }}>{% trans choice %}</option>
|
|
|
|
{% endfor %}
|
|
|
|
</select>
|
|
|
|
{% else %}
|
2020-06-12 11:46:17 +00:00
|
|
|
<input class="form-control" name="{{ setting.key }}" value="{{ setting.value }}" title="{% trans setting.description %}" onchange="this.form.submit()"/>
|
2020-05-28 21:43:26 +00:00
|
|
|
{% endif%}
|
|
|
|
</div>
|
2020-05-24 16:20:43 +00:00
|
|
|
</div>
|
2020-05-28 21:43:26 +00:00
|
|
|
</form>
|
|
|
|
{% endfor %}
|
2020-05-24 16:20:43 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|