summaryrefslogtreecommitdiffstats
path: root/template/en/default/bug
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@redhat.com>2014-06-19 18:43:45 +0200
committerDavid Lawrence <dkl@redhat.com>2014-06-19 18:44:07 +0200
commita9081c21ce2e94410374692464b4026daf2656ae (patch)
tree44f18d689cab3107f833a13ae55472631bb4082c /template/en/default/bug
parent0898458132400dce4d9033487b1bde120762327e (diff)
downloadbugzilla-a9081c21ce2e94410374692464b4026daf2656ae.tar.gz
bugzilla-a9081c21ce2e94410374692464b4026daf2656ae.tar.xz
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
Diffstat (limited to 'template/en/default/bug')
-rw-r--r--template/en/default/bug/field-label.html.tmpl11
1 files changed, 10 insertions, 1 deletions
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, "<u>${matches.0}</u>") %]
+ [% END %]
+ [% END %]
<label for="[% field.name FILTER html %]"[% IF accesskey %] accesskey="[% accesskey FILTER html %]"[% END %]>
[% END %]
@@ -35,7 +44,7 @@
[% ELSE %]
href="page.cgi?id=fields.html#[% field.name FILTER uri %]"
[% END %]
- >[%- field_descs.${field.name} FILTER html %]:</a>
+ >[%- field_name FILTER none %]:</a>
[% '</label>' IF editable %]
</[% tag_name FILTER html %]>