From 306a57d1be751b2185605391f41c30c2bcd93a78 Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Wed, 5 Jun 2024 09:19:53 +0200 Subject: [PATCH] Enable element select if only one is available It seems that many users are confused if we disable the select. Since we already select the only possible element it is serving the same purpose - to save a click. --- app/views/alchemy/admin/elements/_form.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/alchemy/admin/elements/_form.html.erb b/app/views/alchemy/admin/elements/_form.html.erb index 5fc2e26d9c..5268717e5f 100644 --- a/app/views/alchemy/admin/elements/_form.html.erb +++ b/app/views/alchemy/admin/elements/_form.html.erb @@ -10,7 +10,7 @@ collection: elements_for_select(@elements), prompt: Alchemy.t(:select_element), selected: (@elements.first if @elements.count == 1), - input_html: {is: 'alchemy-select', autofocus: true, disabled: @elements.count == 1} %> + input_html: {is: 'alchemy-select', autofocus: true} %> <% if @elements.count == 1 %> <%= form.hidden_field :name, value: @elements.first[:name] %> <% end %>