summaryrefslogtreecommitdiffstats
path: root/extensions/Needinfo/template/en/default
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2013-05-29 06:25:53 +0200
committerByron Jones <bjones@mozilla.com>2013-05-29 06:25:53 +0200
commit114f371c93495fdab5690144bf9577f95ac224d5 (patch)
tree422511fd4508737edf61bfe196d074f754100a42 /extensions/Needinfo/template/en/default
parentf9343dd122a5ab67d8b7f6e46747120e4cf830fb (diff)
downloadbugzilla-114f371c93495fdab5690144bf9577f95ac224d5.tar.gz
bugzilla-114f371c93495fdab5690144bf9577f95ac224d5.tar.xz
Bug 875613: The default for needinfo should be "other"
Diffstat (limited to 'extensions/Needinfo/template/en/default')
-rw-r--r--extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl41
1 files changed, 28 insertions, 13 deletions
diff --git a/extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl b/extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl
index f56f8490b..2ffbbe835 100644
--- a/extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl
+++ b/extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl
@@ -57,41 +57,56 @@
<tr>
<td align="center">
<script>
- function needinfoRole (select) {
+ function needinfo_visibility() {
+ if (YAHOO.util.Dom.get('needinfo_role').value == 'other') {
+ YAHOO.util.Dom.removeClass('needinfo_from_container', 'bz_default_hidden');
+ } else {
+ YAHOO.util.Dom.addClass('needinfo_from_container', 'bz_default_hidden');
+ }
+ }
+ function needinfo_focus() {
+ if (YAHOO.util.Dom.get('needinfo').checked
+ && YAHOO.util.Dom.get('needinfo_role').value == 'other')
+ {
+ YAHOO.util.Dom.get('needinfo_from').focus();
+ YAHOO.util.Dom.get('needinfo_from').select();
+ }
+ }
+ function needinfo_role_changed() {
YAHOO.util.Dom.get('needinfo').checked = true;
- if (select.value == 'other') {
- YAHOO.util.Dom.removeClass('needinfo_from_container', 'bz_default_hidden');
- YAHOO.util.Dom.get('needinfo_from').focus();
+ needinfo_visibility();
+ needinfo_focus();
}
- else {
- YAHOO.util.Dom.addClass('needinfo_from_container', 'bz_default_hidden');
+ function needinfo_other_changed() {
+ YAHOO.util.Dom.get('needinfo').checked = YAHOO.util.Dom.get('needinfo_from').value != '';
}
- }
+ YAHOO.util.Event.onDOMReady(needinfo_visibility);
</script>
- <input type="checkbox" name="needinfo" value="1" id="needinfo">
+ <input type="checkbox" name="needinfo" value="1" id="needinfo" onchange="needinfo_focus()">
</td>
<td>
<label for="needinfo">Need more information from</label>
- <select name="needinfo_role" id="needinfo_role" onchange="needinfoRole(this);">
- <option value="">anyone</option>
+ <select name="needinfo_role" id="needinfo_role" onchange="needinfo_role_changed()">
+ <option value="other">other</option>
<option value="reporter">reporter</option>
<option value="assigned_to">assignee</option>
[% IF Param('useqacontact') && bug.qa_contact.login != "" %]
<option value="qa_contact">qa contact</option>
[% END %]
- <option value="other">other</option>
+ <option value="">anyone</option>
</select>
- <span id="needinfo_from_container" class="bz_default_hidden">
+ <span id="needinfo_from_container">
[% INCLUDE global/userselect.html.tmpl
id => "needinfo_from"
name => "needinfo_from"
value => ""
size => 30
multiple => 5
+ onchange => "needinfo_other_changed()"
field_title => "Enter one or more comma separated users to request more information from"
%]
</span>
- </td>
+ </td>
</tr>
[% END %]
</table>