<% if current_user.user_name == "rulingcom" || current_user.beta_tester %>
<% end %>
<%= f.fields_for :page_sets do |page_set| %>
<%= page_set.check_box :auto_convert_flag %> <%= t('preferences.auto_convert_flag') %>
<% end %>
<%= f.fields_for :site_settings, @site['site_settings'] do |f| %>
<%= f.text_field :service_email, :value => (@site['site_settings']['service_email'] rescue nil), :class=>"input-large", :placeholder=>"Administrator Mail" %>
<%= f.text_field :reply_email, :value => (@site['site_settings']['reply_email'] rescue nil), :class=>"input-large", :placeholder=>"Reply Mail" %>
<%= f.text_field :address, :value => (@site['site_settings']['address'] rescue nil), :class=>"input-large", :placeholder=>"Email Address" %>
<%= f.text_field :domain, :value => (@site['site_settings']['domain'] rescue nil), :class=>"input-large", :placeholder=>"Domain" %>
<%= f.text_field :authentication, :value => (@site['site_settings']['authentication'] rescue nil), :class=>"input-large", :placeholder =>"Authentication" %>
<%= f.text_field :user_name, :value => (@site['site_settings']['user_name'] rescue nil), :class=>"input-large", :placeholder=>"User Name" %>
<%= f.password_field :password, :value => (@site['site_settings']['password'] rescue nil), :class=>"input-large", :placeholder=>"Password" %>
<%= f.text_field :port, :value => (@site['site_settings']['port'] rescue nil),:placeholder=>"Port", :class=>"input-mini" %>
<%= f.check_box :tls, :checked => (@site['site_settings']['tls'].eql?('1') rescue false),:class=>"toggle-check", :data=> { disabled: true } %>
<%= f.check_box 'enable_starttls_auto', :checked => (@site['site_settings']['enable_starttls_auto'].eql?('1') rescue false), :class=>"toggle-check", :data=> { disabled: true } %>
<% end %>
<%= f.check_box :frontend_open , :class=>"toggle-check", :data=> { disabled: true } %>
<%= f.check_box :backend_openness_on , :class=>"toggle-check", :data=> { disabled: true } %>
<%= f.check_box :desktop_closed , :class=>"toggle-check", :data=> { disabled: true } %>
<%= f.check_box :enable_language_detection, :class => "toggle-check reset_default_locale", data: {disabled: true} %>
<%= f.check_box :enable_zh_cn, :class => "toggle-check", data: {disabled: true} %>
<% I18n.available_locales.each do |valid_locale| %>
<%= check_box_tag "site[in_use_locales][#{valid_locale}]", valid_locale, @site.in_use_locales.include?(valid_locale), :class=>"toggle-check in_use_locales", :data => { :title => "#{t(valid_locale.to_s)}", disabled: true }, "data-deploy"=>"inline" %>
<% end %>
<% I18n.available_locales.each do |locale| %>
<%= radio_button_tag "site[default_locale]", locale, @locale == locale ,:class=>"toggle-check", :data => { :title => "#{t(locale.to_s)}" }, "data-deploy"=>"inline", :checked => (@site.default_locale.eql?("#{locale}")) %>
<% end %>
<%= f.check_box :enable_redirect_index, :class => "toggle-check reset_default_locale", data: {disabled: true} %>
<%= f.check_box :enable_language_options, :class => "toggle-check", data: {disabled: true} %>
<% if @site.default_image.file.present? %>
<%= image_tag( @site.default_image, :size=>"120x120") rescue ''%>
<% else %>
<%= image_tag "orbit-logo.png",:class => "pull-left upload-picture"%>
<% end %>
<% if @site.default_image.file.present?%>
<%= f.file_field :default_image, :id => "input-upload", :class => 'fileupload-new', :onchange => "document.getElementById('fu').innerHTML = this.form.fu.value = this.value;" %><%= t('preferences.change') %>
<%= f.check_box :remove_default_image %>
<%= t(:remove) %> OrbitBar Logo
<%else%>
<%= f.file_field :default_image, :id => "input-upload", :class => 'fileupload-new', :onchange => "document.getElementById('fu').innerHTML = this.form.fu.value = this.value;" %><%= t('preferences.select_image') %>
<%end%>
<%= t(:cancel) %>
<% if @site.favicon.file.present? %>
<%= image_tag( @site.favicon, :size=>"120x120") rescue ''%>
<% else %>
<%= image_tag "favicon.ico", :class => "pull-left upload-picture"%>
<% end %>
<% if @site.favicon.file.present?%>
<%= f.file_field :favicon, :id => "input-upload", :class => 'fileupload-new', :onchange => "document.getElementById('fu').innerHTML = this.form.fu.value = this.value;" %><%= t('preferences.change') %>
<%= f.check_box :remove_favicon %>
<%= t(:remove) %> <%= t('preferences.favicon') %>
<%else%>
<%= f.file_field :favicon, :id => "input-upload", :class => 'fileupload-new', :onchange => "document.getElementById('fu').innerHTML = this.form.fu.value = this.value;" %><%= t('preferences.select_image') %>
<%end%>
<%= t(:cancel) %>
<%= f.text_field :orbit_bar_background_color, :class=>'set_color',:type=>'color',:value=>@site.orbit_bar_background_color%>
<%= f.text_field :orbit_bar_text_color, :class=>'set_color',:type=>'color',:value=>@site.orbit_bar_text_color%>
<%= f.text_field :orbit_bar_submenu_background_color, :class=>'set_color',:type=>'color',:value=>@site.orbit_bar_submenu_background_color%>
<%= f.text_field :orbit_bar_submenu_text_color, :class=>'set_color',:type=>'color',:value=>@site.orbit_bar_submenu_text_color%>
<%if @site.is_hidden_orbit_bar%>
<%= f.check_box :is_hidden_orbit_bar ,:checked=>'checked'%>
<%else%>
<%= f.check_box :is_hidden_orbit_bar ,:checked=>false%>
<%end%>
<%= f.text_field :orbit_bar_animation_time ,:value=>@site.orbit_bar_animation_time %>
<% if @site.site_logo.file.present? %>
<%= image_tag( @site.site_logo, :size=>"120x120") rescue ''%>
<% else %>
<%= image_tag "site-logo.png", :class => "pull-left upload-picture"%>
<% end %>
<% if @site.site_logo.file.present?%>
<%= f.file_field :site_logo, :id => "input-upload", :class => 'fileupload-new', :onchange => "document.getElementById('fu').innerHTML = this.form.fu.value = this.value;" %><%= t('preferences.change') %>
<%= f.check_box :remove_site_logo %>
<%= t(:remove) %> <%= t('preferences.site_logo') %>
<%else%>
<%= f.file_field :site_logo, :id => "input-upload", :class => 'fileupload-new', :onchange => "document.getElementById('fu').innerHTML = this.form.fu.value = this.value;" %><%= t('preferences.select_image') %>
<%end%>
<%= t(:cancel) %>
<% if @site.site_logo_1.file.present? %>
<%= image_tag( @site.site_logo_1, :size=>"120x120") rescue ''%>
<% else %>
<%= image_tag "site-logo.png", :class => "pull-left upload-picture"%>
<% end %>
<% if @site.site_logo_1.file.present?%>
<%= f.file_field :site_logo_1, :id => "input-upload", :class => 'fileupload-new', :onchange => "document.getElementById('fu').innerHTML = this.form.fu.value = this.value;" %><%= t('preferences.change') %>
<%= f.check_box :remove_site_logo_1 %>
<%= t(:remove) %> <%= t('preferences.site_logo_1') %>
<%else%>
<%= f.file_field :site_logo_1, :id => "input-upload", :class => 'fileupload-new', :onchange => "document.getElementById('fu').innerHTML = this.form.fu.value = this.value;" %><%= t('preferences.select_image') %>
<%end%>
<%= t(:cancel) %>
<%= f.text_field :home_link %>
<%= f.text_field :home_link_1 %>
<% @site_in_use_locales.each do |locale| %>
<%= f.fields_for :site_title do |f| %>
<%= f.text_field locale, :value => (@site.site_title[locale.to_s] rescue nil), :placeholder=>"site_title" %>
<% end %>
<%= f.fields_for :site_title_1 do |f| %>
<%= f.text_field locale, :value => (@site.site_title_1[locale.to_s] rescue nil), :placeholder=>"site_title_1" %>
<% end %>
<% end %>
<% @site_in_use_locales.each do |locale| %>
<%= f.fields_for :mobile_orbit_bar_title_translations do |f| %>
<%= f.text_field locale, :value => (@site.mobile_orbit_bar_title_translations[locale.to_s] rescue nil), :placeholder=>"Orbit bar title" %>
<% end %>
<% end %>
<%= f.check_box :google_oauth_enabled %>
<%= f.text_field :google_client_id, :value => (@site['google_client_id'] rescue nil), :class=>"input-large google-oauth-fields", :placeholder=>"Google client id", :disabled => !@site[:google_oauth_enabled] %>
<%= f.text_field :google_client_secret, :value => (@site['google_client_secret'] rescue nil), :class=>"input-large google-oauth-fields", :placeholder=>"Google client secret", :disabled => !@site[:google_oauth_enabled] %>
Please restart the website after modifying these settings. Click on the restart button and refresh the page in sometime.
Restart server
<%= f.submit t("submit"), :class => "btn btn-primary" %>
<%= f.submit t("cancel"), :class => "btn ", :type => 'reset' %>