Sha256: cc41f2a978dbbb9e07ba0376b109688388ddbcafd7a428bb6195ea62f3ce5953

Contents?: true

Size: 800 Bytes

Versions: 3

Compression:

Stored size: 800 Bytes

Contents

<%= alchemy_form_for([:admin, @page]) do |f| %>
  <% if @page.parent_id || @page.layoutpage %>
    <%= f.hidden_field(:parent_id) %>
  <% else %>
    <% @page.parent = @current_language.root_page %>
    <%= render Alchemy::Admin::PageSelect.new(@page.parent) do %>
      <%= f.input :parent_id, as: :string %>
    <% end %>
  <% end %>
  <%= f.hidden_field(:language_id) %>
  <%= f.hidden_field(:layoutpage) %>
  <%= f.input :page_layout,
    collection: @page_layouts,
    label: Alchemy.t(:page_type),
    include_blank: @page_layouts.length == 1 ? nil : Alchemy.t('Please choose'),
    required: true,
    selected: @page_layouts.length == 1 ? @page_layouts.first : @page.page_layout,
    input_html: {is: 'alchemy-select'} %>
  <%= f.input :name %>
  <%= f.submit Alchemy.t(:create) %>
<% end %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
alchemy_cms-7.3.4 app/views/alchemy/admin/pages/_new_page_form.html.erb
alchemy_cms-7.3.3 app/views/alchemy/admin/pages/_new_page_form.html.erb
alchemy_cms-7.3.2 app/views/alchemy/admin/pages/_new_page_form.html.erb