Add an id to the help
This commit is contained in:
parent
6ea7a2054b
commit
058489d7df
@ -155,6 +155,6 @@
|
||||
|
||||
{% block form_help -%}
|
||||
{% if help is not empty %}
|
||||
<span class="help-block">{{ translation_domain is same as(false) ? help : help|trans({}, translation_domain) }}</span>
|
||||
<span id="{{ id }}_help" class="help-block">{{ translation_domain is same as(false) ? help : help|trans({}, translation_domain) }}</span>
|
||||
{% endif %}
|
||||
{%- endblock form_help %}
|
||||
|
@ -282,6 +282,6 @@
|
||||
|
||||
{% block form_help -%}
|
||||
{% if help is not empty %}
|
||||
<small class="form-text text-muted">{{ translation_domain is same as(false) ? help : help|trans({}, translation_domain) }}</small>
|
||||
<small id="{{ id }}_help" class="form-text text-muted">{{ translation_domain is same as(false) ? help : help|trans({}, translation_domain) }}</small>
|
||||
{% endif %}
|
||||
{%- endblock form_help %}
|
||||
|
@ -291,7 +291,7 @@
|
||||
|
||||
{% block form_help -%}
|
||||
{% if help is not empty %}
|
||||
<p class="help-text">{{ translation_domain is same as(false) ? help : help|trans({}, translation_domain) }}</p>
|
||||
<p id="{{ id }}_help" class="help-text">{{ translation_domain is same as(false) ? help : help|trans({}, translation_domain) }}</p>
|
||||
{% endif %}
|
||||
{%- endblock form_help %}
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
<?php if (!empty($help)): ?>
|
||||
<p class="help-text"><?php echo $view->escape(false !== $translation_domain ? $view['translator']->trans($help, array(), $translation_domain) : $help) ?></p>
|
||||
<p id="<?php echo $view->escape($id) ?>_help" class="help-text"><?php echo $view->escape(false !== $translation_domain ? $view['translator']->trans($help, array(), $translation_domain) : $help) ?></p>
|
||||
<?php endif ?>
|
||||
|
@ -112,6 +112,7 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
|
||||
|
||||
$this->assertMatchesXpath($html,
|
||||
'/span
|
||||
[@id="name_help"]
|
||||
[@class="help-block"]
|
||||
[.="[trans]Help text test![/trans]"]
|
||||
'
|
||||
|
@ -161,6 +161,7 @@ abstract class AbstractBootstrap4LayoutTest extends AbstractBootstrap3LayoutTest
|
||||
|
||||
$this->assertMatchesXpath($html,
|
||||
'/small
|
||||
[@id="name_help"]
|
||||
[@class="form-text text-muted"]
|
||||
[.="[trans]Help text test![/trans]"]
|
||||
'
|
||||
|
@ -420,6 +420,7 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase
|
||||
|
||||
$this->assertMatchesXpath($html,
|
||||
'/p
|
||||
[@id="name_help"]
|
||||
[@class="help-text"]
|
||||
[.="[trans]Help text test![/trans]"]
|
||||
'
|
||||
|
Reference in New Issue
Block a user