%= f.error_messages %>
<%= f.hidden_field :parent, :value => (@item.parent.id rescue nil) %>
<%= f.hidden_field :id, :value => (@item.id),:id=>"object_id" %>
<%= f.label :name, '*'+t(:name), :class => 'control-label' %>
<%= f.text_field :name, :class => 'text input-xlarge' %>
<%= I18n.t("front_page.name_field_helper") %>
<%= f.fields_for :title_translations do |f| %>
<% @site_valid_locales.each do |locale| %>
<%= f.label :locale, "#{t(:title)} #{I18nVariable.from_locale(locale)}", :class => 'control-label' %>
<%= f.text_field locale, :class => 'text input-xlarge', :value => (@item.title_translations[locale] rescue nil) %>
<% end %>
<% end %>
<%= f.label :name, t(:template_name), :class => 'control-label' %>
<%= f.collection_select :design, @designs, :id, :title, {:selected => (@selected[:design].id rescue nil) }, {:rel => reload_themes_admin_pages_path} %>
<%= f.label :name, t(:theme), :class => 'control-label' %>
<%= f.select :theme_id, @themes.collect { |t| [t.name.capitalize, t.id] }, {:include_blank => true, :selected=>(@selected[:theme].id rescue nil) } %>
<%= f.label '',t("default_widget.select_module_app"), :class => 'control-label' %>
<%= f.select :module_app_id, options_from_collection_for_select(@module_apps, :id, :module_name, :selected =>(@selected[:module_app].id rescue nil)), {:include_blank => true }, {:rel => reload_after_module_changed_admin_pages_path,:id=>"page_module_app_id"} %>
<%= f.label '', t("front_page.select_app_url"), :class => 'control-label' %>
<%= select('page','app_frontend_url', @app_frontend_urls || [], {:selected => @selected[:app_frontend_url],:rel => reload_after_list_changed_admin_pages_path}) rescue ''%>
<%= render :partial=>"admin/page_parts/widget_data_source_category",:locals=>{:object=>@item} %>
<%= render :partial=>"admin/page_parts/widget_data_source_tag" ,:locals=>{:object=>@item}%>
<%= render :partial => 'frontend_setting', :locals=>{:object=>@item,:f=>f} %>
<%= render :partial=>'data_count_field',:locals=>{:field_name=>"page[frontend_data_count]",:field_value=>@selected[:page_frontend_data_count]} %>
<%= f.label :is_published, "#{t('front_page.is_published')} ?", :class => 'control-label' %>
<%= f.label :menu_enabled_for, "#{t('front_page.menu_enable_lang')}:", :class => 'control-label' %>
<% @site_valid_locales.each do |valid_locale| %>
<% end %>
<%= hidden_field_tag 'page[menu_enabled_for][]', '' %>
<%= f.label :enabled_for, "#{t('front_page.link_enable_lang')}:", :class => 'control-label' %>
<% @site_valid_locales.each do |valid_locale| %>
<% end %>
<%= hidden_field_tag 'page[enabled_for][]', '' %>
<%=javascript_include_tag "inc/update_cates_and_tags.js" %>
<%= javascript_include_tag "inc/page_widget_edit_interface.js" %>