Skip to content

Commit

Permalink
Merge pull request #2918 from tvdeyen/enable-element-select
Browse files Browse the repository at this point in the history
Enable element select if only one is available
  • Loading branch information
tvdeyen authored Jun 5, 2024
2 parents b6ac9fc + 306a57d commit 9f7a3fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/alchemy/admin/elements/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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 %>
Expand Down

0 comments on commit 9f7a3fa

Please sign in to comment.