Show a tooltip on which env needs to be set to override a certain settings parameter

This commit is contained in:
Jan Böhmer 2025-08-24 12:03:37 +02:00
parent 49ddb2938f
commit d4d80de10f
3 changed files with 34 additions and 1 deletions

View 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 %}