~hexmode/+junk/bugzilla4

« back to all changes in this revision

Viewing changes to template/en/default/bug/create/create.html.tmpl

  • Committer: Frédéric Buclin
  • Date: 2011-07-26 09:08:44 UTC
  • Revision ID: lpsolit@gmail.com-20110726090844-pton77qoosxpz4lt
Bug 647158: The Error Console in Firefox reports
"unbalanced tree was written using document.write()"
when reporting a new bug or when visiting the "User Authentication" panel in the Parameters page
r=glob a=LpSolit

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
                 'skins/standard/enter_bug.css' ]
36
36
  javascript_urls = [ "js/attachment.js", "js/util.js",
37
37
                      "js/field.js", "js/TUI.js", "js/bug.js" ]
38
 
  onload = 'set_assign_to();'
 
38
  onload = "set_assign_to(); hideElementById('attachment_true');
 
39
            showElementById('attachment_false'); showElementById('btn_no_attachment');"
39
40
%]
40
41
 
41
42
<script type="text/javascript">
149
150
    }
150
151
}
151
152
 
152
 
function handleWantsAttachment(wants_attachment) {
153
 
    if (wants_attachment) {
154
 
        document.getElementById('attachment_false').style.display = 'none';
155
 
        document.getElementById('attachment_true').style.display = 'block';
156
 
    }
157
 
    else {
158
 
        document.getElementById('attachment_false').style.display = 'block';
159
 
        document.getElementById('attachment_true').style.display = 'none';
160
 
        clearAttachmentFields();
161
 
    }
162
 
}
163
 
 
164
153
var status_comment_required = new Array();
165
154
[% FOREACH status = bug_status %]
166
155
  status_comment_required['[% status.name FILTER js %]'] = 
601
590
  <tr>
602
591
    <th>Attachment:</th>
603
592
    <td colspan="3">
604
 
      <script type="text/javascript">
605
 
        <!--
606
 
        document.write( '<div id="attachment_false">'
607
 
                      +   '<input type="button" value="Add an attachment" '
608
 
                      +          'onClick="handleWantsAttachment(true)"> '
609
 
                      +   '<em style="display: none">This button has no '
610
 
                      +   'functionality for you because your browser does '
611
 
                      +   'not support CSS or does not use it.<\/em>'
612
 
                      + '<\/div>'
613
 
                      + '<div id="attachment_true" style="display: none">'
614
 
                      +   '<input type="button" '
615
 
                      +          'value="Don\'t add an attachment " '
616
 
                      +          'onClick="handleWantsAttachment(false)">');
617
 
        //-->
618
 
      </script>
 
593
      <div id="attachment_false" class="bz_default_hidden">
 
594
        <input type="button" value="Add an attachment" onClick="handleWantsAttachment(true)">
 
595
      </div>
 
596
 
 
597
      <div id="attachment_true">
 
598
        <input type="button" id="btn_no_attachment" value="Don't add an attachment"
 
599
               class="bz_default_hidden"  onClick="handleWantsAttachment(false)">
619
600
        <fieldset>
620
601
          <legend>Add an attachment</legend>
621
602
          <table class="attachment_entry">
625
606
                       flag_table_id ="attachment_flags" %]
626
607
          </table>
627
608
        </fieldset>
628
 
      <script type="text/javascript">
629
 
        <!--
630
 
        document.write('<\/div>');
631
 
        //-->
632
 
      </script>
 
609
      </div>
633
610
    </td>
634
611
  </tr>
635
612
  [% END %]