Commit 212b28b0 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 348337: enter_bug.cgi doesn't pass HTML validation - Patch by Frédéric…

Bug 348337: enter_bug.cgi doesn't pass HTML validation - Patch by Frédéric Buclin <LpSolit@gmail.com> r=kevin.benton a=myk
parent 41560ee5
...@@ -265,6 +265,7 @@ function handleWantsAttachment(wants_attachment) { ...@@ -265,6 +265,7 @@ function handleWantsAttachment(wants_attachment) {
[% IF product.flag_types.bug.size > 0 %] [% IF product.flag_types.bug.size > 0 %]
[% PROCESS "flag/list.html.tmpl" flag_types = product.flag_types.bug [% PROCESS "flag/list.html.tmpl" flag_types = product.flag_types.bug
any_flags_requesteeble = 1 any_flags_requesteeble = 1
flag_table_id = "bug_flags"
%] %]
[% END %] [% END %]
</td> </td>
...@@ -365,7 +366,7 @@ function handleWantsAttachment(wants_attachment) { ...@@ -365,7 +366,7 @@ function handleWantsAttachment(wants_attachment) {
enter_bug => 1 }) %] enter_bug => 1 }) %]
[% SET value = ${field.name} IF ${field.name}.defined %] [% SET value = ${field.name} IF ${field.name}.defined %]
<tr> <tr>
[% PROCESS bug/field.html.tmpl editable=1 value_span=3 %] [% PROCESS bug/field.html.tmpl editable=1 value_span=2 %]
</tr> </tr>
[% END %] [% END %]
...@@ -425,8 +426,8 @@ function handleWantsAttachment(wants_attachment) { ...@@ -425,8 +426,8 @@ function handleWantsAttachment(wants_attachment) {
+ 'onClick="handleWantsAttachment(true)"> ' + 'onClick="handleWantsAttachment(true)"> '
+ '<em style="display: none">This button has no ' + '<em style="display: none">This button has no '
+ 'functionality for you because your browser does ' + 'functionality for you because your browser does '
+ 'not support CSS or does not use it.</em>' + 'not support CSS or does not use it.<\/em>'
+ '</div>' + '<\/div>'
+ '<div id="attachment_true" style="display: none">' + '<div id="attachment_true" style="display: none">'
+ '<input type="button" ' + '<input type="button" '
+ 'value="Don\'t add an attachment " ' + 'value="Don\'t add an attachment " '
...@@ -437,12 +438,13 @@ function handleWantsAttachment(wants_attachment) { ...@@ -437,12 +438,13 @@ function handleWantsAttachment(wants_attachment) {
<legend>Add an attachment</legend> <legend>Add an attachment</legend>
<table class="attachment_entry"> <table class="attachment_entry">
[% PROCESS attachment/createformcontents.html.tmpl [% PROCESS attachment/createformcontents.html.tmpl
flag_types = product.flag_types.attachment %] flag_types = product.flag_types.attachment
flag_table_id ="attachment_flags" %]
</table> </table>
</fieldset> </fieldset>
<script type="text/javascript"> <script type="text/javascript">
<!-- <!--
document.write('</div>'); document.write('<\/div>');
//--> //-->
</script> </script>
</td> </td>
......
...@@ -37,14 +37,11 @@ ...@@ -37,14 +37,11 @@
[% '</label>' IF editable %] [% '</label>' IF editable %]
</th> </th>
<td class="field_value"> <td class="field_value" [% "colspan=\"$value_span\"" FILTER none IF value_span %]>
[% IF editable %] [% IF editable %]
[% SWITCH field.type %] [% SWITCH field.type %]
[% CASE constants.FIELD_TYPE_FREETEXT %] [% CASE constants.FIELD_TYPE_FREETEXT %]
<input name="[% field.name FILTER html %]" <input name="[% field.name FILTER html %]" value="[% value FILTER html %]" size="60">
value="[% value FILTER html %]"
[% "colspan=\"$value_span\"" FILTER none IF value_span %]
size="60">
[% END %] [% END %]
[% ELSE %] [% ELSE %]
[% value FILTER html %] [% value FILTER html %]
......
...@@ -72,7 +72,9 @@ ...@@ -72,7 +72,9 @@
# on a single bug/attachment). # on a single bug/attachment).
#%] #%]
<table id="flags"> [% DEFAULT flag_table_id = "flags" %]
<table id="[% flag_table_id FILTER html %]">
<tr> <tr>
<th colspan="3"> <th colspan="3">
Flags: Flags:
......
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