mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
add check_box explicitly to tabular_form_builder supported fields
This commit is contained in:
@@ -73,7 +73,7 @@ class TabularFormBuilder < ActionView::Helpers::FormBuilder
|
||||
end
|
||||
private_class_method :with_text_formatting
|
||||
|
||||
(field_helpers - %i(radio_button hidden_field fields_for label text_area) + %i(date_select)).each do |selector|
|
||||
(field_helpers - %i(radio_button hidden_field fields_for label text_area) + %i(date_select check_box)).each do |selector|
|
||||
define_method selector, &tag_with_label_method(selector)
|
||||
end
|
||||
|
||||
|
||||
@@ -326,8 +326,8 @@ JJ Abrams</textarea>
|
||||
let(:options) { {} }
|
||||
|
||||
subject(:output) do
|
||||
builder.collection_check_box :enabled_module_names,
|
||||
:repositories,
|
||||
builder.collection_check_box :auth_source,
|
||||
:active,
|
||||
true,
|
||||
"name",
|
||||
options
|
||||
@@ -341,10 +341,10 @@ JJ Abrams</textarea>
|
||||
expect(output).to be_html_eql(%{
|
||||
<input checked="checked"
|
||||
class="form--check-box"
|
||||
id="user_enabled_module_names_repositories"
|
||||
name="user[enabled_module_names][]"
|
||||
id="user_auth_source_active"
|
||||
name="user[auth_source][]"
|
||||
type="checkbox"
|
||||
value="repositories" />
|
||||
value="active" />
|
||||
}).at_path("input:nth-of-type(2)")
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user