Sha256: 6cf4d4fff66a7c8a6bdd2644ea0b8013142c36520fc53991709759fea04e4848

Contents?: true

Size: 808 Bytes

Versions: 46

Compression:

Stored size: 808 Bytes

Contents

<%- if @elements.blank? -%>
  <%= render_message do %>
    <%= Alchemy.t(:no_more_elements_to_add) %>
  <% end %>
<%- else -%>
  <%= alchemy_form_for [:admin, @element] do |form| %>
    <%= form.hidden_field :page_version_id %>
    <%= form.input :name,
      label: Alchemy.t(:element_of_type),
      collection: elements_for_select(@elements),
      prompt: Alchemy.t(:select_element),
      selected: (@elements.first if @elements.count == 1),
      input_html: {class: 'alchemy_selectbox', autofocus: true, disabled: @elements.count == 1} %>
    <% if @elements.count == 1 %>
      <%= form.hidden_field :name, value: @elements.first[:name] %>
    <% end %>
    <%= form.hidden_field :parent_element_id, value: @parent_element.try(:id) %>
    <%= form.submit Alchemy.t(:add) %>
  <%- end -%>
<%- end -%>

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
alchemy_cms-7.0.16 app/views/alchemy/admin/elements/_form.html.erb
alchemy_cms-7.0.15 app/views/alchemy/admin/elements/_form.html.erb
alchemy_cms-6.1.10 app/views/alchemy/admin/elements/_form.html.erb
alchemy_cms-7.0.14 app/views/alchemy/admin/elements/_form.html.erb
alchemy_cms-7.0.13 app/views/alchemy/admin/elements/_form.html.erb
alchemy_cms-7.0.12 app/views/alchemy/admin/elements/_form.html.erb
alchemy_cms-7.0.11 app/views/alchemy/admin/elements/_form.html.erb
alchemy_cms-7.0.10 app/views/alchemy/admin/elements/_form.html.erb
alchemy_cms-7.0.9 app/views/alchemy/admin/elements/_form.html.erb
alchemy_cms-7.0.8 app/views/alchemy/admin/elements/_form.html.erb
alchemy_cms-7.0.7 app/views/alchemy/admin/elements/_form.html.erb
alchemy_cms-7.0.6 app/views/alchemy/admin/elements/_form.html.erb
alchemy_cms-7.0.5 app/views/alchemy/admin/elements/_form.html.erb
alchemy_cms-7.0.4 app/views/alchemy/admin/elements/_form.html.erb
alchemy_cms-7.0.3 app/views/alchemy/admin/elements/_form.html.erb
alchemy_cms-6.1.9 app/views/alchemy/admin/elements/_form.html.erb
alchemy_cms-7.0.2 app/views/alchemy/admin/elements/_form.html.erb
alchemy_cms-6.1.8 app/views/alchemy/admin/elements/_form.html.erb
alchemy_cms-6.1.7 app/views/alchemy/admin/elements/_form.html.erb
alchemy_cms-7.0.1 app/views/alchemy/admin/elements/_form.html.erb