Commit cd61d357 authored by Dave Lawrence's avatar Dave Lawrence

Bug 684171 - add a "(take)" link to the QA Contact field

r/a=LpSolit
parent f6bafcf4
...@@ -294,7 +294,7 @@ function checkForChangedFieldValues(e, ContainerInputArray ) { ...@@ -294,7 +294,7 @@ function checkForChangedFieldValues(e, ContainerInputArray ) {
var unhide = false; var unhide = false;
if ( el ) { if ( el ) {
if ( el.value != ContainerInputArray[3] || if ( el.value != ContainerInputArray[3] ||
( el.value == "" && el.id != "alias") ) { ( el.value == "" && el.id != "alias" && el.id != 'qa_contact') ) {
unhide = true; unhide = true;
} }
else { else {
......
...@@ -421,36 +421,41 @@ ...@@ -421,36 +421,41 @@
</td> </td>
<td> <td>
[% IF bug.check_can_change_field("qa_contact", 0, 1) %] [% IF bug.check_can_change_field("qa_contact", 0, 1) %]
[% IF bug.qa_contact != "" %] <div id="bz_qa_contact_edit_container" class="bz_default_hidden">
<div id="bz_qa_contact_edit_container" class="bz_default_hidden">
<span> <span>
<span id="bz_qa_contact_edit_display"> [% INCLUDE global/user.html.tmpl who = bug.qa_contact %]
[% INCLUDE global/user.html.tmpl who = bug.qa_contact %]</span>
(<a href="#" id="bz_qa_contact_edit_action">edit</a>) (<a href="#" id="bz_qa_contact_edit_action">edit</a>)
[% IF bug.qa_contact.id != user.id %]
(<a title="Change QA contact to yourself"
href="#" id="bz_qa_contact_take_action">take</a>)
[% END %]
</span> </span>
</div> </div>
[% END %]
<div id="bz_qa_contact_input"> <div id="bz_qa_contact_input">
[% INCLUDE global/userselect.html.tmpl [% INCLUDE global/userselect.html.tmpl
id => "qa_contact" id => "qa_contact"
name => "qa_contact" name => "qa_contact"
value => bug.qa_contact.login value => bug.qa_contact.login
size => 30 size => 30
classes => ["bz_userfield"] classes => ["bz_userfield"]
emptyok => 1 emptyok => 1
%] %]
<br> <br>
<input type="checkbox" id="set_default_qa_contact" name="set_default_qa_contact" value="1"> <input type="checkbox" id="set_default_qa_contact" name="set_default_qa_contact" value="1">
<label for="set_default_qa_contact" id="set_default_qa_contact_label">Reset QA Contact to default</label> <label for="set_default_qa_contact" id="set_default_qa_contact_label">Reset QA Contact to default</label>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
[% IF bug.qa_contact != "" %] hideEditableField('bz_qa_contact_edit_container',
hideEditableField('bz_qa_contact_edit_container', 'bz_qa_contact_input',
'bz_qa_contact_input', 'bz_qa_contact_edit_action',
'bz_qa_contact_edit_action', 'qa_contact',
'qa_contact', '[% bug.qa_contact.login FILTER js %]');
'[% bug.qa_contact.login FILTER js %]'); hideEditableField('bz_qa_contact_edit_container',
[% END %] 'bz_qa_contact_input',
'bz_qa_contact_take_action',
'qa_contact',
'[% bug.qa_contact.login FILTER js %]',
'[% user.login FILTER js %]');
initDefaultCheckbox('qa_contact'); initDefaultCheckbox('qa_contact');
</script> </script>
[% ELSE %] [% ELSE %]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment