summaryrefslogtreecommitdiffstats
path: root/extensions/BugModal/template/en/default
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2015-04-07 07:25:13 +0200
committerByron Jones <glob@mozilla.com>2015-04-07 07:25:13 +0200
commit2c9db0144d3b3816bbfbfd821657ff0daf3687d5 (patch)
treeac7b758b080e980138d6c869b7f24e7df475863b /extensions/BugModal/template/en/default
parent280c184398d4e4de9c00c96ee9dff1d7e6724615 (diff)
downloadbugzilla-2c9db0144d3b3816bbfbfd821657ff0daf3687d5.tar.gz
bugzilla-2c9db0144d3b3816bbfbfd821657ff0daf3687d5.tar.xz
Bug 1149796: "Reset Assignee to default" and "Reset QA Contact to default" options missing when changing a bug's component
Diffstat (limited to 'extensions/BugModal/template/en/default')
-rw-r--r--extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl26
-rw-r--r--extensions/BugModal/template/en/default/bug_modal/field.html.tmpl9
-rw-r--r--extensions/BugModal/template/en/default/bug_modal/header.html.tmpl4
3 files changed, 39 insertions, 0 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 e198a8706..29b2a1e40 100644
--- a/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl
+++ b/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl
@@ -414,6 +414,7 @@
[% WRAPPER bug_modal/field.html.tmpl
field = bug_fields.assigned_to
field_type = constants.FIELD_TYPE_USER
+ hide_on_edit = 1
%]
[% IF unassigned %]
<i>Unassigned</i>
@@ -424,6 +425,18 @@
[% INCLUDE bug_modal/user.html.tmpl u=bug.assigned_to %]
[% END %]
[% END %]
+ [% WRAPPER bug_modal/field.html.tmpl
+ field = bug_fields.assigned_to
+ field_type = constants.FIELD_TYPE_USER
+ hide_on_view = 1
+ append_content = 1
+ %]
+ <div class="set-default-container" style="display:none">
+ <input type="checkbox" id="set-default-assignee" name="set_default_assignee" class="set-default"
+ value="1" data-for="assigned_to">
+ <label for="set-default-assignee">Reset Assignee to default</label>
+ </div>
+ [% END %]
[%# mentors %]
[% WRAPPER bug_modal/field.html.tmpl
@@ -449,9 +462,22 @@
field = bug_fields.qa_contact
field_type = constants.FIELD_TYPE_USER
hide_on_view = bug.qa_contact == ""
+ hide_on_edit = 1
%]
[% INCLUDE bug_modal/user.html.tmpl u=bug.qa_contact %]
[% END %]
+ [% WRAPPER bug_modal/field.html.tmpl
+ field = bug_fields.qa_contact
+ field_type = constants.FIELD_TYPE_USER
+ hide_on_view = 1
+ append_content = 1
+ %]
+ <div class="set-default-container" style="display:none">
+ <input type="checkbox" id="set-default-qa-contact" name="set_default_qa_contact" class="set-default"
+ value="1" data-for="qa_contact">
+ <label for="set-default-qa-contact">Reset QA Contact to default</label>
+ </div>
+ [% END %]
[% END %]
[% WRAPPER fields_rhs %]
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 2d2cb56cf..787b8d9f1 100644
--- a/extensions/BugModal/template/en/default/bug_modal/field.html.tmpl
+++ b/extensions/BugModal/template/en/default/bug_modal/field.html.tmpl
@@ -22,6 +22,8 @@
# short_width: (boolean) the field shouldn't take up much space at all (default: false)
# hide_on_view: (boolean) hide field from read-only view (default: false)
# hide_on_edit: (boolean) hide content when in edit mode (default: false)
+ # 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);
#%]
[%
@@ -43,6 +45,9 @@ END;
IF !editable.defined;
editable = bug.check_can_change_field(name, 0, 1);
END;
+IF append_content;
+ edit_only = 1;
+END;
IF inline && !label.defined;
no_label = 1;
END;
@@ -248,6 +253,10 @@ END;
('[% name FILTER html %]' [[% field_type FILTER html %])] not supported)
[% END %]
+
+ [% IF append_content && content.defined %]
+ [% content FILTER none %]
+ [% END %]
</div>
[% END %]
</div>
diff --git a/extensions/BugModal/template/en/default/bug_modal/header.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/header.html.tmpl
index c6dd8b74c..70c98641f 100644
--- a/extensions/BugModal/template/en/default/bug_modal/header.html.tmpl
+++ b/extensions/BugModal/template/en/default/bug_modal/header.html.tmpl
@@ -97,4 +97,8 @@
zoom_textareas: [% user.settings.zoom_textareas.value == "on" ? "true" : "false" %]
}
};
+ [% IF user.id %]
+ BUGZILLA.default_assignee = '[% bug.component_obj.default_assignee.login FILTER js %]';
+ BUGZILLA.default_qa_contact = '[% bug.component_obj.default_qa_contact.login FILTER js %]';
+ [% END %]
[% END %]