summaryrefslogtreecommitdiffstats
path: root/extensions/BugModal/template/en/default
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/BugModal/template/en/default')
-rw-r--r--extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl99
-rw-r--r--extensions/BugModal/template/en/default/bug_modal/field.html.tmpl5
2 files changed, 63 insertions, 41 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 a7eb2b7c6..c22c0a7f8 100644
--- a/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl
+++ b/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl
@@ -436,34 +436,41 @@
label = "Status"
hide_on_view = bug.assigned_to.id != user.id
%]
- [% INCLUDE bug_modal/field.html.tmpl
- field = bug_fields.bug_status
- field_type = constants.FIELD_TYPE_SINGLE_SELECT
- editable = bug.choices.bug_status.size > 1
- values = bug.choices.bug_status
- inline = 1
- no_indent = 1
- edit_only = 1
- %]
- [% INCLUDE bug_modal/field.html.tmpl
- field = bug_fields.resolution
- field_type = constants.FIELD_TYPE_SINGLE_SELECT
- editable = bug.choices.resolution.size > (bug.resolution == "" ? 0 : 1)
- values = bug.choices.resolution
- inline = 1
- edit_only = 1
- %]
- [% IF bug.choices.resolution.only("name", "DUPLICATE").size %]
- <div id="duplicate-container">
- of
- <input id="dup_id" name="dup_id" size="6" value="[% bug.dup_id FILTER html %]">
- </div>
- <div id="duplicate-actions">
- <button type="button" class="minor" id="mark-as-dup-btn">
- Mark as Duplicate
- </button>
- </div>
- [% END %]
+ [% INCLUDE status_block %]
+ [% END %]
+[% END %]
+
+[% BLOCK status_block %]
+ [% INCLUDE bug_modal/field.html.tmpl
+ prefix = prefix
+ field = bug_fields.bug_status
+ field_type = constants.FIELD_TYPE_SINGLE_SELECT
+ editable = bug.choices.bug_status.size > 1
+ values = bug.choices.bug_status
+ inline = 1
+ no_indent = 1
+ edit_only = 1
+ %]
+ [% INCLUDE bug_modal/field.html.tmpl
+ prefix = prefix
+ field = bug_fields.resolution
+ field_type = constants.FIELD_TYPE_SINGLE_SELECT
+ editable = bug.choices.resolution.size > (bug.resolution == "" ? 0 : 1)
+ values = bug.choices.resolution
+ inline = 1
+ edit_only = 1
+ %]
+ [% IF bug.choices.resolution.only("name", "DUPLICATE").size %]
+ <div id="[% prefix FILTER none %]duplicate-container">
+ of
+ <input id="[% prefix FILTER none %]dup_id" name="[% prefix FILTER none %]dup_id"
+ size="6" value="[% bug.dup_id FILTER html %]">
+ </div>
+ <div id="[% prefix FILTER none %]duplicate-actions">
+ <button type="button" class="minor" id="[% prefix FILTER none %]mark-as-dup-btn">
+ Mark as Duplicate
+ </button>
+ </div>
[% END %]
[% END %]
@@ -1096,21 +1103,31 @@
[% IF user.id %]
<div id="new-comment-actions">
<button type="submit" class="save-btn major" id="bottom-save-btn">Save Changes</button>
- [%
- IF bug.resolution == "";
- seen_header = 0;
- FOREACH resolution IN ["FIXED", "INVALID", "DUPLICATE"];
- NEXT UNLESS bug.choices.resolution.only("name", resolution).size;
- IF NOT seen_header;
- seen_header = 1;
- " Resolve as ";
+ <div id="resolve-as">
+ [%
+ IF bug.resolution == "";
+ seen_header = 0;
+ FOREACH resolution IN ["FIXED", "INVALID", "DUPLICATE"];
+ NEXT UNLESS bug.choices.resolution.only("name", resolution).size;
+ IF NOT seen_header;
+ seen_header = 1;
+ " Resolve as ";
+ END;
+ %] <button type="button" class="minor resolution-btn">[% resolution FILTER html %]</button> [%
+ END;
+ ELSE;
+ IF bug.choices.bug_status.only("name", "VERIFIED").size && bug.bug_status != "VERIFIED";
+ %] <button type="button" class="minor status-btn" data-status="VERIFIED">VERIFY</button> [%
+ END;
+ IF bug.choices.bug_status.only("name", "REOPENED").size;
+ %] <button type="button" class="minor status-btn" data-status="REOPENED">REOPEN</button> [%
END;
- %] <button type="button" class="minor resolution-btn">[% resolution FILTER html %]</button> [%
END;
- ELSIF bug.choices.bug_status.only("name", "REOPENED").size;
- %] <button type="button" class="minor status-btn" data-status="REOPENED">REOPEN</button> [%
- END;
- %]
+ %]
+ </div>
+ <div id="bottom-status" style="display:none">
+ [% INCLUDE status_block prefix="bottom-" %]
+ </div>
</div>
[% END %]
[% 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 bbc7dbb00..b31052d36 100644
--- a/extensions/BugModal/template/en/default/bug_modal/field.html.tmpl
+++ b/extensions/BugModal/template/en/default/bug_modal/field.html.tmpl
@@ -14,6 +14,8 @@
# view_only: (boolean) don't allow editing (default: determined from bug.check_can_change_field)
# edit_only: (boolean) always render the edit ui
# container: (boolean) output just a label and the content (eg. for multiple fields next to one label)
+ # name: (string) field name (default: field.name)
+ # prefix: (string) string to prepend to 'name' and 'id' attributes (default: empty)
# value: (string) visible value (default: bug.$name)
# values: (array of string) list of value objects (FIELD_TYPE_SINGLE_SELECT and _BUG_URLS only) (default: lazy-load on edit)
# inline: (boolean) output field as a table-cell instead of as a stand-alone div (default: false)
@@ -64,6 +66,9 @@ END;
IF field_type == "";
field_type = -1;
END;
+IF prefix.defined;
+ name = prefix _ name;
+END;
# date picker fields should always be short
IF field_type == constants.FIELD_TYPE_DATE
|| field_type == constants.FIELD_TYPE_DATETIME;