239 lines
13 KiB
PHP
239 lines
13 KiB
PHP
@extends('server-side.layouts.server-app')
|
|
@section('title', 'Edit Data Siswa | Skripsi Rindi')
|
|
@section('main-content')
|
|
|
|
<style>
|
|
input[readonly] {
|
|
background-color: #f8f9fa;
|
|
cursor: not-allowed;
|
|
}
|
|
</style>
|
|
|
|
<main id="main" class="main">
|
|
<div class="pagetitle">
|
|
<h1>Form Edit Siswa</h1>
|
|
<nav>
|
|
<ol class="breadcrumb">
|
|
<li class="breadcrumb-item"><a href="{{ url('dashboard') }}">Dashboard</a></li>
|
|
<li class="breadcrumb-item">Siswa</li>
|
|
<li class="breadcrumb-item active">Edit Siswa</li>
|
|
</ol>
|
|
</nav>
|
|
</div>
|
|
<!-- End Page Title -->
|
|
<section class="section">
|
|
<div class="row">
|
|
<div class="col-lg-12">
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<h5 class="card-title">Lengkapi data di bawah ini!</h5>
|
|
<!-- Vertical Form -->
|
|
<form class="row g-3" action="{{route('profile.update',$siswa->id)}}" enctype="multipart/form-data" method="post" autocomplete="off">
|
|
@csrf
|
|
@method('PUT')
|
|
<div class="col-6">
|
|
<label for="inputUsername" class="form-label">*Username</label>
|
|
<input type="text" class="form-control" id="inputUsername" name="username" value="{{ $siswa->user->username ?? old('username') }}" readonly>
|
|
|
|
@error('username')
|
|
<strong class="fw-bold d-block text-danger mt-2">
|
|
<small> * {{ $message }}</small>
|
|
</strong>
|
|
@enderror
|
|
</div>
|
|
|
|
<div class="col-6">
|
|
<label for="inputEmail" class="form-label">*Email</label>
|
|
<input type="text" class="form-control" id="inputEmail" name="email" value="{{ $siswa->user->email ?? old('email') }}" readonly/>
|
|
|
|
@error('nis')
|
|
<strong class="fw-bold d-block text-danger mt-2">
|
|
<small> * {{ $message }}</small>
|
|
</strong>
|
|
@enderror
|
|
</div>
|
|
|
|
{{-- <div class="col-6">
|
|
<label for="inputEmail" class="form-label">*Password</label>
|
|
<input type="password" class="form-control" id="inputEmail" name="password" value="{{ $siswa->user->password ?? old('password') }}"/>
|
|
|
|
@error('nis')
|
|
<strong class="fw-bold d-block text-danger mt-2">
|
|
<small> * {{ $message }}</small>
|
|
</strong>
|
|
@enderror
|
|
</div> --}}
|
|
|
|
<div class="col-12">
|
|
<label for="inputNis" class="form-label">*NIS</label>
|
|
<input type="text" class="form-control" id="inputNis" name="nis" oninput="this.value=this.value.replace(/[^0-9]/, '')" value="{{ $siswa->nis ?? old('nis') }}"/>
|
|
|
|
@error('nis')
|
|
<strong class="fw-bold d-block text-danger mt-2">
|
|
<small> * {{ $message }}</small>
|
|
</strong>
|
|
@enderror
|
|
</div>
|
|
|
|
<div class="col-6">
|
|
<label for="nama" class="form-label">*Nama</label>
|
|
<input type="text" class="form-control" id="nama" name="nama" oninput="this.value=this.value.replace(/[^a-zA-Z\s]/g, '')" value="{{ $siswa->nama ?? old('nama') }}"/>
|
|
|
|
@error('nama')
|
|
<strong class="fw-bold d-block text-danger mt-2">
|
|
<small> * {{ $message }}</small>
|
|
</strong>
|
|
@enderror
|
|
</div>
|
|
|
|
<div class="col-6">
|
|
<label for="inputTempatlahir" class="form-label">*Tempat Lahir</label>
|
|
<input type="text" class="form-control" id="inputTempatlahir" name="tempat_lahir" oninput="this.value=this.value.replace(/[^a-zA-Z\s]/g, '')" value="{{ $siswa->tempat_lahir ?? old('tempat_lahir') }}" />
|
|
|
|
@error('tempat_lahir')
|
|
<strong class="fw-bold d-block text-danger mt-2">
|
|
<small> * {{ $message }}</small>
|
|
</strong>
|
|
@enderror
|
|
</div>
|
|
|
|
<div class="col-6">
|
|
<label for="inputNohp" class="form-label">*Nomor Handphone</label>
|
|
<input type="text" class="form-control" id="inputNohp" name="no_hp" oninput="this.value=this.value.replace(/[^0-9]/, '')" value="{{ $siswa->no_hp ?? old('no_hp') }}"/>
|
|
|
|
@error('no_hp')
|
|
<strong class="fw-bold d-block text-danger mt-2">
|
|
<small> * {{ $message }}</small>
|
|
</strong>
|
|
@enderror
|
|
</div>
|
|
|
|
<div class="col-6">
|
|
<label for="inputAlamat" class="form-label">*alamat</label>
|
|
<input type="text" class="form-control" id="inputAlamat" name="alamat" value="{{ $siswa->alamat ?? old('alamat') }}"/>
|
|
|
|
@error('alamat')
|
|
<strong class="fw-bold d-block text-danger mt-2">
|
|
<small> * {{ $message }}</small>
|
|
</strong>
|
|
@enderror
|
|
</div>
|
|
|
|
<div class="col-6">
|
|
<label for="inputAyah" class="form-label">*Nama Ayah</label>
|
|
<input type="text" class="form-control" id="inputAyah" name="nama_ayah" oninput="this.value=this.value.replace(/[^a-zA-Z\s]/g, '')" value="{{ $siswa->nama_ayah ?? old('nama_ayah') }}"/>
|
|
|
|
@error('nama_ayah')
|
|
<strong class="fw-bold d-block text-danger mt-2">
|
|
<small> * {{ $message }}</small>
|
|
</strong>
|
|
@enderror
|
|
</div>
|
|
|
|
<div class="col-6">
|
|
<label for="inputIbu" class="form-label">*Nama Ibu</label>
|
|
<input type="text" class="form-control" id="inputIbu" name="nama_ibu" oninput="this.value=this.value.replace(/[^a-zA-Z\s]/g, '')" value="{{ $siswa->nama_ibu ?? old('nama_ibu') }}"/>
|
|
|
|
@error('nama_ibu')
|
|
<strong class="fw-bold d-block text-danger mt-2">
|
|
<small> * {{ $message }}</small>
|
|
</strong>
|
|
@enderror
|
|
</div>
|
|
|
|
<div class="col-6">
|
|
<label class="form-label">*Jenis Kelamin</label>
|
|
<select name="jenis_kelamin" class="form-select text-center">
|
|
<option value="" disabled>~ Pilih Jenis Kelamin ~</option>
|
|
<option value="Pria" {{ $siswa->jenis_kelamin == 'Pria' ? 'selected' : '' }}>Pria</option>
|
|
<option value="Wanita" {{ $siswa->jenis_kelamin == 'Wanita' ? 'selected' : '' }}>Wanita</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="col-6">
|
|
<label for="inputTTL" class="form-label">*Tanggal Lahir</label>
|
|
<input type="date" class="form-control" id="inputTTL" name="tanggal_lahir" value="{{ $siswa->tanggal_lahir ?? old('tanggal_lahir') }}"/>
|
|
@error('tanggal_lahir')
|
|
<strong class="fw-bold d-block text-danger mt-2">
|
|
<small> * {{ $message }}</small>
|
|
</strong>
|
|
@enderror
|
|
</div>
|
|
<div class="col-6">
|
|
<label for="inputUsername" class="form-label">*jurusan</label>
|
|
<input type="text" class="form-control" id="inputjurusan" name="jurusan" value="{{ $siswa->nama_jurusan ?? old('jurusan') }}" readonly>
|
|
|
|
@error('jurusan')
|
|
<strong class="fw-bold d-block text-danger mt-2">
|
|
<small> * {{ $message }}</small>
|
|
</strong>
|
|
@enderror
|
|
</div>
|
|
|
|
|
|
<div class="col-6">
|
|
<label for="foto" class="form-label">*Foto</label>
|
|
<input type="file" class="form-control" id="foto" name="foto" value="{{old('foto')}}"/>
|
|
|
|
@error('foto')
|
|
<strong class="fw-bold d-block text-danger mt-2">
|
|
<small> * {{ $message }}</small>
|
|
</strong>
|
|
@enderror
|
|
</div>
|
|
|
|
<div class="col-6">
|
|
<label for="nilaiRaport" class="form-label">*Nilai Raport</label>
|
|
<input type="text" class="form-control" id="nilaiRaport" name="nilai_raport" oninput="this.value=this.value.replace(/[^0-9]/, '')"value="{{ $siswa->nilai_raport ?? old('nilai_raport') }}" />
|
|
@error('nilai_raport')
|
|
<strong class="fw-bold d-block text-danger mt-2">
|
|
<small> * {{ $message }}</small>
|
|
</strong>
|
|
@enderror
|
|
</div>
|
|
<div class="col-6">
|
|
<label for="nilaiKeterampilan" class="form-label">*Nilai keterampilan</label>
|
|
<input type="text" class="form-control" id="nilaiRaport" name="nilai_keterampilan" oninput="this.value=this.value.replace(/[^0-9]/, '')"value="{{ $siswa->nilai_keterampilan ?? old('nilai_keterampilan') }}" />
|
|
@error('nilai_keterampilan')
|
|
<strong class="fw-bold d-block text-danger mt-2">
|
|
<small> * {{ $message }}</small>
|
|
</strong>
|
|
@enderror
|
|
</div>
|
|
<div class="col-6">
|
|
<label for="bukti_nilai_raport" class="form-label">*Bukti Nilai Raport</label>
|
|
<input type="file" class="form-control" id="bukti_nilai_raport" name="bukti_nilai_raport" value="{{old('bukti_nilai_raport')}}"/>
|
|
@error('bukti_nilai_raport')
|
|
<strong class="fw-bold d-block text-danger mt-2">
|
|
<small> * {{ $message }}</small>
|
|
</strong>
|
|
@enderror
|
|
</div>
|
|
<div class="col-6">
|
|
<label for="bukti_nilai_keterampilan" class="form-label">*Bukti Nilai Keterampilan</label>
|
|
<input type="file" class="form-control" id="bukti_nilai_keterampilan" name="bukti_nilai_keterampilan" value="{{old('bukti_nilai_keterampilan')}}"/>
|
|
@error('bukti_nilai_keterampilan')
|
|
<strong class="fw-bold d-block text-danger mt-2">
|
|
<small> * {{ $message }}</small>
|
|
</strong>
|
|
@enderror
|
|
</div>
|
|
<div>
|
|
<button type="submit" class="btn btn-primary">
|
|
Submit
|
|
</button>
|
|
<button type="reset" class="btn btn-secondary">
|
|
Reset
|
|
</button>
|
|
</div>
|
|
</form>
|
|
|
|
<!-- Vertical Form -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</main>
|
|
@endsection
|