butter-portal/app/templates/admin.html

71 lines
No EOL
3.2 KiB
HTML

{% extends "base.html" %}
{% block content %}
<h1 class="title is-large butter-title">{{ _('Application Settings') }}</h1>
{% import "bulma_wtf.html" as wtf %}
<form action="" method="post" enctype="multipart/form-data" novalidate >
{{ form.hidden_tag() }}
<p> {{ form.submit( class="button is-link") }}
{% if config['SETTINGS_CHANGED'] %}
{{ form.apply_changes(class="button is-warning") }}
{% endif %}
</p>
<div class="field">
{{ wtf.form_input_field(form.ssid) }}
<p class="help"> This is the name of the advertised Wi-Fi network. Current SSID: {{ get_setting('ssid') }}</p>
</div>
<div class="password">
{{ wtf.form_input_field(form.wifi_password) }}
<p class="help"> This is the secret key needed to connect to the Wi-Fi network. By default, this is not set and everyone can join.
Current password: {{ get_setting('wifi_password') or 'Not set' }}</p>
</div>
<div class="field">
{{ wtf.form_input_field(form.butterbox_name) }}
<p class="help">This is the name shown in the UI, and used to access the box locally by adding .local or .lan in your browser.
Current name: {{ get_setting('butterbox_name') }}, accessed at {{ get_setting('butterbox_name') }}.local.</p>
</div>
<div class="checkbox">
{{ wtf.form_bool_field(form.enable_access_point) }}
<p class="help">Whether this box will advertise a WiFi network.</p>
</div>
<div class="checkbox">
{{ wtf.form_bool_field(form.enable_map_viewer) }}
<p class="help">Whether map services are enabled.</p>
</div>
<div class="checkbox">
{{ wtf.form_bool_field(form.enable_chat) }}
<p class="help">Whether chat services are enabled.</p>
</div>
<div class="checkbox">
{{ wtf.form_bool_field(form.enable_deltachat) }}
<p class="help">Whether secure messaging using DeltaChat is enabled.</p>
</div>
<div class="checkbox">
{{ wtf.form_bool_field(form.enable_file_viewer) }}
<p class="help">Whether files services via USB are enabled.</p>
</div>
<div class="checkbox">
{{ wtf.form_bool_field(form.enable_app_store) }}
<p class="help">Whether app store services are enabled.</p>
</div>
<div class="field">
{{ wtf.form_input_field(form.admin_password) }}
<p class="help">Password for accessing this interface.</p>
</div>
<div class="field">
<label class="label">{{ form.butterbox_logo.label }} </label>
<div class="control">{{ form.butterbox_logo(class='label', style="width: 280px") }}</div>
{% for error in form.butterbox_logo.errors %}
<p class="help is-danger">{{ error }}</p>
{% endfor %}
<p class="help">This is the logo shown in the UI. Current logo: <br>
<img src="{{ get_setting('butterbox_logo') }}" style="height: 50px"> </p>
</div>
</form>
<a href="{{ url_for('logout') }}">Logout</a>
{% endblock %}