Bug 494741 - Toggling Add/Don't add attachment doesn't reset JS state
git-svn-id: svn://10.0.0.236/branches/BUGZILLA-3_4-BRANCH@257297 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
2525d0c163
commit
6ce69b831e
@ -100,7 +100,12 @@ function clearAttachmentFields() {
|
||||
URLFieldHandler();
|
||||
}
|
||||
document.getElementById('description').value = '';
|
||||
document.getElementById('ispatch').checked = '';
|
||||
/* Fire onchange so that the disabled state of the content-type
|
||||
* radio buttons are also reset
|
||||
*/
|
||||
element = document.getElementById('ispatch');
|
||||
element.checked = '';
|
||||
bz_fireEvent(element, 'change');
|
||||
if ((element = document.getElementById('isprivate')))
|
||||
element.checked = '';
|
||||
}
|
||||
|
||||
@ -33,9 +33,8 @@
|
||||
title = title
|
||||
header = header
|
||||
subheader = subheader
|
||||
onload="setContentTypeDisabledState(document.entryform);"
|
||||
style_urls = [ 'skins/standard/create_attachment.css' ]
|
||||
javascript_urls = [ "js/attachment.js" ]
|
||||
javascript_urls = [ "js/attachment.js", "js/util.js" ]
|
||||
doc_section = "attachments.html"
|
||||
%]
|
||||
|
||||
|
||||
@ -70,6 +70,12 @@
|
||||
<input type="checkbox" id="ispatch" name="ispatch" value="1"
|
||||
onchange="setContentTypeDisabledState(this.form);">
|
||||
<label for="ispatch">patch</label><br><br>
|
||||
[%# Reset this whenever the page loads so that the JS state is up to date %]
|
||||
<script type="text/javascript">
|
||||
YAHOO.util.Event.onDOMReady(function() {
|
||||
bz_fireEvent(document.getElementById('ispatch'), 'change');
|
||||
});
|
||||
</script>
|
||||
|
||||
<em>Otherwise, choose a method for determining the content type.</em><br>
|
||||
<input type="radio" id="autodetect"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user