<% if params[:action] == "new" %>
<%= f.label :name, content_tag(:i, nil, :class => "icons-star") + t(:name) %>
<%= f.text_field :page_id, class:"input-xlarge change", data: {"fv-validation" => "required;nospace;pageid_validation;", "fv-messages" => "Cannot be empty.;Cannot have blank spaces.;Page id is already taken.;"} %>
<%= t("front_page.name_field_helper") %>
<% end %>
<% @site_in_use_locales.each do |locale| %>
<%= f.label :locale, "#{t(:title)} #{t(locale)}" %>
<%= f.fields_for :name_translations do |n| %>
<%= n.text_field locale, class:"input-xlarge change", data: {"fv-validation" => "required;", "fv-messages" => "Cannot be empty.;"}, :value=>@page.name_translations[locale] rescue nil %>
<% end %>
<% end %>
<%= f.select(:module, @modules.map{|m| [t('module_name.'+m.key),m.key]},{:include_blank => true},:class=>"module_select input-xlarge change", data: {"fv-validation" => "required;", "fv-messages" => "Cannot be empty.;"}) %>
<%= f.hidden_field :parent_page, value: (params[:parent_page] || @page.parent_page_id) %>
<%= f.hidden_field :page_type, value: "page" %>
<% if params[:action] == "edit" %>
<% end %>
<% if params[:action] == "edit" && !@layout_types.blank? %>
<% if @layout_types.first.kind_of?(Hash) %>
<% else %>
<%= f.select(:layout, @layout_types) %>
<% end %>
<% end %>
<% if params[:action] == "edit" %>
<% if !@module_app.data_count.nil? %>
<% end %>
<% end %>