1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-07-31 12:41:08 +00:00

Add all settings to appsettings page & Convert settings choices

This commit is contained in:
catborise 2020-05-29 00:43:26 +03:00 committed by catborise
parent 62f8ece0ef
commit 7538ddab4f
27 changed files with 454 additions and 447 deletions

View file

@ -57,17 +57,25 @@
</div>
</form>
{% endif %}
<form method="post" action="" role="form" aria-label="Edit bottom bar settings form">{% csrf_token %}
<div class="form-group row">
<label class="col-sm-3 col-form-label">{{ show_inst_bottom_bar.name }}</label>
<div class="col-sm-6">
<select class="form-control" name="{{ show_inst_bottom_bar.key }}" onchange="this.form.submit()">
<option {% if show_inst_bottom_bar.value == 'True' %} selected {% endif %} value=True>{% trans "True" %}</option>
<option {% if show_inst_bottom_bar.value == 'False' %} selected {% endif %} value=False>{% trans "False" %}</option>
</select>
<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">
<label class="col-sm-3 col-form-label">{{ setting.name }}</label>
<div class="col-sm-6">
{% if setting.choices %}
<select class="form-control" name="{{ setting.key }}" onchange="this.form.submit()" title="{{ setting.description }}">
{% for choice in setting.choices_as_list %}
<option {% if setting.value == choice %} selected {% endif %} value={{ choice }}>{% trans choice %}</option>
{% endfor %}
</select>
{% else %}
<input class="form-control" name="{{ setting.key }}" value="{{ setting.value }}" title="{{ setting.description }}" onchange="this.form.submit()"/>
{% endif%}
</div>
</div>
</div>
</form>
</form>
{% endfor %}
</div>
</div>
{% endblock %}