From 2c9db0144d3b3816bbfbfd821657ff0daf3687d5 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Tue, 7 Apr 2015 13:25:13 +0800 Subject: Bug 1149796: "Reset Assignee to default" and "Reset QA Contact to default" options missing when changing a bug's component --- .../template/en/default/bug_modal/edit.html.tmpl | 26 ++++++++++++++++++++++ .../template/en/default/bug_modal/field.html.tmpl | 9 ++++++++ .../template/en/default/bug_modal/header.html.tmpl | 4 ++++ 3 files changed, 39 insertions(+) (limited to 'extensions/BugModal/template/en') 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 %] Unassigned @@ -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 + %] + + [% 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 + %] + + [% 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 %] [% END %] 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 %] -- cgit v1.2.3-24-g4f1b