From e99bb968b752a8af43efad7a799724b0575e8e6d Mon Sep 17 00:00:00 2001 From: Neil Cameron Date: Tue, 12 Jan 2016 11:28:19 +0000 Subject: [PATCH 1/3] Fixed issue with select lists rendering as text areas --- app/views/admin/configurables/show.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/admin/configurables/show.html.erb b/app/views/admin/configurables/show.html.erb index aa55959..79f6774 100644 --- a/app/views/admin/configurables/show.html.erb +++ b/app/views/admin/configurables/show.html.erb @@ -18,7 +18,7 @@ <%- elsif options[:type] == 'text' -%> <%= text_area_tag key, Configurable.send(key) %> <%- elsif options[:type] == 'list' -%> - <%= text_area_tag key, Configurable.serialized_value(key) -%> + <%= select_tag key, options_for_select(Configurable.send(key)) -%> <%- else -%> <%= text_field_tag key, Configurable.send(key) %> <%- end -%> From a22fc018a464bc660682592ae4e0dd873513c6b8 Mon Sep 17 00:00:00 2001 From: Neil Cameron Date: Tue, 12 Jan 2016 11:50:39 +0000 Subject: [PATCH 2/3] fixed problem with not sending saved setting --- app/views/admin/configurables/show.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/admin/configurables/show.html.erb b/app/views/admin/configurables/show.html.erb index 79f6774..6b96b79 100644 --- a/app/views/admin/configurables/show.html.erb +++ b/app/views/admin/configurables/show.html.erb @@ -18,7 +18,7 @@ <%- elsif options[:type] == 'text' -%> <%= text_area_tag key, Configurable.send(key) %> <%- elsif options[:type] == 'list' -%> - <%= select_tag key, options_for_select(Configurable.send(key)) -%> + <%= select_tag key, options_for_select(options[:default], Configurable.send(key)) -%> <%- else -%> <%= text_field_tag key, Configurable.send(key) %> <%- end -%> From 506817a03e9fa31b5bc604b26a592fdf837a5d74 Mon Sep 17 00:00:00 2001 From: Neil Cameron Date: Tue, 12 Jan 2016 12:20:16 +0000 Subject: [PATCH 3/3] add bootstrap style to select list in docs --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 856eed6..d19bdd5 100644 --- a/README.md +++ b/README.md @@ -128,7 +128,7 @@ To style the web interface you are advised to use Sass. Here's an example scss f @extend .col-md-12; @extend .form-group; - textarea, input[type=text], input[type=password] { + textarea, select, input[type=text], input[type=password] { @extend .form-control; } }