summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2015-06-05 07:25:41 +0200
committerByron Jones <glob@mozilla.com>2015-06-05 07:25:41 +0200
commit2c22fb44b12e7f1cbaa546ebe17f61d9bd8de92f (patch)
tree893846a53acd34c6ad5764642a264a6f218aa673
parentcfeb11bd563ef4fba2e8154e18724400cd0a3838 (diff)
downloadbugzilla-2c22fb44b12e7f1cbaa546ebe17f61d9bd8de92f.tar.gz
bugzilla-2c22fb44b12e7f1cbaa546ebe17f61d9bd8de92f.tar.xz
Bug 1171818: link fields to descriptions (where appropriate)
-rw-r--r--extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl5
-rw-r--r--extensions/BugModal/template/en/default/bug_modal/field.html.tmpl7
-rw-r--r--extensions/BugModal/web/bug_modal.css5
3 files changed, 16 insertions, 1 deletions
diff --git a/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl
index d59717233..c40926566 100644
--- a/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl
+++ b/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl
@@ -274,6 +274,7 @@
field = bug_fields.product
field_type = constants.FIELD_TYPE_SINGLE_SELECT
hide_on_edit = can_edit_product
+ help = "describecomponents.cgi"
%]
<span class="spin-latch" id="product-latch" data-latch="#product-latch" data-for="#product-info">&#9656;</span>
<div class="spin-toggle" data-latch="#product-latch" data-for="#product-info">
@@ -289,6 +290,7 @@
hide_on_view = 1
hide_on_edit = !can_edit_product
append_content = 1
+ help = "describecomponents.cgi"
%]
<span id="product-search-container">
[% PROCESS prodcompsearch/form.html.tmpl
@@ -310,6 +312,7 @@
[% WRAPPER bug_modal/field.html.tmpl
field = bug_fields.component
field_type = constants.FIELD_TYPE_SINGLE_SELECT
+ help = "describecomponents.cgi"
%]
<span class="spin-latch" id="component-latch" data-latch="#component-latch" data-for="#component-info">&#9656;</span>
<div class="spin-toggle" data-latch="#component-latch" data-for="#component-info">
@@ -671,6 +674,7 @@
field = bug_fields.keywords
field_type = constants.FIELD_TYPE_KEYWORDS
hide_on_view = bug.keyword_objects.size == 0
+ help = "describekeywords.cgi"
%]
[% bug.keyword_objects.pluck("name").join(", ") || "---" FILTER html %]
[% END %]
@@ -822,6 +826,7 @@
[% WRAPPER bug_modal/field.html.tmpl
field = bug_fields.status_whiteboard
field_type = constants.FIELD_TYPE_FREETEXT
+ help = "https://wiki.mozilla.org/BMO/Whiteboard"
%]
[% bug.status_whiteboard == "" ? "---" : bug.status_whiteboard FILTER html %]
[% END %]
diff --git a/extensions/BugModal/template/en/default/bug_modal/field.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/field.html.tmpl
index c988bd645..0c2f59cb0 100644
--- a/extensions/BugModal/template/en/default/bug_modal/field.html.tmpl
+++ b/extensions/BugModal/template/en/default/bug_modal/field.html.tmpl
@@ -25,6 +25,7 @@
# append_content: (boolean) when called as a WRAPPER, the content will be appended to the
# edit html instead of replacing it. forces edit_only (default: false);
# default: (string) default value (eg. used as a placeholder in user fields)
+ # help: (string) optional url that describes the field (requires a label to be defined and visible)
# action: (hash) show a button to the right of the edit field (user fields only currently). keys:
# id: (string) optional button id
# class: (string) optional button class
@@ -94,7 +95,11 @@ END;
[% IF hide_on_view %] style="display:none"[% END %]
>
[% IF label.defined && !no_label %]
- <div class="name">[% label _ ":" FILTER html IF label %]</div>
+ <div class="name">
+ [%~ IF help.defined %]<a href="[% help FILTER none %]" class="help">[% END %]
+ [%~ label _ ":" FILTER html IF label %]
+ [%~ IF help.defined %]</a>[% END ~%]
+ </div>
[% END %]
[%# read-only html %]
diff --git a/extensions/BugModal/web/bug_modal.css b/extensions/BugModal/web/bug_modal.css
index e3070f2a6..c3093fa83 100644
--- a/extensions/BugModal/web/bug_modal.css
+++ b/extensions/BugModal/web/bug_modal.css
@@ -172,6 +172,11 @@ select[multiple], .text_input, .yui-ac-input, input {
color: #666;
}
+.module .field .name .help {
+ color: #666;
+ cursor: help;
+}
+
.module .field.inline .name {
min-width: 0px;
width: auto;