<% title (t "admin_panel.configurations") + " - " + @config.website_name %>
<div class="row">
	<%= render 'admin_panel/sidebar_nav' %>
	<div class="span9">
		<div class="page-header">
		  <h1><i class="fa fa-cog"></i> <%= t "admin_panel.configurations" %> </h1>
		</div>
		<%= bootstrap_flash %>
		<div class="media thumbnail" style="padding: 10px; padding-bottom: 5px;">
			<%= bootstrap_form_for(@config, :url => config_update_path, :method => 'POST') do |f| %>
			  <%= f.alert_message "Please fix the errors below." %>

			  <div class="form-inputs">
			    <%= f.text_field :website_name, :label => (t 'admin_panel.website_name'), class:'input-xlarge' %>
			    <%= f.text_field :tagline, :label => (t 'admin_panel.tagline'), class: 'input-xxlarge' %>
			    <% help = ("<button type=\"button\" style=\"margin-top: -8px;\" class=\"btn help_btn btn-link\" data-trigger=\"focus\" data-toggle=\"popover\" data-placement=\"right\" title=\"#{t 'admin_panel.website_link'}\" data-content=\"#{(t 'help.website_link')}\"><i class=\"fa fa-question-circle\"></i></button>").html_safe %>
			    <%= f.text_field :website_link, :label => (t 'admin_panel.website_link'), class:'input-xlarge', append: help %>
			    <div class="popover-content"></div>
			    <% help_language = ("<button type=\"button\" style=\"margin-top: 24px;\" data-html=\"true\" class=\"btn help_btn btn-link\" data-trigger=\"focus\" data-toggle=\"popover\" data-placement=\"right\" title=\"#{t 'admin_panel.default_language'}\" data-content=\"<p>#{(t 'help.default_language')}</p><p><i>*#{(t 'admin_panel.language_hint')}</i></p>\"><i class=\"fa fa-question-circle\"></i></button>").html_safe %>
			    <div class="pull-left"><%= f.select :default_language, ["en", "pt-BR"],  :label => (t 'admin_panel.default_language') %></div>
				<div class="pull-left"><%= help_language %></div>,
				<div class="clearfix"></div>
			    
			    <% help = ("<button type=\"button\" style=\"margin-top: -8px;\" class=\"btn help_btn btn-link\" data-trigger=\"focus\" data-toggle=\"popover\" data-placement=\"right\" title=\"#{t 'admin_panel.contact_email'}\" data-content=\"#{(t 'help.contact_email')}\"><i class=\"fa fa-question-circle\"></i></button>").html_safe %>
			    <%= f.email_field :contact_email, :label => (t 'admin_panel.contact_email'), class:'input-xlarge', append: help %>
			    
			    <% help = ("<button type=\"button\" style=\"margin-top: -8px;\" class=\"btn help_btn btn-link\" data-trigger=\"focus\" data-toggle=\"popover\" data-placement=\"right\" title=\"#{t 'admin_panel.server_email'}\" data-content=\"#{(t 'help.server_email')} no-reply@website.com\"><i class=\"fa fa-question-circle\"></i></button>").html_safe %>
			    <%= f.email_field :server_email, :label => (t 'admin_panel.server_email'), class:'input-xlarge', append: help %>
			    <hr>
			    <% help_maintenance = ("<button type=\"button\" style=\"margin-top: 2px;\" class=\"btn help_btn btn-link\" data-trigger=\"focus\" data-toggle=\"popover\" data-placement=\"right\" title=\"#{t 'admin_panel.maintenance_mode'}\" data-content=\"#{(t 'help.maintenance_mode')}\"><i class=\"fa fa-question-circle\"></i></button>").html_safe %>
			    <%= f.form_group :maintenance_mode, class: 'bootstrap_switch_group' do %>
			    		<div class="pull-left"><%= f.check_box :maintenance_mode, :label => (t 'admin_panel.maintenance_mode'), class: 'bootstrap_switch',
					data: { on_text: (t 'admin_panel.on_switch'), off_text: (t 'admin_panel.off_switch') } %></div>
					<div class="pull-left"><%= help_maintenance %></div>
					<div class="clearfix"></div>
			    <% end %>
			    <%= f.text_field :maintenance_title, :label => (t 'admin_panel.maintenance_title'), class:'input-xlarge' %>
			    <%= f.text_area :maintenance_message, :label => (t 'admin_panel.maintenance_message'), class:'input-block-level'  %>

			  </div>

			  <div class="form-actions" style="margin-left: -10px; margin-right: -10px; margin-bottom: -30px;">
			    <%= f.submit (t 'admin_panel.update_config_btn'), class: 'btn btn-success' %>
			  </div>
			<% end %>
		</div>
		
	</div>
</div>