88 lines
4.1 KiB
HTML
88 lines
4.1 KiB
HTML
{% extends "admin/layout.html" %}
|
|
{% block admin_title %}{{ t.nav_settings }}{% endblock admin_title %}
|
|
|
|
{% block content %}
|
|
<h1>{{ t.settings_heading }}</h1>
|
|
|
|
{% if saved %}
|
|
<p style="color: green; font-weight: bold; margin-bottom: 1rem;">{{ t.settings_saved }}</p>
|
|
{% endif %}
|
|
|
|
<form method="post" action="/admin/settings">
|
|
|
|
<h2>{{ t.settings_auth }}</h2>
|
|
<table>
|
|
<tr>
|
|
<th>{{ t.debug_field }}</th>
|
|
<th>{{ t.debug_value }}</th>
|
|
<th>{{ t.debug_source }}</th>
|
|
</tr>
|
|
<tr>
|
|
<td><label for="auth_password_enabled">{{ t.settings_password_login }}</label></td>
|
|
<td><input type="checkbox" name="auth_password_enabled" id="auth_password_enabled" value="on"{% if auth_password_enabled %} checked{% endif %}></td>
|
|
<td><span class="badge badge-{{ auth_password_enabled_source }}">{{ auth_password_enabled_source }}</span></td>
|
|
</tr>
|
|
<tr>
|
|
<td><label for="auth_sso_enabled">{{ t.settings_sso_login }}</label></td>
|
|
<td><input type="checkbox" name="auth_sso_enabled" id="auth_sso_enabled" value="on"{% if auth_sso_enabled %} checked{% endif %}></td>
|
|
<td><span class="badge badge-{{ auth_sso_enabled_source }}">{{ auth_sso_enabled_source }}</span></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<h2>{{ t.settings_oidc }}</h2>
|
|
<p style="font-size:.85rem;color:#666;margin-bottom:.5rem;">{{ t.settings_oidc_help }}</p>
|
|
<p style="font-size:.85rem;color:#666;margin-bottom:1rem;">
|
|
<strong>{{ t.settings_oidc_callback }}:</strong>
|
|
<code id="oidc-callback-url"></code>
|
|
</p>
|
|
<script>document.getElementById('oidc-callback-url').textContent=location.origin+'/auth/oidc/callback';</script>
|
|
<table>
|
|
<tr>
|
|
<th>{{ t.debug_field }}</th>
|
|
<th>{{ t.debug_value }}</th>
|
|
<th>{{ t.debug_source }}</th>
|
|
</tr>
|
|
<tr>
|
|
<td><label for="oidc_button_text">{{ t.settings_oidc_button }}</label></td>
|
|
<td><input name="oidc_button_text" id="oidc_button_text" value="{{ oidc_button_text }}" style="width:100%"></td>
|
|
<td><span class="badge badge-{{ oidc_button_text_source }}">{{ oidc_button_text_source }}</span></td>
|
|
</tr>
|
|
<tr>
|
|
<td><label for="oidc_issuer">oidc_issuer</label><br><span style="font-size:.75rem;color:#999;">{{ t.settings_oidc_issuer_help }}</span></td>
|
|
<td><input name="oidc_issuer" id="oidc_issuer" value="{{ oidc_issuer }}" style="width:100%"></td>
|
|
<td><span class="badge badge-{{ oidc_issuer_source }}">{{ oidc_issuer_source }}</span></td>
|
|
</tr>
|
|
<tr>
|
|
<td><label for="oidc_client_id">oidc_client_id</label></td>
|
|
<td><input name="oidc_client_id" id="oidc_client_id" value="{{ oidc_client_id }}" style="width:100%"></td>
|
|
<td><span class="badge badge-{{ oidc_client_id_source }}">{{ oidc_client_id_source }}</span></td>
|
|
</tr>
|
|
<tr>
|
|
<td><label for="oidc_client_secret">oidc_client_secret</label></td>
|
|
<td><input name="oidc_client_secret" id="oidc_client_secret" type="password" value="{{ oidc_client_secret }}" style="width:100%"></td>
|
|
<td><span class="badge badge-{{ oidc_client_secret_source }}">{{ oidc_client_secret_source }}</span></td>
|
|
</tr>
|
|
<tr>
|
|
<td><label for="oidc_admin_groups">{{ t.settings_oidc_admin_groups }}</label><br><span style="font-size:.75rem;color:#999;">{{ t.settings_oidc_admin_groups_help }}</span></td>
|
|
<td><input name="oidc_admin_groups" id="oidc_admin_groups" value="{{ oidc_admin_groups }}" style="width:100%"></td>
|
|
<td><span class="badge badge-{{ oidc_admin_groups_source }}">{{ oidc_admin_groups_source }}</span></td>
|
|
</tr>
|
|
</table>
|
|
<h2>{{ t.settings_api }}</h2>
|
|
<table>
|
|
<tr>
|
|
<th>{{ t.debug_field }}</th>
|
|
<th>{{ t.debug_value }}</th>
|
|
<th>{{ t.debug_source }}</th>
|
|
</tr>
|
|
<tr>
|
|
<td><label for="swagger_enabled">{{ t.settings_swagger }}</label><br><span style="font-size:.75rem;color:#999;">{{ t.settings_swagger_help }}</span></td>
|
|
<td><input type="checkbox" name="swagger_enabled" id="swagger_enabled" value="on"{% if swagger_enabled %} checked{% endif %}></td>
|
|
<td><span class="badge badge-{{ swagger_enabled_source }}">{{ swagger_enabled_source }}</span></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<button type="submit" style="margin-top: 1rem; padding: .5rem 1.5rem;">{{ t.settings_save }}</button>
|
|
</form>
|
|
{% endblock content %}
|