diff options
Diffstat (limited to 'template/en/default/attachment')
5 files changed, 18 insertions, 9 deletions
diff --git a/template/en/default/attachment/create.html.tmpl b/template/en/default/attachment/create.html.tmpl index e058b3def..329e0ab49 100644 --- a/template/en/default/attachment/create.html.tmpl +++ b/template/en/default/attachment/create.html.tmpl @@ -39,7 +39,7 @@ doc_section = "attachments.html" %] -<script> +<script [% script_nonce FILTER none %]> <!-- TUI_hide_default('attachment_text_field'); --> diff --git a/template/en/default/attachment/createformcontents.html.tmpl b/template/en/default/attachment/createformcontents.html.tmpl index dc861b7a6..41a02a913 100644 --- a/template/en/default/attachment/createformcontents.html.tmpl +++ b/template/en/default/attachment/createformcontents.html.tmpl @@ -21,13 +21,22 @@ # Marc Schumann <wurblzap@gmail.com> #%] +<script [% script_nonce FILTER none %]> + document.addEventListener("DOMContentLoaded", function (event) { + document.querySelector("#attachment_data_controller").addEventListener( + "click", function (event) { + TUI_toggle_class('attachment_text_field'); + TUI_toggle_class('attachment_data'); + }); + }); +</script> + <tr class="attachment_data"> <th><label for="data">File</label>:</th> <td> <em>Enter the path to the file on your computer</em> (or - <a id="attachment_data_controller" href="javascript:TUI_toggle_class('attachment_text_field'); - javascript:TUI_toggle_class('attachment_data')" - >paste text as attachment</a>).<br> + <a id="attachment_data_controller"> + paste text as attachment</a>).<br> <input type="file" id="data" name="data" size="50"> </td> </tr> @@ -58,7 +67,7 @@ <input type="checkbox" id="ispatch" name="ispatch" value="1"> <label for="ispatch">patch</label><br><br> [%# Reset this whenever the page loads so that the JS state is up to date %] - <script [% csp_nonce FILTER none %]> + <script [% script_nonce FILTER none %]> $(function() { $("#file").on("change", function() { DataFieldHandler(); diff --git a/template/en/default/attachment/diff-file.html.tmpl b/template/en/default/attachment/diff-file.html.tmpl index 70fbf554c..d510b5a5e 100644 --- a/template/en/default/attachment/diff-file.html.tmpl +++ b/template/en/default/attachment/diff-file.html.tmpl @@ -45,7 +45,7 @@ [% END %] [% END %] </td></tr></thead><tbody class="[% collapsed ? 'file_collapse' : 'file' %]"> -<script> +<script [% script_nonce FILTER none %]> incremental_restore() </script> diff --git a/template/en/default/attachment/edit.html.tmpl b/template/en/default/attachment/edit.html.tmpl index 43bf4c83c..d06d4ad56 100644 --- a/template/en/default/attachment/edit.html.tmpl +++ b/template/en/default/attachment/edit.html.tmpl @@ -219,7 +219,7 @@ <a href="attachment.cgi?id=[% attachment.id %]">View the attachment on a separate page</a>.</b> </iframe> [% END %] - <script> + <script [% script_nonce FILTER none %]> <!-- var patchviewerinstalled = 0; var attachment_id = [% attachment.id %]; @@ -328,7 +328,7 @@ [% END %] </div> [% IF can_edit %] - <script> + <script [% script_nonce FILTER none %]> <!-- YAHOO.util.Dom.removeClass( document.body, "no_javascript" ); toggle_attachment_details_visibility( ); diff --git a/template/en/default/attachment/list.html.tmpl b/template/en/default/attachment/list.html.tmpl index 50800dd8e..16e94586c 100644 --- a/template/en/default/attachment/list.html.tmpl +++ b/template/en/default/attachment/list.html.tmpl @@ -19,7 +19,7 @@ # Frédéric Buclin <LpSolit@gmail.com> #%] -<script> +<script [% script_nonce FILTER none %]> <!-- function toggle_display(link) { var table = document.getElementById("attachment_table"); |