summaryrefslogtreecommitdiffstats
path: root/extensions/BugModal/template/en/default/bug_modal/field.html.tmpl
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2015-04-07 07:10:42 +0200
committerByron Jones <glob@mozilla.com>2015-04-07 07:10:42 +0200
commit50a1473b3c89bf8fe153cfd9c4c29a0de104d36d (patch)
treeb77aff32d1318ee994a58c9f7d1811d55ddcc187 /extensions/BugModal/template/en/default/bug_modal/field.html.tmpl
parent3c87e9f850f0b02e768fd1b045299e95bf10959b (diff)
downloadbugzilla-50a1473b3c89bf8fe153cfd9c4c29a0de104d36d.tar.gz
bugzilla-50a1473b3c89bf8fe153cfd9c4c29a0de104d36d.tar.xz
Bug 1149879: bug-modal's editmode is broken for users without editbugs (Form field dup_id was not defined)
Diffstat (limited to 'extensions/BugModal/template/en/default/bug_modal/field.html.tmpl')
-rw-r--r--extensions/BugModal/template/en/default/bug_modal/field.html.tmpl15
1 files changed, 15 insertions, 0 deletions
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 cb2ce7a7a..2d2cb56cf 100644
--- a/extensions/BugModal/template/en/default/bug_modal/field.html.tmpl
+++ b/extensions/BugModal/template/en/default/bug_modal/field.html.tmpl
@@ -52,10 +52,23 @@ END;
IF field_type == "";
field_type = -1;
END;
+# date picker fields should always be short
IF field_type == constants.FIELD_TYPE_DATE
|| field_type == constants.FIELD_TYPE_DATETIME;
short_width = 1;
END;
+# determine if a field is set
+IF field_type == constants.FIELD_TYPE_BUG_URLS || field_type == constants.FIELD_TYPE_BUG_LIST;
+ has_value = values.size > 0;
+ELSIF field_type == constants.FIELD_TYPE_MULTI_SELECT || field_type == constants.FIELD_TYPE_USERS;
+ has_value = value.size > 0;
+ELSE;
+ has_value = value != "";
+END;
+# switch to view mode if edit-only and the current user cannot edit
+IF !editable && edit_only;
+ edit_only = 0;
+END;
%]
<div class="field
@@ -78,6 +91,8 @@ END;
[% END %]
[% IF content.defined %]
[% content FILTER none %]
+ [% ELSIF !editable && !has_value %]
+ ---
[% ELSE %]
[% SWITCH field_type %]