Skip to content
Snippets Groups Projects
Commit bc9dd78b authored by Eric Bremner's avatar Eric Bremner Committed by Kevin Paxman
Browse files

ISTWCMS-6711: fixing the form field id for details label

parent a4f5af16
No related branches found
No related tags found
1 merge request!122ISTWCMS-6711: fixing label for details
......@@ -30,7 +30,7 @@ Prefix 'details' class to avoid collision with Modernizr.
]
%}
<summary{{ summary_attributes.addClass(summary_classes) }}>
<label for="{{ element['#id'] }}">{{ title }}</label>
<label for="{{ form_field_id }}">{{ title }}</label>
</summary>
{%- endif -%}
<div class="seven-details__wrapper details-wrapper">
......
......@@ -687,3 +687,17 @@ function uw_fdsu_theme_resp_preprocess_container(&$variables) {
}
}
}
/**
* Implements template_preprocess_details().
*/
function uw_fdsu_theme_resp_preprocess_details(&$variables) {
// Add the form field id to the variables.
// This comes from ISTWCMS-6711, we are
// removing the -collapsible if there is
// one there and using the html id. If there
// is no -collapsible, it will just use the
// html id.
$variables['form_field_id'] = str_replace('-collapsible', '', $variables['attributes']['id']);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment