Skip to content

Commit 70011e4

Browse files
committed
now with custom bootstrap selects
1 parent 4cfc21a commit 70011e4

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

app/views/comfy/admin/cms/layouts/_form.html.haml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
= form.text_field :identifier, data: {slug: true}
55

66
- if (options = Comfy::Cms::Layout.options_for_select(@site, @layout)).present?
7-
= form.select :parent_id, [["---- #{t('.select_parent_layout')} ----", nil]] + options
7+
= form.select :parent_id, [["---- #{t('.select_parent_layout')} ----", nil]] + options, bootstrap: {custom_control: true}
88

99
- if (options = Comfy::Cms::Layout.app_layouts_for_select(lookup_context.view_paths)).present?
10-
= form.select :app_layout, [["---- #{t('.select_app_layout')} ----", nil]] + options
10+
= form.select :app_layout, [["---- #{t('.select_app_layout')} ----", nil]] + options, bootstrap: {custom_control: true}
1111

1212
= form.text_area :content, data: {'cms-cm-mode' => 'text/html'}
1313
= form.text_area :css, data: {'cms-cm-mode' => 'css'}

app/views/comfy/admin/cms/pages/_form.html.haml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
= form.text_field :slug, data: { slug: true }, prepend: @page.parent.full_path
77

88
- if (options = ::Comfy::Cms::Page.options_for_select(site: @site, page: @page, exclude_self: true)).present?
9-
= form.select :parent_id, options
9+
= form.select :parent_id, options, bootstrap: {custom_control: true}
1010

1111
- if (options = ::Comfy::Cms::Layout.options_for_select(@site)).present?
12-
= form.select :layout_id, options, {}, {data: {url: form_fragments_comfy_admin_cms_site_page_path(@site, @page.id.to_i)}, id: "fragments-toggle"}
12+
= form.select :layout_id, options, {bootstrap: {custom_control: true}}, {data: {url: form_fragments_comfy_admin_cms_site_page_path(@site, @page.id.to_i)}, id: "fragments-toggle"}
1313

1414
= comfy_admin_partial "comfy/admin/cms/partials/page_form_inner", form: form
1515

@@ -19,7 +19,7 @@
1919
= render "comfy/admin/cms/categories/form", form: form
2020

2121
- if (options = ::Comfy::Cms::Page.options_for_select(site: @site, page: @page)).present?
22-
= form.select :target_page_id, [["---- #{t('.select_target_page')} ----", nil]] + options
22+
= form.select :target_page_id, [["---- #{t('.select_target_page')} ----", nil]] + options, bootstrap: {custom_control: true}
2323

2424
= form.check_box :is_published
2525

app/views/comfy/admin/cms/sites/_form.html.haml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
= form.text_field :identifier, data: {slug: true}
55
= form.text_field :hostname
66
= form.text_field :path
7-
= form.select :locale, ComfortableMexicanSofa.config.locales.to_a.collect{|l| ["#{l[1]} (#{l[0]})", l[0]]}
7+
8+
- locales = ComfortableMexicanSofa.config.locales.to_a.collect{|l| ["#{l[1]} (#{l[0]})", l[0]]}
9+
= form.select :locale, locales, bootstrap: {custom_control: true}
810

911
= comfy_admin_partial "comfy/admin/cms/partials/site_form_after", form: form
1012

0 commit comments

Comments
 (0)