]> source.dussan.org Git - redmine.git/commitdiff
Fix display type in query form view (#29482).
authorGo MAEDA <maeda@farend.jp>
Tue, 22 Oct 2019 05:03:02 +0000 (05:03 +0000)
committerGo MAEDA <maeda@farend.jp>
Tue, 22 Oct 2019 05:03:02 +0000 (05:03 +0000)
Patch by Marius BALTEANU.

git-svn-id: http://svn.redmine.org/redmine/trunk@18790 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/helpers/queries_helper.rb
app/views/queries/_form.html.erb

index 88fe08b50f56e9bc6ca1c3d62471ec1d1c5f27bf..5565eb7b01c105b05e024b7685c5dcde3ee79f8c 100644 (file)
@@ -124,7 +124,7 @@ module QueriesHelper
     tags = ''.html_safe
     query.available_display_types.each do |t|
       tags << radio_button_tag('display_type', t, @query.display_type == t, :id => "display_type_#{t}") +
-        content_tag('label', l(:"label_display_type_#{t}"), :for => "display_type_#{t}")
+        content_tag('label', l(:"label_display_type_#{t}"), :for => "display_type_#{t}", :class => "inline")
     end
     tags
   end
index 12a1d0202b8246fe7def1000c71bc3b8dbf11fb6..953a296bc650d8338c2b89cf7723d60409322354 100644 (file)
@@ -107,13 +107,13 @@ $(document).ready(function(){
 });
 
 $(function ($) {
-  $('#display_type').change(function (e) {
-    var option = $(e.target).val()
+  $('input[name=display_type]').change(function () {
+    var option = $('input[name=display_type]:checked').val();
     if (option == 'board') {
       $('fieldset#columns, fieldset#sort, p#default_columns, p#group_by').hide();
     } else {
       $('fieldset#columns, fieldset#sort, p#default_columns, p#group_by').show();
     }
-  }).change()
+  }).change();
 });
 <% end %>