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


git-svn-id: svn://10.0.0.236/trunk@265441 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzrmirror%bugzilla.org 2014-06-19 17:00:47 +00:00
parent 883150cdab
commit b4c0a36c78
3 changed files with 12 additions and 3 deletions

View File

@ -1 +1 @@
9064 9065

View File

@ -1 +1 @@
0898458132400dce4d9033487b1bde120762327e a9081c21ce2e94410374692464b4026daf2656ae

View File

@ -16,12 +16,21 @@
#%] #%]
[% DEFAULT tag_name = "th" %] [% 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 %] <[% tag_name FILTER html %] class="field_label [% ' bz_hidden_field' IF hidden %]
[%- ' required' IF field.is_mandatory && NOT bug.id %]" [%- ' required' IF field.is_mandatory && NOT bug.id %]"
id="field_label_[% field.name FILTER html %]" id="field_label_[% field.name FILTER html %]"
[% IF rowspan %] rowspan="[% rowspan FILTER html %]"[% END %]> [% IF rowspan %] rowspan="[% rowspan FILTER html %]"[% END %]>
[% IF editable %] [% 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 %]> <label for="[% field.name FILTER html %]"[% IF accesskey %] accesskey="[% accesskey FILTER html %]"[% END %]>
[% END %] [% END %]
@ -35,7 +44,7 @@
[% ELSE %] [% ELSE %]
href="page.cgi?id=fields.html#[% field.name FILTER uri %]" href="page.cgi?id=fields.html#[% field.name FILTER uri %]"
[% END %] [% END %]
>[%- field_descs.${field.name} FILTER html %]:</a> >[%- field_name FILTER none %]:</a>
[% '</label>' IF editable %] [% '</label>' IF editable %]
</[% tag_name FILTER html %]> </[% tag_name FILTER html %]>