summaryrefslogtreecommitdiffstats
path: root/extensions/BugModal/template/en/default/bug_modal/field.html.tmpl
diff options
context:
space:
mode:
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 %]