114 lines
2.8 KiB
PHP
114 lines
2.8 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="id">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Tambahkan Data Siswa</title>
|
|
<style>
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
font-family: 'Poppins', sans-serif;
|
|
}
|
|
body {
|
|
background: linear-gradient(135deg, #b64fdb, #c7f0e1);
|
|
min-height: 100vh;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
color: #333;
|
|
}
|
|
.container {
|
|
width: 90%;
|
|
max-width: 600px;
|
|
background: #ffffff;
|
|
padding: 40px;
|
|
border-radius: 20px;
|
|
box-shadow: 0 8px 25px rgba(0,0,0,0.15);
|
|
}
|
|
h1 {
|
|
text-align: center;
|
|
margin-bottom: 30px;
|
|
color: #2c3e50;
|
|
}
|
|
label {
|
|
font-weight: 600;
|
|
display: block;
|
|
margin-bottom: 8px;
|
|
color: #34495e;
|
|
}
|
|
input, select {
|
|
width: 100%;
|
|
padding: 12px;
|
|
margin-bottom: 20px;
|
|
border-radius: 12px;
|
|
border: 1px solid #ddd;
|
|
font-size: 16px;
|
|
transition: all 0.3s ease;
|
|
}
|
|
input:focus, select:focus {
|
|
outline: none;
|
|
border: 1px solid #3498db;
|
|
box-shadow: 0 0 8px rgba(52,152,219,0.5);
|
|
}
|
|
.button {
|
|
width: 100%;
|
|
padding: 14px;
|
|
background: #b64fdb;
|
|
color: white;
|
|
border: none;
|
|
border-radius: 50px;
|
|
font-weight: 600;
|
|
font-size: 16px;
|
|
cursor: pointer;
|
|
transition: background 0.3s;
|
|
}
|
|
|
|
.alert {
|
|
background: #f8d7da;
|
|
color: #721c24;
|
|
padding: 15px;
|
|
border-radius: 10px;
|
|
margin-bottom: 20px;
|
|
border-left: 5px solid #f5c6cb;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<div class="container">
|
|
<h1>Tambahkan Data Karyawan</h1>
|
|
|
|
@if($errors->any())
|
|
<div class="alert">
|
|
@foreach($errors->all() as $error)
|
|
<p>{{ $error }}</p>
|
|
@endforeach
|
|
</div>
|
|
@endif
|
|
|
|
<form action="{{ route('karyawan.store') }}" method="POST">
|
|
@csrf
|
|
<label>Nama:</label>
|
|
<input type="text" name="nama" required>
|
|
|
|
<label>Umur:</label>
|
|
<input type="number" name="umur" required>
|
|
|
|
<label>Jabatan:</label>
|
|
<select name="jabatan_id" class="form-control" required>
|
|
<option value="">-- Pilih Jabatan --</option>
|
|
@foreach($jabatans as $jabatan)
|
|
<option value="{{ $jabatan->id }}">{{ $jabatan->jabatan }}</option>
|
|
@endforeach
|
|
</select>
|
|
|
|
|
|
|
|
<button type="submit" class="button">Simpan Data</button>
|
|
</form>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|