@extends('layouts.admin')
@section('content')

<div class="card">
    <div class="card-header">
        {{ trans('global.create') }} {{ trans('cruds.litmasSidang.title_singular') }}
    </div>

    <div class="card-body">
        <form action="{{ route("admin.litmas-sidangs.store") }}" method="POST" enctype="multipart/form-data">
            @csrf
            <div class="form-group {{ $errors->has('nama_id') ? 'has-error' : '' }}">
                <label for="nama">{{ trans('cruds.litmasSidang.fields.nama') }}</label>
                <select name="nama_id" id="nama" class="form-control select2">
                    @foreach($namas as $id => $nama)
                        <option value="{{ $id }}" {{ (isset($litmasSidang) && $litmasSidang->nama ? $litmasSidang->nama->id : old('nama_id')) == $id ? 'selected' : '' }}>{{ $nama }}</option>
                    @endforeach
                </select>
                @if($errors->has('nama_id'))
                    <em class="invalid-feedback">
                        {{ $errors->first('nama_id') }}
                    </em>
                @endif
            </div>
            <div class="form-group {{ $errors->has('bimbingan') ? 'has-error' : '' }}">
                <label for="bimbingan">{{ trans('cruds.litmasSidang.fields.bimbingan') }}</label>
                <input type="text" id="bimbingan" name="bimbingan" class="form-control" value="{{ old('bimbingan', isset($litmasSidang) ? $litmasSidang->bimbingan : '') }}">
                @if($errors->has('bimbingan'))
                    <em class="invalid-feedback">
                        {{ $errors->first('bimbingan') }}
                    </em>
                @endif
                <p class="helper-block">
                    {{ trans('cruds.litmasSidang.fields.bimbingan_helper') }}
                </p>
            </div>
            <div>
                <input class="btn btn-danger" type="submit" value="{{ trans('global.save') }}">
            </div>
        </form>
    </div>
</div>
@endsection