
@php
    use App\Helpers\Form as FormTemplate;
    use App\Helpers\Template;

    $formInputAttr = config('zvn.template.form_input');
    $formLabelAttr = config('zvn.template.form_label_edit');

    $inputHiddenID    = Form::hidden('id', @$item['id']);

    $elements = [
        [
            'label'   => Form::label('old_password', 'Old Password', $formLabelAttr),
            'element' => Form::password('old_password', $formInputAttr),
        ],[
            'label'   => Form::label('password', 'Password', $formLabelAttr),
            'element' => Form::password('password', $formInputAttr),
        ],[
            'label'   => Form::label('password_confirmation', 'Password Confirmation ', $formLabelAttr),
            'element' => Form::password('password_confirmation', $formInputAttr),
        ],[
            'element' => $inputHiddenID . Form::submit('Save', ['class'=>'btn btn-success', 'name'=> 'taskChangeUserPassword']),
            'type'    => "btn-submit-edit"
        ]
    ];
@endphp




@extends('admin.main')

@section('content')
    @include ('admin.templates.page_header', ['pageIndex' => false])
    @include ('admin.templates.error')

    @if ( @$item['id'])
        <div class="row">
            <div class="col-md-12 col-sm-12 col-xs-12">
                <div class="x_panel">
                    @include('admin.templates.x_title', ['title' => 'Form Change Password'])
                    <div class="x_content">
                        {{ Form::open([
                            'method'         => 'POST', 
                            'url'            => route("$controllerName/change-user-password"),
                            'accept-charset' => 'UTF-8',
                            'enctype'        => 'multipart/form-data',
                            'class'          => 'form-horizontal form-label-left',
                            'id'             => 'main-form' ])  }}
                            {!! FormTemplate::show($elements)  !!}
                        {{ Form::close() }}
                    </div>
                </div>
            </div>
        </div>
    @endif
@endsection
