@extends('webprofile.backend.layouts.master')

@section('title')
{{ $title }}
@stop

@section('assets')
<link rel="stylesheet" href="{!! asset('backend/assets/select2/select2.min.css') !!}">
<style media="screen">
  .tkh{
    color: black;
  }
</style>
@stop

@section('breadcrumbs')
<li><a href="{{ url('dashboard') }}">@lang('label.dashboard')</a></li>
<li class="active">@lang('label.edit') @lang('feature.' . $data->name_design)</li>
@stop

@section('content')
<!-- page start-->
<div class="row">
  {!! Form::model($data, ['route' => ['layouts.update', $data->id], 'method'=>'patch']) !!}
  {!! csrf_field() !!}
  <div class="col-md-12">
	    <div class="panel panel-default">
	        <div class="panel-heading">
	            <h3 class="panel-title"><strong>@lang('label.create')</strong> @lang('feature.' . $data->name_design)</h3>
	        </div>
	        <div class="panel-body">
	            <div class="row">
                    {{ Form::text('name_design', $data->name_design, ['style'=>'display:none;']) }}
					<div style="padding: 10px 10px 10px 10px; font-weight: bold; font-size: 14pt;">
						Bahasa Indonesia
					</div>
	                <div class="col-md-12">
	                    <div class="form-group @if ($errors->has('title_design')) has-error @endif">
	                        <div class="col-md-11">
	                          {{ Form::text('title_design', old('title_design'), array('class' => 'form-control', 'placeholder'=>trans('label.title'), 'style'=>'font-size: 14pt;')) }}
	                          @if ($errors->has('title_design'))
	                          <label id="login-error" class="error" for="login">{{$errors->first('title_design')}}</label>
	                          @endif
							</div>
							<div class="col-md-1">
								<label class="switch">
									{{ Form::checkbox('title_show', $data->title_show, $data->title_show, ['data-toggle'=>'tooltip', 'data-original-title'=>trans('label.title_show')]) }}
									<span></span>
								</label>
							</div>
	                    </div>
                  </div>
                  <div class="col-md-12">
	                    <div class="block">
	                      {{ Form::textarea('value_design', null, array('class'=>'summernote')) }}
	                    </div>
	                </div>
	            </div>
				<div class="tabs">                            
					<ul class="nav nav-tabs" role="tablist">
						<li class="active"><a href="#inggris" role="tab" data-toggle="tab" aria-expanded="true">Inggris</a></li>
						<li class=""><a href="#jerman" role="tab" data-toggle="tab" aria-expanded="false">Jerman</a></li>
						<li class=""><a href="#arab" role="tab" data-toggle="tab" aria-expanded="false">Arab</a></li>
						<li class=""><a href="#cina" role="tab" data-toggle="tab" aria-expanded="false">Cina</a></li>
					</ul>                            
					<div class="tab-content">
						<div class="tab-pane active" id="inggris">
							<div style="padding: 10px 10px 10px 10px; font-weight: bold; font-size: 14pt;">
								English Language
							</div>
							<div class="col-md-12">
								<div class="form-group @if ($errors->has('title_design')) has-error @endif">
									<div class="col-md-12">
									{{ Form::text('title_design_en', $data->rEn ? $data->rEn->title_design : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.title'), 'style'=>'font-size: 14pt;', 'required')) }}
									@if ($errors->has('title_design'))
									<label id="login-error" class="error" for="login">{{$errors->first('title_design')}}</label>
									@endif
									</div>
								</div>
							</div>
							<div class="col-md-12">
								<div class="block">
									{{ Form::textarea('content_en', $data->rEn ? $data->rEn->value_design : null, array('id'=>'content_en')) }}
								</div>
							</div>
						</div>
						<div class="tab-pane" id="jerman">
							<div style="padding: 10px 10px 10px 10px; font-weight: bold; font-size: 14pt;">
								deutsche Sprache
							</div>
							<div class="col-md-12">
								<div class="form-group @if ($errors->has('title_design')) has-error @endif">
									<div class="col-md-12">
									{{ Form::text('title_design_de', $data->rDe ? $data->rDe->title_design : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.title'), 'style'=>'font-size: 14pt;', 'required')) }}
									@if ($errors->has('title_design'))
									<label id="login-error" class="error" for="login">{{$errors->first('title_design')}}</label>
									@endif
									</div>
								</div>
							</div>
							<div class="col-md-12">
								<div class="block">
									{{ Form::textarea('content_de', $data->rDe ? $data->rDe->value_design : null, array('id'=>'content_de')) }}
								</div>
							</div>
						</div>
						<div class="tab-pane" id="arab">
							<div style="padding: 10px 10px 10px 10px; font-weight: bold; font-size: 14pt;">
								اللغة الألمانية
							</div>
							<div class="col-md-12">
								<div class="form-group @if ($errors->has('title_design')) has-error @endif">
									<div class="col-md-12">
									{{ Form::text('title_design_sa', $data->rSa ? $data->rSa->title_design : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.title'), 'style'=>'font-size: 14pt;', 'required')) }}
									@if ($errors->has('title_design'))
									<label id="login-error" class="error" for="login">{{$errors->first('title_design')}}</label>
									@endif
									</div>
								</div>
							</div>
							<div class="col-md-12">
								<div class="block">
									{{ Form::textarea('content_sa', $data->rSa ? $data->rSa->value_design : null, array('id'=>'content_sa')) }}
								</div>
							</div>
						</div>
						<div class="tab-pane" id="cina">
							<div style="padding: 10px 10px 10px 10px; font-weight: bold; font-size: 14pt;">
								中文
							</div>
							<div class="col-md-12">
								<div class="form-group @if ($errors->has('title_design')) has-error @endif">
									<div class="col-md-12">
									{{ Form::text('title_design_zh', $data->rZh ? $data->rZh->title_design : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.title'), 'style'=>'font-size: 14pt;', 'required')) }}
									@if ($errors->has('title_design'))
									<label id="login-error" class="error" for="login">{{$errors->first('title_design')}}</label>
									@endif
									</div>
								</div>
							</div>
							<div class="col-md-12">
								<div class="block">
									{{ Form::textarea('content_zh', $data->rZh ? $data->rZh->value_design : null, array('id'=>'content_zh')) }}
								</div>
							</div>
						</div>
					</div>
				</div>
	        </div>
	    </div>
	</div>
	<div class="col-md-12">
	    <div class="panel panel-default">
	        <div class="panel-footer">
				<button class="btn btn-info pull-right">@lang('label.save')</button>
	        </div>
	    </div>
	</div>
  {!! Form::close() !!}
</div>
<!-- page end-->
@stop

@section('script')
{!! Html::script('backend/assets/select2/select2.full.min.js') !!}
{!! Html::script('backend/js/plugins/bootstrap/bootstrap-datepicker.js') !!}
{!! Html::script('backend/js/plugins/bootstrap/bootstrap-timepicker.min.js') !!}
{!! Html::script('backend/js/plugins/bootstrap/bootstrap-file-input.js') !!}
{!! Html::script('backend/js/plugins/summernote/summernote.js') !!}
<script type="text/javascript">

	
	$(document).ready(function() {
		$('#content').summernote({
			height: 350
		});
		$('#content_en').summernote({
			height: 350
		});
		$('#content_de').summernote({
			height: 350
		});
		$('#content_sa').summernote({
			height: 350
		});

		$('#content_zh').summernote({
			height: 350
		});
	});
</script>
@stop