Project

General

Profile

Feature #29482 » 0001-Fix-display-type-in-query-form-view.patch

Marius BĂLTEANU, 2019-10-21 23:04

View differences:

app/helpers/queries_helper.rb
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
app/views/queries/_form.html.erb
});
$(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 %>
(15-15/16)