diff --git a/templates/form/settings_form.html.twig b/templates/form/settings_form.html.twig new file mode 100644 index 00000000..9e1a8c4f --- /dev/null +++ b/templates/form/settings_form.html.twig @@ -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 %} diff --git a/templates/settings/settings.html.twig b/templates/settings/settings.html.twig index 95f4d8c6..92e16ab4 100644 --- a/templates/settings/settings.html.twig +++ b/templates/settings/settings.html.twig @@ -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 %} {% trans %}settings.title{% endtrans %}{% endblock %} @@ -57,4 +59,4 @@ {{ form_end(form) }} -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/translations/messages.en.xlf b/translations/messages.en.xlf index 195366b4..69b205f4 100644 --- a/translations/messages.en.xlf +++ b/translations/messages.en.xlf @@ -13027,5 +13027,11 @@ Please note, that you can not impersonate a disabled user. If you try you will g System settings + + + settings.tooltip.overrideable_by_env + The value of this parameter can be overridden by setting the environment variable "%env%". + +