From f472f02087a8cbdc209d5cedf857643eec827174 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Thu, 11 May 2017 13:41:56 -0400 Subject: Bug 1357775 - the needinfo dropdown for the triage owner should display the name and email address when selected --- .../template/en/default/bug/needinfo.html.tmpl | 40 ++++++++++------------ 1 file changed, 19 insertions(+), 21 deletions(-) (limited to 'extensions/Needinfo') diff --git a/extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl b/extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl index 111d8885a..75ec90b89 100644 --- a/extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl +++ b/extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl @@ -95,20 +95,7 @@ $(function() { } else { $('#needinfo_from_container').addClass('bz_default_hidden'); $('#needinfo_from').prop('disabled', true); - var identity = ''; - if (role == 'reporter') { - identity = '[% bug.reporter.realname || bug.reporter.login FILTER js %]'; - } else if (role == 'assigned_to') { - identity = '[% bug.assigned_to.realname || bug.assigned_to.login FILTER js %]'; - } else if (role == 'qa_contact') { - identity = '[% bug.qa_contact.realname || bug.qa_contact.login FILTER js %]'; - } else if (role == 'user') { - identity = '[% user.realname || user.login FILTER js %]'; - [% FOREACH mentor = available_mentors %] - } else if (role == '[% mentor.login FILTER js %]') { - identity = '[% mentor.realname || mentor.login FILTER js +%] [%+ IF available_mentors.size > 1 %](mentor)[% END %]'; - [% END %] - } + var identity = $("#needinfo_role :selected").data("identity"); $('#needinfo_role_identity').text(identity); } } @@ -202,24 +189,35 @@ $(function() { -- cgit v1.2.3-24-g4f1b