Fix onSelect CSP error in FF

pull/6452/head
Oliver Günther 6 years ago
parent f13b72ecd8
commit a62ae8ac53
No known key found for this signature in database
GPG Key ID: A3A8BDAD7C0C552C
  1. 10
      app/views/repositories/diff.html.erb

@ -32,8 +32,14 @@ See docs/COPYRIGHT.rdoc for more details.
<%= form_tag({path: to_path_param(@path)}, method: :get) do %>
<%= hidden_field_tag('rev', params[:rev]) if params[:rev] %>
<%= hidden_field_tag('rev_to', params[:rev_to]) if params[:rev_to] %>
<%= styled_select_tag 'type', options_for_select([[l(:label_diff_inline), "inline"], [l(:label_diff_side_by_side), "sbs"]], @diff_type), onchange: "if (this.value != '') {this.form.submit()}" %>
<% end %>
<%= styled_select_tag 'type', options_for_select([[l(:label_diff_inline), "inline"], [l(:label_diff_side_by_side), "sbs"]], @diff_type), id: "repository-diff-type-select" %>
<%=
content_for(:additional_js_dom_ready) do
"jQuery('#repository-diff-type-select').change(function() {
if (this.value != '') { this.form.submit() }
});".html_safe
end
%>
</li>
<% end %>

Loading…
Cancel
Save