3 lines
1.6 KiB
HTML
3 lines
1.6 KiB
HTML
{% extends 'base.html' %}{% from 'macros.html' import page_header with context %}
|
|
{% block content %}{{ page_header(t('settings'),t('settings_hint')) }}<section class="panel"><h2>{{ t('connection') }}</h2><p>{{ t('connected' if ai_ready else 'connection_hint') }}</p><details><summary>{{ t('details') }}</summary><p>{{ t('connection_instructions') }}</p></details></section><form class="panel stack" method="post"><input type="hidden" name="csrf" value="{{ csrf }}"><label>{{ t('interval') }}<input type="number" name="interval" min="1" max="168" value="{{ interval }}" required></label><h2>{{ t('weights') }}</h2><div class="weight-grid">{% for key in criteria %}<label>{{ t(key) }}<input type="number" name="{{ key }}" min="0" max="100" value="{{ weights[loop.index0] }}" required></label>{% endfor %}</div><button class="button primary">{{ t('save') }}</button></form><section class="panel table-wrap"><h2>{{ t('users') }}</h2><table><thead><tr><th>{{ t('email') }}</th><th>{{ t('role') }}</th></tr></thead><tbody>{% for account in users %}<tr><td>{{ account.email }}</td><td>{% if account.id==user.id %}{{ t(account.role) }}{% else %}<form method="post" class="inline-form" action="{{ url_for('web.user_role',item_id=account.id) }}"><input type="hidden" name="csrf" value="{{ csrf }}"><select name="role" aria-label="{{ t('role') }}">{% for role in ['user','analyst','admin'] %}<option value="{{ role }}" {{ 'selected' if account.role==role }}>{{ t(role) }}</option>{% endfor %}</select><button class="button secondary">{{ t('save') }}</button></form>{% endif %}</td></tr>{% endfor %}</tbody></table></section>{% endblock %}
|