]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1334160 - CSP error on button "rep_hw_os"
authorDavid Lawrence <dkl@mozilla.com>
Fri, 27 Jan 2017 04:44:17 +0000 (04:44 +0000)
committerDavid Lawrence <dkl@mozilla.com>
Fri, 27 Jan 2017 04:44:26 +0000 (04:44 +0000)
extensions/BMO/template/en/default/hook/bug/edit-after_op_sys.html.tmpl

index b5c3a722b7a6595c9cf07515b6b4e41bce9db2e9..ff7740f932cc12a802c746674d3a2b21a96f2de8 100644 (file)
   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;
 
 [% 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>