dependent packages: fix auto publish status option
This commit is contained in:
parent
e05631ee00
commit
1d7f02386c
|
@ -39,8 +39,8 @@ module BuildLists
|
|||
group_id
|
||||
).each { |field| bl.send("#{field}=", build_list.send(field)) }
|
||||
|
||||
bl.auto_publish_status = options[:auto_publish_status]
|
||||
%w(
|
||||
auto_publish_status
|
||||
auto_create_container
|
||||
include_testing_subrepository
|
||||
use_cached_chroot
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
url: dependent_projects_build_list_path(@build_list),
|
||||
html: { method: :post },
|
||||
wrapper: :horizontal_form,
|
||||
wrapper_mappings: { boolean: :horizontal_boolean } do |f|
|
||||
wrapper_mappings: { boolean: :horizontal_boolean,
|
||||
select: :horizontal_select } do |f|
|
||||
|
||||
.col-md-6
|
||||
.row
|
||||
|
@ -49,7 +50,8 @@
|
|||
.col-sm-offset-3.col-sm-9
|
||||
h4
|
||||
= t('.preferences')
|
||||
= f.input :auto_publish_status, as: :boolean
|
||||
= f.input :auto_publish_status, as: :select, collection: auto_publish_statuses,
|
||||
include_blank: false
|
||||
= f.input :auto_create_container, as: :boolean
|
||||
= f.input :include_testing_subrepository, as: :boolean
|
||||
= f.input :use_cached_chroot, as: :boolean
|
||||
|
|
|
@ -94,6 +94,18 @@ SimpleForm.setup do |config|
|
|||
end
|
||||
end
|
||||
|
||||
config.wrappers :horizontal_select, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
|
||||
b.use :html5
|
||||
b.optional :readonly
|
||||
|
||||
b.wrapper tag: 'div', class: 'col-sm-offset-3 col-sm-9' do |wr|
|
||||
wr.use :label_input, class: 'col-sm-9'
|
||||
|
||||
wr.use :error, wrap_with: { tag: 'span', class: 'help-block' }
|
||||
wr.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
|
||||
end
|
||||
end
|
||||
|
||||
config.wrappers :horizontal_radio_and_checkboxes, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
|
||||
b.use :html5
|
||||
b.optional :readonly
|
||||
|
|
Loading…
Reference in New Issue