<commit_before><%- if @elements.blank? -%>
  <div class="info">
    <%= render_icon('info') %>
    <%= Alchemy.t(:no_more_elements_to_add) %>
  </div>
<%- else -%>
  <%= alchemy_form_for [:admin, @element] do |form| %>
    <%= form.hidden_field :page_id %>
  <%- if @page.can_have_cells? -%>
    <%= form.input :name,
      label: Alchemy.t(:element_of_type),
      collection: grouped_elements_for_select(@elements),
      as: :grouped_select,
      group_method: :second,
      prompt: Alchemy.t(:select_element),
      input_html: {class: 'alchemy_selectbox', autofocus: true} %>
  <%- else -%>
    <%= form.input :name,
      label: Alchemy.t(:element_of_type),<commit_msg>Fix inability to add nested elements on pages with cells.<commit_after><%- if @elements.blank? -%>
  <div class="info">
    <%= render_icon('info') %>
    <%= Alchemy.t(:no_more_elements_to_add) %>
  </div>
<%- else -%>
  <%= alchemy_form_for [:admin, @element] do |form| %>
    <%= form.hidden_field :page_id %>
  <%- if @page.can_have_cells? && @parent_element.blank? -%>
    <%= form.input :name,
      label: Alchemy.t(:element_of_type),
      collection: grouped_elements_for_select(@elements),
      as: :grouped_select,
      group_method: :second,
      prompt: Alchemy.t(:select_element),
      input_html: {class: 'alchemy_selectbox', autofocus: true} %>
  <%- else -%>
    <%= form.input :name,
      label: Alchemy.t(:element_of_type),
{'fraction_non_alphanumeric': 0.1853932584269663, 'fraction_numerical': 0.0, 'mean_word_length': 3.6266233766233764, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5449240', 'n_tokens_mistral': 563, 'n_tokens_neox': 515, 'n_words': 89}