Sha256: 2a52a9f2379334686d9cc55c3c64e26974ae309f5139124521be23cdb615afc8
Contents?: true
Size: 1.12 KB
Versions: 57
Compression:
Stored size: 1.12 KB
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 %> <%= f.input :parent_id, as: :string, input_html: { class: 'alchemy_selectbox' } %> <% 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 : nil, input_html: {class: 'alchemy_selectbox'} %> <%= f.input :name %> <%= f.submit Alchemy.t(:create) %> <% end %> <script> $('input[type="text"]#page_parent_id').alchemyPageSelect({ placeholder: "<%= Alchemy.t(:search_page) %>", url: "<%= alchemy.api_pages_path %>", allowClear: false, <% if @page.parent %> initialSelection: { id: <%= @page.parent.id %>, text: "<%= @page.parent.name %>", url_path: "<%= @page.parent.url_path %>" } <% end %> }) </script>
Version data entries
57 entries across 57 versions & 1 rubygems