]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1015226: When using field-label.html.tmpl there is not a way to underline the...
authorDavid Lawrence <dkl@redhat.com>
Thu, 19 Jun 2014 16:43:45 +0000 (16:43 +0000)
committerDavid Lawrence <dkl@redhat.com>
Thu, 19 Jun 2014 16:44:07 +0000 (16:44 +0000)
r=glob,a=glob

template/en/default/bug/field-label.html.tmpl

index 95ac28acbd2c6a15088d1522905085ad6382b27c..74f2a47793f28dd120f60f8f0d3ce4ad21204ce9 100644 (file)
   #%]
 
 [% 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 %]>