@extends('layouts.app')

@section('content')

    <div class="card">
  
        <div class="card-header bg-primary text-white">

            <h5  class="my-1 float-left">{{ !empty($title) ? $title : 'Leader Assessment' }}</h5>

            <div class="btn-group btn-group-sm float-right" role="group">

                <a href="{{ route('leader_assessments.leader_assessment.index') }}" class="btn btn-primary" title="แสดง Leader Assessment ทั้งหมด">
                    <i class=" fas fa-fw fa-th-list" aria-hidden="true"></i>
                </a>

                <a href="{{ route('leader_assessments.leader_assessment.create') }}" class="btn btn-success" title="เพิ่ม Leader Assessment ใหม่">
                    <i class=" fas fa-fw fa-plus" aria-hidden="true"></i>
                </a>

            </div>
        </div>

        <div class="card-body">

            @if ($errors->any())
                <ul class="alert alert-danger">
                    @foreach ($errors->all() as $error)
                        <li>{{ $error }}</li>
                    @endforeach
                </ul>
            @endif

            <form method="POST" action="{{ route('leader_assessments.leader_assessment.update', $leaderAssessment->id) }}" id="edit_leader_assessment_form" name="edit_leader_assessment_form" accept-charset="UTF-8" class="form-horizontal">
            {{ csrf_field() }}
            <input name="_method" type="hidden" value="PUT">
            @include ('leader_assessments.form', [
                                        'leaderAssessment' => $leaderAssessment,
                                      ])

                <div class="form-group">
                    <div align="center">
					<button class="btn btn-primary" type="submit">
					<i class="fas fa-fw fa-edit"></i> 
					ปรับปรุงข้อมูล</button>
					<button class="btn btn-light" type="reset">
					<i class="fas fa-fw fa-redo" aria-hidden="true"></i> 
					ยกเลิก</button>
				  </div>
                </div>
            </form>

        </div>
    </div>

@endsection