dependent packages: fix auto publish status option

This commit is contained in:
Alexander Machehin 2015-05-15 19:18:30 +05:00
parent e05631ee00
commit 1d7f02386c
3 changed files with 17 additions and 3 deletions

View File

@ -39,8 +39,8 @@ module BuildLists
group_id group_id
).each { |field| bl.send("#{field}=", build_list.send(field)) } ).each { |field| bl.send("#{field}=", build_list.send(field)) }
bl.auto_publish_status = options[:auto_publish_status]
%w( %w(
auto_publish_status
auto_create_container auto_create_container
include_testing_subrepository include_testing_subrepository
use_cached_chroot use_cached_chroot

View File

@ -10,7 +10,8 @@
url: dependent_projects_build_list_path(@build_list), url: dependent_projects_build_list_path(@build_list),
html: { method: :post }, html: { method: :post },
wrapper: :horizontal_form, wrapper: :horizontal_form,
wrapper_mappings: { boolean: :horizontal_boolean } do |f| wrapper_mappings: { boolean: :horizontal_boolean,
select: :horizontal_select } do |f|
.col-md-6 .col-md-6
.row .row
@ -49,7 +50,8 @@
.col-sm-offset-3.col-sm-9 .col-sm-offset-3.col-sm-9
h4 h4
= t('.preferences') = 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 :auto_create_container, as: :boolean
= f.input :include_testing_subrepository, as: :boolean = f.input :include_testing_subrepository, as: :boolean
= f.input :use_cached_chroot, as: :boolean = f.input :use_cached_chroot, as: :boolean

View File

@ -94,6 +94,18 @@ SimpleForm.setup do |config|
end end
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| config.wrappers :horizontal_radio_and_checkboxes, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
b.use :html5 b.use :html5
b.optional :readonly b.optional :readonly