@extends('layouts.app')
@section('content')
    <div class="panel panel-primary">
        <div class="panel-heading">
            Správa uživatelského účtu
        </div>
        <div class="panel-body">
            {{-- CHANGE USER PASSWORD --------------------------------------------------------------------}}
            <div class="panel-heading">
                Změna hesla
            </div>
            @include('flash::message')
            {{ Form::open(['route' => 'changeUserPassword', 'class' => 'form-horizontal']) }}
            <div class="form-group{{ $errors->has('old_password') ? ' has-error' : '' }}">
                <label class="col-md-4 control-label">Staré heslo</label>
                <div class="col-md-6">
                    {{ Form::password('old_password', ['class'=>'form-control']) }} @if ($errors->has('old_password'))
                        <span class="help-block">
                            <strong>{{ $errors->first('old_password') }}</strong>
                        </span>
                    @endif
                </div>
            </div>

            <div class="form-group{{ $errors->has('password') ? ' has-error' : '' }}">
                <label class="col-md-4 control-label">Nové heslo</label>
                <div class="col-md-6">
                    {{ Form::password('password', ['class'=>'form-control'])}} @if ($errors->has('password'))
                        <span class="help-block">
                            <strong>{{ $errors->first('password') }}</strong>
                        </span>
                    @endif
                </div>
            </div>

            <div class="form-group{{ $errors->has('password_confirmation') ? ' has-error' : '' }}">
                <label class="col-md-4 control-label">Potvrzení hesla</label>
                <div class="col-md-6">
                    {{ Form::password('password_confirmation', ['class'=>'form-control']) }} @if ($errors->has('password_confirmation'))
                        <span class="help-block">
                            <strong>{{ $errors->first('password_confirmation') }}</strong>
                        </span>
                    @endif
                </div>
            </div>

            <div class="form-group">
                <div class="col-md-6 col-md-offset-4">
                    {{ Form::submit('Změnit heslo', array('class'=>'btn btn-primary')) }}
                </div>
            </div>

            {{ Form::close() }}
        </div>
    </div>
@endsection
