<% @site.slug = PluginRoutes.system_info["base_domain"] if current_site.main_site? groups = @site.get_field_groups() %>

<%= "#{t('admin.settings.configuration_site')}: #{@site.the_title} " %>

<%= form_for @site, url: {action: :site_saved}, html: {id: "site_settings_form", class: "panel-body"} do |f| %> <% posts = current_site.posts.public_posts.all %>
<%= render partial: 'layouts/admin/form_error', locals: {data: @site} %>
">
<%= f.label t('admin.table.slug') %>
<%= t('admin.sites.message.enter_key_domain') %>
<%= f.text_field :slug, :class => "form-control required" %>
<%= f.label t('admin.table.name') %>
<%= f.text_field :name, :class => "form-control translatable" %>
<%= f.label t('admin.table.description') %>
<%= f.text_area :description, :class => "form-control translatable" %>

<%= hidden_field :options, :logo, :class => "form-control unput_upload", :value => @site.the_logo %>

<%= hidden_field :options, :icon, :class => "form-control unput_upload", :value => @site.the_icon, "data-label" => "#{t('admin.button.upload_icon')}", "data-ext" => "ico" %>
tab-pane ">

<%= select_tag "options[home_page]", options_for_select([[t('admin.table.default'), ""]]+(posts.collect { |x| x = x.decorate; [x.the_title, x.id] }), @site.options[:home_page]), class: "form-control select" %>

<%= select_tag "options[error_404]", options_for_select([[t('admin.table.default'), ""]]+(posts.collect { |x| x = x.decorate; [x.the_title, x.id] }), @site.options[:error_404]), class: "form-control select" %>

<%= email_field :options, :email, :class => "form-control", :value => @site.options[:email] %>

<%= text_field :options, :front_per_page, :class => "form-control number", :value => @site.front_per_page %>

<%= text_field :options, :admin_per_page, :class => "form-control number", :value => @site.admin_per_page %>

<%= check_box :options, :comment_status, {checked: @site.front_comment_status == "approved"}, "approved", "pending" %>

<%= check_box :meta, :has_create_account, {checked: @site.get_option('has_create_account', false), class: "icheckbox0"}, "true", "" %>

<%= check_box :options, :security_captcha_user_register, {checked: @site.security_user_register_captcha_enabled?, class: "icheckbox0"}, "true", "" %>
<% if groups.present? %>
tab-pane "> <%= render partial: "admin/settings/custom_fields/render", locals: {record: @site, field_groups: groups} %>
<% end %> <% if File.exist?(current_theme.settings_file) %>
tab-pane"> <%= render file: current_theme.settings_file %>
<% end %>
tab-pane ">
<%= f.label t('admin.table.description') %>
<%= text_area :options, :seo_description, :class => "form-control translatable", :value => @site.get_option("seo_description") %>

<%= text_area :options, :keywords, :class => "form-control translatable", :value => @site.get_option("keywords") %>

<%= text_field :options, :seo_author, :class => "form-control", :value => @site.get_option("seo_author") %>

<%= text_field :options, :twitter_card, :class => "form-control", :value => @site.get_option("twitter_card") %>

<%= hidden_field :options, :screenshot, :class => "form-control unput_upload", :value => @site.get_option("screenshot") %>
tab-pane ">
Gmail Need Permissions: Check here.
<%= label_tag t('admin.settings.email_enabled') %>
<%= check_box :options, :mailer_enabled, {checked: @site.get_option("mailer_enabled") == 1}, 1, 0 %>
<%= label_tag t('admin.settings.email_server') %> (*)
<%= text_field :options, :email_server, :class => "form-control required", value: @site.get_option("email_server") %>
<%= label_tag t('admin.settings.email_port') %> (*)
<%= text_field :options, :email_port, :class => "form-control required", value: @site.get_option("email_port") %>
<%= label_tag t('admin.settings.email_username') %> (*)
<%= text_field :options, :email_username, :class => "form-control required", value: @site.get_option("email_username") %>
<%= label_tag t('admin.settings.email_pass') %> (*)
<%= text_field :options, :email_pass, :class => "form-control required", value: @site.get_option("email_pass") %>
<%= label_tag t('admin.settings.email_from') %> (*)
<%= text_field :options, :email_from, :class => "form-control required", value: @site.get_option("email_from") %>
<%= label_tag t('admin.settings.email_cc') %>
<%= text_field :options, :email_cc, :class => "form-control", value: @site.get_option("email_cc") %>
<% end %>