Release 2.15 (#4749)

This commit is contained in:
Kevin Papst
2024-04-12 19:03:09 +02:00
committed by GitHub
parent b76a5d5c35
commit 7219b3f421
56 changed files with 441 additions and 575 deletions

View File

@@ -85,8 +85,6 @@
{{- get_title() -}}
{% endblock %}
{% block page_actions_class %}col-auto ms-auto d-print-none{% endblock %}
{% block footer %}
{% if 'dashboard' in app.request.attributes.get('_route') %}
{{ parent() }}

View File

@@ -11,54 +11,35 @@
<img onclick="document.getElementById('totp_secret').classList.toggle('d-none');" data-toggle="tooltip" title="Click to show code" alt="TOTP QR Code" style="max-width: 200px; max-height: 200px;" src="{{ qr_code.dataUri }}" />
<span id="totp_secret" style="display: block" class="d-none">{{ secret }}</span>
</p>
{% if user.totpAuthenticationEnabled %}
<div class="row mb-3">
<div class="form-selectgroup form-selectgroup-boxes d-flex">
<label class="form-selectgroup-item flex-column">
<input type="radio" id="user_two_factor_enable" name="user_two_factor[enabled]" class="form-selectgroup-input" value="1" checked="checked">
<div class="form-selectgroup-label d-flex align-items-center p-3">
<div class="me-3">
<span class="form-selectgroup-check"></span>
</div>
<div>
<label class="form-check-label" for="user_two_factor_enable">{{ 'activated'|trans }}</label>
</div>
</div>
</label>
<label class="form-selectgroup-item flex-column">
<input type="radio" id="user_two_factor_disable" name="user_two_factor[enabled]" class="form-selectgroup-input" value="0">
<div class="form-selectgroup-label d-flex align-items-center p-3">
<div class="me-3">
<span class="form-selectgroup-check"></span>
</div>
<div>
<label class="form-check-label" for="user_two_factor_disable">{{ 'deactivated'|trans }}</label>
</div>
</div>
</label>
</div>
</div>
{{ form_start(deactivate, {'attr': {'id': 'user_two_factor_form'}}) }}
{{ form_end(deactivate) }}
{% else %}
{% if not user.totpAuthenticationEnabled %}
{{ form_start(form, {'attr': {'id': 'user_two_factor_form'}}) }}
<p>{{ 'profile.2fa_confirmation'|trans }}</p>
{{ form_widget(form) }}
{{ form_end(form) }}
{% else %}
<strong><i class="{{ 'success'|icon(true) }} text-success"></i> {{ 'activated'|trans }}</strong>
{% endif %}
</div>
</div>
<div class="card-footer">
<input type="submit" value="{{ 'action.save'|trans }}" class="btn btn-primary" id="user_two_factor_button" />
{% if user.totpAuthenticationEnabled %}
{{ form_start(deactivate, {'attr': {'id': 'user_two_factor_form'}}) }}
<input type="submit" value="{{ 'deactivate'|trans }}" class="btn btn-warning" id="user_two_factor_button" />
{{ form_end(deactivate) }}
{% else %}
<input type="submit" value="{{ 'action.save'|trans }}" class="btn btn-primary" id="user_two_factor_button" />
{% endif %}
</div>
{% endblock %}
{% block javascripts %}
{{ parent() }}
{% if not user.totpAuthenticationEnabled %}
<script>
document.getElementById('user_two_factor_button').addEventListener('click', function(){
document.getElementById('user_two_factor_form').submit();
});
</script>
{% endif %}
{% endblock %}

View File

@@ -5,20 +5,20 @@
<div class="card-body">
<div class="row mb-3">
<div class="col-12 col-md-6">
<p>
{{ 'api_password.intro'|trans }}
</p>
<p>
<strong>URL</strong>: {{ url('api.swagger_ui', {}, false)|replace({'/doc': ''}) }}</li>
</p>
</div>
<div class="col-12 col-md-6">
<p>
{{ 'api_password.intro'|trans }}
</p>
<p>
<strong>URL</strong>: {{ url('api.swagger_ui', {}, false)|replace({'/doc': ''}) }}
</p>
</div>
<div class="col-12 col-md-6 text-md-end">
<a class="btn action-create modal-ajax-form" href="{{ path('user_profile_access_token', {'username': user.userIdentifier}) }}">{{ icon('create', true) }} {{ 'create'|trans }}</a>
<a class="btn" target="_blank" href="{{ path('api.swagger_ui') }}" data-toggle="tooltip" title="Swagger API Docs">{{ icon('documentation', true) }} Swagger Docs</a>
<a class="btn" target="_blank" href="{{ 'rest-api.html'|docu_link }}" data-toggle="tooltip" title="{{ 'help'|trans }}">{{ icon('help', true) }} {{ 'help'|trans }}</a>
</div>
<div class="col-12 col-md-6 text-md-end">
<a class="btn action-create modal-ajax-form" href="{{ path('user_profile_access_token', {'username': user.userIdentifier}) }}">{{ icon('create', true) }} {{ 'create'|trans }}</a>
<a class="btn" target="_blank" href="{{ path('api.swagger_ui') }}">{{ icon('documentation', true) }} Swagger Docs</a>
<a class="btn" target="_blank" href="{{ 'rest-api.html'|docu_link }}">{{ icon('help', true) }} {{ 'help'|trans }}</a>
</div>
</div>
{% if created_token is not null %}
@@ -39,7 +39,7 @@
{% endif %}
{% if access_tokens|length > 0 %}
<table class="table">
<table class="table table-vcenter">
<thead>
<tr>
<th>{{ 'name'|trans }}</th>
@@ -81,6 +81,7 @@
{% embed '@theme/embeds/collapsible.html.twig' with {id: 'activity_invoice_settings'} %}
{% import "macros/widgets.html.twig" as widgets %}
{% block title %}{{ 'password'|trans }}{% endblock %}
{% block box_class %}mt-3{% endblock %}
{% block body %}
{{ widgets.alert('danger', 'api_password_deprecated'|trans) }}
{{ form_start(form) }}