Skip to content
Snippets Groups Projects
Commit 97e3a6fd authored by Samuli Sillanpää's avatar Samuli Sillanpää Committed by Robert Lange
Browse files

Allow using HTML-markup in form element help text. (#1312)

parent 84aa0bb4
No related merge requests found
......@@ -41,7 +41,9 @@
# settings (array) HTML attributes as key-value pairs, for example:
# - [class, "custom-css-class another-class"]
# type (string) Element type (text|textarea|email|url|select|radio)
# help (string) Element help text (translation key)
# help (string) Element help text (translation key).
# To include HTML formatting, use a translation key ending
# in '_html' here, and define markup in the language files.
#
# And for select and radio elements:
#
......
......@@ -73,7 +73,7 @@
<div class="form-group <?= $el['type'] ?>">
<?php if (!empty($el['help'])): ?>
<p class="info"><?= $this->transEsc($el['help']) ?></p>
<p class="info"><?= substr($el['help'], -5) === '_html' ? $this->translate($el['help']) : $this->transEsc($el['help']) ?></p>
<?php endif ?>
<?php if ($el['type'] !== 'submit'): ?>
<?php if ($el['type'] === 'radio'): ?>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment