From a9081c21ce2e94410374692464b4026daf2656ae Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Thu, 19 Jun 2014 16:43:45 +0000 Subject: Bug 1015226: When using field-label.html.tmpl there is not a way to underline the access key letter in the field description r=glob,a=glob --- template/en/default/bug/field-label.html.tmpl | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'template/en') diff --git a/template/en/default/bug/field-label.html.tmpl b/template/en/default/bug/field-label.html.tmpl index 95ac28acb..74f2a4779 100644 --- a/template/en/default/bug/field-label.html.tmpl +++ b/template/en/default/bug/field-label.html.tmpl @@ -16,12 +16,21 @@ #%] [% DEFAULT tag_name = "th" %] +[% DEFAULT field_name = field_descs.${field.name} FILTER html %] + <[% tag_name FILTER html %] class="field_label [% ' bz_hidden_field' IF hidden %] [%- ' required' IF field.is_mandatory && NOT bug.id %]" id="field_label_[% field.name FILTER html %]" [% IF rowspan %] rowspan="[% rowspan FILTER html %]"[% END %]> [% IF editable %] + [%# Underline the accesskey if defined and found in the field name %] + [% IF accesskey %] + [% matches = field_name.match("(?i)($accesskey)") %] + [% IF matches.0 %] + [% field_name = field_name.replace(matches.0, "${matches.0}") %] + [% END %] + [% END %] ' IF editable %] -- cgit v1.2.3-24-g4f1b