@extends('dashboard::master')
{{--
    Autor: Giovanni López O.
    @gmlo_89
--}}
@section('head')
	
@stop

@section('content')
	<header>
		<h1 class="module-title"><span class="glyphicon glyphicon-wrench"></span>{{ $title }}</h1>
    </header>
    {{ Alert::render() }}
    <div class="row btn-bar">
    	<div class="btn-group pull-left">
			<a href="{{ url('admin') }}" class="btn btn-default">{{ trans('dashboard::label.go_back') }}</a>
		</div>
		<button tyle="button" data-click="submit" data-target="#frmPrincipal" class="btn btn-info pull-right">{{ trans('dashboard::label.save') }}</button>
    </div>
   
    {{ Form::open($formOptions) }}
    	<div class="panel panel-default">
			<div class="panel-heading"><span class="glyphicon glyphicon-wrench"></span> {{ trans('configurations::label.module_description') }}</div>
			<div class="panel-body">
				<!-- Nav tabs -->
			    <ul class="nav nav-tabs">
			    	<li class="active"><a href="#general" data-toggle="tab">{{ trans('configurations::label.general') }}</a></li>
			    	<li><a href="#offline_site" data-toggle="tab">{{ trans('configurations::label.offline_site') }}</a></li>
			    	<li><a href="#error_page" data-toggle="tab">{{ trans('configurations::label.error_page') }}</a></li>
			    </ul>

			    <!-- Tab panes -->
			    <div class="tab-content">
			    	<div class="tab-pane active" id="general">
			    		<div class="row">
			    			<div class="col-md-6">
			    				<div class="form-group">
									<label for="inputTitle" class="col-sm-2 control-label">{{ trans('configurations::label.site_title') }}</label>
									<div class="col-sm-10">
										{{ Form::text('title', null, 
											array(
												"class" 		=> "form-control required",
												"id" 			=> "inputTitle",
												"placeholder"  	=> trans('configurations::label.site_title')
										)) }}
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label" for="inputLanguage">{{ trans('configurations::label.default_language') }}</label>
									<div class="col-sm-10">
										{{ Form::select('default_language', $languages, null, 
											array(
												"class" => 	"form-control",
												"id" 	=>	"inputLanguage"
											)) 
										}}
									</div>
								</div>
			    			</div>
			    			<div class="col-md-6">
			    				<div class="form-group">
									<label for="inputMetaDescription" class="col-sm-2 control-label">{{ trans('configurations::label.meta_description') }}</label>
									<div class="col-sm-10">
										{{ Form::textarea('meta_description', null, 
											array(
												"class" 		=> "form-control ",
												"id" 			=> "inputMetaDescription",
												"rows"			=> 3
										)) }}
									</div>
								</div>
								<div class="form-group">
									<label for="inputMetaKeywords" class="col-sm-2 control-label">{{ trans('configurations::label.meta_keywords') }}</label>
									<div class="col-sm-10">
										{{ Form::textarea('meta_keywords', null, 
											array(
												"class" 		=> "form-control ",
												"id" 			=> "inputMetaKeywords",
												"rows"			=> 3
										)) }}
									</div>
								</div>
			    			</div>
			    		</div>
			    	</div>
			    	<div class="tab-pane" id="offline_site">
			    		<div class="row">
			    			<div class="form-group">
								<label class="col-md-3 control-label">{{ trans('configurations::label.disable_site') }}</label>
								<div class="col-md-9">
							    	{{ Form::checkbox(
							    		'disable_site', 
							    		1, 
							    		null, 
							    		array(
							    			'data-toggle' => 'checkbox',
							    			'data-on-text' => trans('dashboard::label.yes'),
							    			'data-off-text' => trans('dashboard::label.no'),
							    			'data-size' 	=> 'normal',
							    			'data-on-color' 	=> 'danger',
							    			'data-off-color' 	=> 'success'
							    			)); }}
							    </div>
							</div>
		    				<div class="form-group">
		    					<label for="inputOfflineSiteMessage" class="control-label">{{ trans('configurations::label.offline_site_message') }}</label>
		    					<div class="form-group">
			    					<div class="checkbox">
			    						<label>
			    							<input name="default_offline_site_message" type="checkbox"> {{ trans('configurations::label.use_default') }}
			    							<a target="_blank" href=""><span class="glyphicon glyphicon-new-window"></span> {{ trans('dashboard::label.see') }}</a>
			    						</label>
			    					</div>
				    			</div>
								{{ Form::textarea('offline_site_message', null, 
									array(
										"class" 		=> "form-control editor-html",
										"id" 			=> "inputOfflineSiteMessage"
								)) }}
							</div>
						</div>
			    	</div>
			    	<div class="tab-pane" id="error_page">
			    		<div class="row">
			    			<div class="form-group">
		    					<div class="checkbox">
		    						<label>
		    							<input name="default_error_page" type="checkbox"> {{ trans('configurations::label.use_default') }}
		    							<a target="_blank" href=""><span class="glyphicon glyphicon-new-window"></span> {{ trans('dashboard::label.see') }}</a>
		    						</label>
		    					</div>
			    			</div>
		    				<div class="form-group">
		    					<label for="inputErrorPage" class="control-label">{{ trans('configurations::label.error_page') }}</label>
								{{ Form::textarea('error_page', null, 
									array(
										"class" 		=> "form-control editor-html",
										"id" 			=> "inputErrorPage"
								)) }}
							</div>
						</div>
			    	</div>
			    </div>
			</div>
		</div>
	</form>
@stop

@section('scripts')
	<script>
		$('#frmPrincipal').validate();
		
		$(document).ready(function() {
		    
		});
	</script>

@stop