@extends('layouts.app')

@section('content')
<h3 class="page-title">@lang('custom.qa_change_password')</h3>

@if(session('success'))
<!-- If password successfully show message -->
<div class="row">
	<div class="alert alert-success">
		{{ session('success') }}
	</div>
</div>
@else
{!! Form::open(['method' => 'PATCH', 'route' => ['auth.change_password']]) !!}
<!-- If no success message in flash session show change password form  -->
<div class="panel panel-default">
	<div class="panel-heading">
		@lang('quickadmin.qa_edit')
	</div>

	<div class="panel-body">
		<div class="row">
			<!-- <div class="form-group"> -->
			<div class="col-xs-4">
				{!! Form::label('current_password', trans('quickadmin.qa_current_password'), ['class' => 'control-label']) !!}
				{!! Form::password('current_password', ['class' => 'form-control', 'placeholder' => '']) !!}
				<p class="help-block"></p>
				@if($errors->has('current_password'))
				<p class="help-block">
					{{ $errors->first('current_password') }}
				</p>
				@endif
			</div>
			<!-- </div> -->


			<!-- <div class="form-group"> -->
			<div class="col-xs-4">
				{!! Form::label('new_password', trans('quickadmin.qa_new_password'), ['class' => 'control-label']) !!}
				{!! Form::password('new_password', ['class' => 'form-control', 'placeholder' => '']) !!}
				<p class="help-block"></p>
				@if($errors->has('new_password'))
				<p class="help-block">
					{{ $errors->first('new_password') }}
				</p>
				@endif
			</div>
			<!-- </div> -->

			<!-- <div class=" form-group"> -->
			<div class="col-xs-4">
				{!! Form::label('new_password_confirmation', trans('quickadmin.qa_password_confirm'), ['class' => 'control-label']) !!}
				{!! Form::password('new_password_confirmation', ['class' => 'form-control', 'placeholder' => '']) !!}
				<p class="help-block"></p>
				@if($errors->has('new_password_confirmation'))
				<p class="help-block">
					{{ $errors->first('new_password_confirmation') }}
				</p>
				@endif
			</div>
			<!-- </div> -->
		</div>
	</div>
</div>

{!! Form::submit(trans('quickadmin.qa_save'), ['class' => 'btn btn-danger wave-effect']) !!}
{!! Form::close() !!}
@endif
@stop