97 lines
6.2 KiB
PHP
97 lines
6.2 KiB
PHP
@include('components.theme.pages.header')
|
|
|
|
<section>
|
|
<!-- basic table -->
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="card">
|
|
<div class="card-header d-flex">
|
|
<h6 class="m-0 font-weight-bold text-primary">Tambah Guru</h6>
|
|
<p class="m-0 ml-auto small"><span class="text-danger">*</span> Wajib diisi</p>
|
|
</div>
|
|
<div class="card-body">
|
|
{{ Form::open(['route' => 'guru.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="row mb-4">
|
|
<div class="col">
|
|
<label>NIP<sup class="text-danger">*</sup></label>
|
|
<input type="number" name="nip" value="{{ old('nip') }}" autocomplete="off" class="form-control mt-1 {{ $errors->has('nip') ? ' text-danger' : '' }}" placeholder="Masukkan NIP">
|
|
@error('nip') <small class="text-danger">{{ $message }}</small> @enderror
|
|
</div>
|
|
<div class="col">
|
|
<label>Alamat Lengkap<sup class="text-danger">*</sup></label>
|
|
<input type="text" name="alamat" value="{{ old('alamat') }}" autocomplete="off" class="form-control mt-1 {{ $errors->has('alamat') ? ' text-danger' : '' }}" placeholder="Masukkan Alamat Lengkap">
|
|
@error('alamat') <small class="text-danger">{{ $message }}</small> @enderror
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row mb-4">
|
|
<div class="col">
|
|
<label>Alamat Email<sup class="text-danger">*</sup></label>
|
|
<input type="email" name="email" value="{{ old('email') }}" autocomplete="off" class="form-control mt-1 {{ $errors->has('email') ? ' text-danger' : '' }}" placeholder="Masukkan Email Address">
|
|
@error('email') <small class="text-danger">{{ $message }}</small> @enderror
|
|
</div>
|
|
<div class="col">
|
|
<label>Nama Lengkap<sup class="text-danger">*</sup></label>
|
|
<input type="text" name="name" value="{{ old('name') }}" autocomplete="off" class="form-control mt-1 {{ $errors->has('name') ? ' text-danger' : '' }}" placeholder="Masukkan Name">
|
|
@error('name') <small class="text-danger">{{ $message }}</small> @enderror
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group mb-4">
|
|
<label>Password<sup class="text-danger">*</sup></label>
|
|
<input class="form-control mt-1 {{ $errors->has('password') ? ' text-danger' : '' }}"
|
|
type="password" value="{{ old('password') }}" placeholder="Masukkan Password" name="password" autocomplete="off" />
|
|
@error('password') <small class="text-danger">{{ $message }}</small> @enderror
|
|
</div>
|
|
<div class="row mb-4">
|
|
<div class="col">
|
|
<label>Nomer Telepon<sup class="text-danger">*</sup></label>
|
|
<input type="number" name="telepon" value="{{ old('telepon') }}" autocomplete="off" class="form-control mt-1 {{ $errors->has('telepon') ? ' text-danger' : '' }}" placeholder="Masukkan Telepon">
|
|
@error('telepon') <small class="text-danger">{{ $message }}</small> @enderror
|
|
</div>
|
|
<div class="col">
|
|
<label>Agama<sup class="text-danger">*</sup></label>
|
|
<select name="agama" class="form-control mt-1 {{ $errors->has('agama') ? ' text-danger' : '' }}">
|
|
@foreach ([1,2,3,4] as $rolez)
|
|
@php $name = $rolez == 1 ? 'Islam' : ($rolez == 2 ? 'Kristen' : ($rolez == 3 ? 'Buddha' : 'Konghucu')) @endphp
|
|
<option value="{{ $rolez }}">{{ $name }}</option>
|
|
@endforeach
|
|
</select>
|
|
@error('agama') <small class="text-danger">{{ $message }}</small> @enderror
|
|
</div>
|
|
<div class="col">
|
|
<label>Status Account<sup class="text-danger">*</sup></label>
|
|
<select name="status" class="form-control mt-1 {{ $errors->has('status') ? ' text-danger' : '' }}">
|
|
@foreach ([1,2,3,4] as $rolez)
|
|
@php $name = $rolez == 1 ? 'Active' : ($rolez == 2 ? 'Non Active' : ($rolez == 3 ? 'Deactivated' : 'Not Verified')) @endphp
|
|
<option value="{{ $rolez }}">{{ $name }}</option>
|
|
@endforeach
|
|
</select>
|
|
@error('status') <small class="text-danger">{{ $message }}</small> @enderror
|
|
</div>
|
|
</div>
|
|
<div class="form-group mb-0">
|
|
<button type="submit" class="btn btn-primary">Simpan</button>
|
|
<a href="{{ route('guru') }}" class="btn btn-light btn-light">Kembali</a>
|
|
</div>
|
|
{{ Form::close() }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
@include('components.theme.pages.footer')
|