mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-29 06:18:26 +02:00
Show a tooltip on which env needs to be set to override a certain settings parameter
This commit is contained in:
parent
49ddb2938f
commit
d4d80de10f
3 changed files with 34 additions and 1 deletions
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 %}
|
||||
|
|
|
@ -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