summaryrefslogtreecommitdiffstats
path: root/extensions/BMO/template/en
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2017-01-27 05:44:17 +0100
committerDavid Lawrence <dkl@mozilla.com>2017-01-27 05:44:26 +0100
commit6cadcc129e33b09346f4b698d548fa8668af228d (patch)
tree8fa6ee3217b53263fc3b9b6a0983f2e113a41c17 /extensions/BMO/template/en
parent1d7bfbbc516fea853ba5f3bf35fd60a8f26304bc (diff)
downloadbugzilla-6cadcc129e33b09346f4b698d548fa8668af228d.tar.gz
bugzilla-6cadcc129e33b09346f4b698d548fa8668af228d.tar.xz
Bug 1334160 - CSP error on button "rep_hw_os"
Diffstat (limited to 'extensions/BMO/template/en')
-rw-r--r--extensions/BMO/template/en/default/hook/bug/edit-after_op_sys.html.tmpl17
1 files changed, 10 insertions, 7 deletions
diff --git a/extensions/BMO/template/en/default/hook/bug/edit-after_op_sys.html.tmpl b/extensions/BMO/template/en/default/hook/bug/edit-after_op_sys.html.tmpl
index b5c3a722b..ff7740f93 100644
--- a/extensions/BMO/template/en/default/hook/bug/edit-after_op_sys.html.tmpl
+++ b/extensions/BMO/template/en/default/hook/bug/edit-after_op_sys.html.tmpl
@@ -19,11 +19,6 @@
title = "Set platform to reporter's: " _ hw_os.0 _ " / " _ hw_os.1;
%]
-[% onclick = BLOCK %]
- $('#rep_platform').val('[% hw_os.0 FILTER js FILTER html %]');
- $('#op_sys').val('[% hw_os.1 FILTER js FILTER html %]');
- $('#rep_hw_os').hide();
-[% END %]
[%
IF bug_modal;
INCLUDE modal;
@@ -34,12 +29,20 @@
[% BLOCK classic %]
<span id="rep_hw_os">
- (<a href="javascript:void(0)" title="[% title FILTER html %]" onclick="[% onclick FILTER none %]">from reporter</a>)
+ (<a href="javascript:void(0)" title="[% title FILTER html %]" id="rep_hw_os">from reporter</a>)
</span>
[% END %]
[% BLOCK modal %]
- <button id="rep_hw_os" type="button" class="minor" title="[% title FILTER html %]" onclick="[% onclick FILTER none %]">
+ <button id="rep_hw_os" type="button" class="minor" title="[% title FILTER html %]">
From&nbsp;Reporter
</button>
[% END %]
+
+<script [% script_nonce FILTER none %] type="text/javascript">
+ $('#rep_hw_os').click(function() {
+ $('#rep_platform').val('[% hw_os.0 FILTER js FILTER html %]');
+ $('#op_sys').val('[% hw_os.1 FILTER js FILTER html %]');
+ $('#rep_hw_os').hide();
+ });
+</script>