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

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

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

@section('content')
{!! Form::open(array('url' => route('user.store'), 'method' => 'POST', 'id' => 'user', 'class' => 'form-horizontal')) !!}
{!! csrf_field() !!}
<!-- page start-->
<div class="row">
	<div class="col-md-9">
	    <div class="panel panel-default">
	        <div class="panel-heading">
	            <h3 class="panel-title"><strong>@lang('label.create')</strong> @lang('feature.user')</h3>
	        </div>
	        <div class="panel-body">
	            <div class="row">
	                <div class="col-md-12">
						<div class="form-group @if ($errors->has('role')) has-error @endif">
							<label class="col-md-2 control-label">@lang('label.as')</label>
							<div class="col-md-10">
								{{ Form::select('role', ['admin'=>'Administrator', 'laman'=>'Pengelola Laman'], old('role'), array('class' => 'form-control')) }}
								@if ($errors->has('role'))
								<label id="login-error" class="error" for="login">{{$errors->first('role')}}</label>
								@endif
							</div>
						</div>
	                    <div class="form-group @if ($errors->has('name')) has-error @endif">
	                        <label class="col-md-2 control-label">@lang('label.name')</label>
	                        <div class="col-md-10">
	                          {{ Form::text('name', old('name'), array('class' => 'form-control')) }}
	                          @if ($errors->has('name'))
	                          <label id="login-error" class="error" for="login">{{$errors->first('name')}}</label>
	                          @endif
	                        </div>
	                    </div>
	                    <div class="form-group @if ($errors->has('email')) has-error @endif">
	                        <label class="col-md-2 control-label">Email</label>
	                        <div class="col-md-10">
	                          {{ Form::email('email', old('email'), array('class' => 'form-control')) }}
	                          @if ($errors->has('email'))
	                          <label id="login-error" class="error" for="login">{{$errors->first('email')}}</label>
	                          @endif
	                        </div>
	                    </div>
	                    <div class="form-group @if ($errors->has('password')) has-error @endif">
	                        <label class="col-md-2 control-label">Password</label>
	                        <div class="col-md-10">
                            {{ Form::password('password', array('class' => 'form-control')) }}
	                          @if ($errors->has('password'))
	                          <label id="login-error" class="error" for="login">{{$errors->first('password')}}</label>
	                          @endif
	                        </div>
	                    </div>
	                    <div class="form-group @if ($errors->has('password_confirmation')) has-error @endif">
	                        <label class="col-md-2 control-label">Password</label>
	                        <div class="col-md-10">
                            {{ Form::password('password_confirmation', array('class' => 'form-control')) }}
	                          @if ($errors->has('password_confirmation'))
	                          <label id="login-error" class="error" for="login">{{$errors->first('password_confirmation')}}</label>
	                          @endif
	                        </div>
	                    </div>
	                </div>
	            </div>
	        </div>
	    </div>
	</div>
	<div class="col-md-9">
	    <div class="panel panel-default">
	        <div class="panel-footer">
              	<a href="{{ url('user') }}" class="btn btn-default pull-right">@lang('label.cancel')</a>
	            <button class="btn btn-info pull-right">@lang('label.save')</button>
	        </div>
	    </div>
	</div>
</div>
{!! Form::close() !!}
<!-- page end-->
@stop

@section('script')
{!! Html::script('https://statik.unesa.ac.id/perpus_konten_statik/admin/js/plugins/bootstrap/bootstrap-datepicker.js') !!}
{!! Html::script('https://statik.unesa.ac.id/perpus_konten_statik/admin/js/plugins/bootstrap/bootstrap-timepicker.min.js') !!}
{!! Html::script('https://statik.unesa.ac.id/perpus_konten_statik/admin/js/plugins/bootstrap/bootstrap-file-input.js') !!}
{!! Html::script('https://statik.unesa.ac.id/perpus_konten_statik/admin/js/plugins/summernote/summernote.js') !!}
@stop
