@include('components.theme.pages.header')

<section>
    <!-- basic table -->
    <div class="row">
        <div class="col-12">
            <div class="card">
                <div class="card-body">
                    {{ Form::open(['route' => 'kriteria.store']) }}
                    @csrf
                    @if(session()->has('success'))
                        <div class="alert alert-success">
                            {{ session()->get('success') }}
                        </div>
                    @else
                        @if(session()->has('error'))
                            <div class="alert alert-danger">
                                {{ session()->get('error') }}
                            </div>
                        @endif
                    @endif
                        <div class="form-group mb-3">
                            <label for="exampleEmail1">ID Kriteria</label>
                            <input type="text" class="form-control form-control-user {{ $errors->has('id_kriteria') ? 'is-invalid' : '' }}" id="email" name="id_kriteria" aria-describedby="emailHelp" placeholder="Enter ID Kriteria." value="<?= old('id_kriteria') ?>">
                            @if($errors->has('id_kriteria'))<span class="small text-danger mt-2">{{ $errors->first('id_kriteria') }}</span>@endif
                        </div>
                        <div class="form-group mb-3">
                            <label for="exampleEmail1">Nama Kriteria</label>
                            <input type="text" class="form-control form-control-user {{ $errors->has('nama_kriteria') ? 'is-invalid' : '' }}" id="email" name="nama_kriteria" aria-describedby="emailHelp" placeholder="Enter Nama Kriteria." value="<?= old('nama_kriteria') ?>">
                            @if($errors->has('nama_kriteria'))<span class="small text-danger mt-2">{{ $errors->first('nama_kriteria') }}</span>@endif
                        </div>
                        <div class="form-group mb-0">
                            <button type="submit" class="btn btn-primary">Simpan</button>
                            <a href="{{ route('kriteria') }}" class="btn btn-light btn-light">Kembali</a>
                        </div>
                    {{ Form::close() }}
                </div>
            </div>
        </div>
    </div>
</section>

@include('components.theme.pages.footer')
