mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-04 06:19:36 +00:00
Compare commits
4 commits
7054c51490
...
ae08d9539d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ae08d9539d | ||
|
|
275b695d6b | ||
|
|
d4d80de10f | ||
|
|
49ddb2938f |
9 changed files with 1103 additions and 1095 deletions
|
|
@ -17,8 +17,7 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Plugin } from 'ckeditor5';
|
||||
import {MarkdownGfmDataProcessor} from 'ckeditor5';
|
||||
import { Plugin, MarkdownGfmDataProcessor } from 'ckeditor5';
|
||||
|
||||
const ALLOWED_TAGS = [
|
||||
//Common elements
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
"hshn/base64-encoded-file": "^5.0",
|
||||
"jbtronics/2fa-webauthn": "^3.0.0",
|
||||
"jbtronics/dompdf-font-loader-bundle": "^1.0.0",
|
||||
"jbtronics/settings-bundle": "^v2.6.0",
|
||||
"jbtronics/settings-bundle": "^v2.7.0",
|
||||
"jfcherng/php-diff": "^6.14",
|
||||
"knpuniversity/oauth2-client-bundle": "^2.15",
|
||||
"league/commonmark": "^2.7",
|
||||
|
|
|
|||
488
composer.lock
generated
488
composer.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -1,6 +1,7 @@
|
|||
when@dev:
|
||||
web_profiler:
|
||||
toolbar: true
|
||||
toolbar:
|
||||
ajax_replace: true
|
||||
|
||||
framework:
|
||||
profiler:
|
||||
|
|
|
|||
|
|
@ -1,69 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
|
||||
*
|
||||
* Copyright (C) 2019 - 2022 Jan Böhmer (https://github.com/jbtronics)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\EventSubscriber;
|
||||
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
use Symfony\Component\HttpKernel\Event\ResponseEvent;
|
||||
|
||||
/**
|
||||
* This subscriber sets a Header in Debug mode that signals the Symfony Profiler to also update on Ajax requests.
|
||||
*/
|
||||
final class SymfonyDebugToolbarSubscriber implements EventSubscriberInterface
|
||||
{
|
||||
public function __construct(private readonly bool $kernel_debug_enabled)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of event names this subscriber wants to listen to.
|
||||
*
|
||||
* The array keys are event names and the value can be:
|
||||
*
|
||||
* * The method name to call (priority defaults to 0)
|
||||
* * An array composed of the method name to call and the priority
|
||||
* * An array of arrays composed of the method names to call and respective
|
||||
* priorities, or 0 if unset
|
||||
*
|
||||
* For instance:
|
||||
*
|
||||
* * ['eventName' => 'methodName']
|
||||
* * ['eventName' => ['methodName', $priority]]
|
||||
* * ['eventName' => [['methodName1', $priority], ['methodName2']]]
|
||||
*
|
||||
* @return array The event names to listen to
|
||||
*/
|
||||
public static function getSubscribedEvents(): array
|
||||
{
|
||||
return ['kernel.response' => 'onKernelResponse'];
|
||||
}
|
||||
|
||||
public function onKernelResponse(ResponseEvent $event): void
|
||||
{
|
||||
if (!$this->kernel_debug_enabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
$response = $event->getResponse();
|
||||
$response->headers->set('Symfony-Debug-Toolbar-Replace', '1');
|
||||
}
|
||||
}
|
||||
25
templates/form/settings_form.html.twig
Normal file
25
templates/form/settings_form.html.twig
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{% extends "form/extended_bootstrap_layout.html.twig" %}
|
||||
|
||||
{% block form_label %}
|
||||
{# If parameter_envvar exists on form then show it as tooltip #}
|
||||
{% if parameter_envvar is defined and parameter_envvar is not null %}
|
||||
{%- set label_attr = label_attr|merge({title: 'settings.tooltip.overrideable_by_env'|trans(arguments = {'%env%': (parameter_envvar)|trim})}) -%}
|
||||
{% endif %}
|
||||
{{- parent() -}}
|
||||
{% endblock %}
|
||||
|
||||
{% block checkbox_radio_label %}
|
||||
{# If parameter_envvar exists on form then show it as tooltip #}
|
||||
{% if parameter_envvar is defined and parameter_envvar is not null %}
|
||||
{%- set label_attr = label_attr|merge({title: 'settings.tooltip.overrideable_by_env'|trans(arguments = {'%env%': (parameter_envvar)|trim})}) -%}
|
||||
{% endif %}
|
||||
{{- parent() -}}
|
||||
{% endblock %}
|
||||
|
||||
{% block tristate_label %}
|
||||
{# If parameter_envvar exists on form then show it as tooltip #}
|
||||
{% if parameter_envvar is defined and parameter_envvar is not null %}
|
||||
{%- set label_attr = label_attr|merge({title: 'settings.tooltip.overrideable_by_env'|trans(arguments = {'%env%': (parameter_envvar)|trim})}) -%}
|
||||
{% endif %}
|
||||
{{- parent() -}}
|
||||
{% endblock %}
|
||||
|
|
@ -1,6 +1,8 @@
|
|||
{% extends "main_card.html.twig" %}
|
||||
{% macro genId(widget) %}{{ widget.vars.full_name }}{% endmacro %}
|
||||
|
||||
{% form_theme form "form/settings_form.html.twig" %}
|
||||
|
||||
{% block title %}{% trans %}settings.title{% endtrans %}{% endblock %}
|
||||
|
||||
{% block card_title %}<i class="fa-solid fa-gears fa-fw"></i> {% trans %}settings.title{% endtrans %}{% endblock %}
|
||||
|
|
@ -57,4 +59,4 @@
|
|||
</div>
|
||||
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
|
|
|||
|
|
@ -13027,5 +13027,11 @@ Please note, that you can not impersonate a disabled user. If you try you will g
|
|||
<target>System settings</target>
|
||||
</segment>
|
||||
</unit>
|
||||
<unit id="3YsJ4i6" name="settings.tooltip.overrideable_by_env">
|
||||
<segment>
|
||||
<source>settings.tooltip.overrideable_by_env</source>
|
||||
<target>The value of this parameter can be overridden by setting the environment variable "%env%".</target>
|
||||
</segment>
|
||||
</unit>
|
||||
</file>
|
||||
</xliff>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue