108 lines
4.6 KiB
PHP
108 lines
4.6 KiB
PHP
|
<?php include('includes/header.php'); ?>
|
||
|
<div>
|
||
|
<div class="card card-body p-4">
|
||
|
<?= alertMessage(); ?>
|
||
|
<div class="row">
|
||
|
<div class="col-6">
|
||
|
<h3 class="fw-semibold mb-4">Schüler:in erstellen</h3>
|
||
|
</div>
|
||
|
<div class="col-6">
|
||
|
<a href="students.php" class="btn btn-light float-end"> <i class="ti ti-arrow-left"></i> Zurück zur Übersicht</a>
|
||
|
</div>
|
||
|
</div>
|
||
|
<form action="code.php" method="POST">
|
||
|
<div class="row">
|
||
|
<div class="col-6">
|
||
|
<div class="mb-3">
|
||
|
<label class="form-label">Vorname</label>
|
||
|
<input type="text" name="firstname" required class="form-control">
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="col-6">
|
||
|
<div class="mb-3">
|
||
|
<label class="form-label">Nachname</label>
|
||
|
<input type="text" name="lastname" required class="form-control">
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="col-6">
|
||
|
<div class="mb-3">
|
||
|
<label class="form-label">Benutzer-ID</label>
|
||
|
<input type="text" name="user-id" required pattern="[A-Za-z0-9\-]+" onkeydown="if(['Space'].includes(arguments[0].code)){return false;}" class="form-control">
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="col-6">
|
||
|
<div class="mb-3">
|
||
|
<label class="form-label">Geburtsdatum</label>
|
||
|
<input type="date" name="dateofbirth" required class="form-control">
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="col-6">
|
||
|
<div class="mb-3">
|
||
|
<label class="form-label">Kennwort</label>
|
||
|
<input type="password" name="password" class="form-control">
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="col-6">
|
||
|
<div class="mb-3">
|
||
|
<label class="form-label">Geschlecht</label>
|
||
|
<select name="gender" required class="form-select">
|
||
|
<option value="">--- Auswählen ---</option>
|
||
|
<?php createEnumSelect('tbl_students', 'gender')?>
|
||
|
</select>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="col-6">
|
||
|
<div class="mb-3">
|
||
|
<label class="form-label">Klasse</label>
|
||
|
<select name="class" class="form-select">
|
||
|
<option value="">--- Auswählen ---</option>
|
||
|
<?php
|
||
|
$classOptions = getAllClasses('active');
|
||
|
foreach ($classOptions as $id => $display_name) {
|
||
|
echo '<option value="' . $id . '">' . $display_name . '</option>';
|
||
|
}
|
||
|
?>
|
||
|
</select>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="col-6">
|
||
|
<div class="mb-3">
|
||
|
<label class="form-label">E-Mail Schüler:in</label>
|
||
|
<input type="email" name="email-student" required class="form-control">
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="col-6">
|
||
|
<div class="mb-3">
|
||
|
<label class="form-label">E-Mail Elternteil 1</label>
|
||
|
<input type="email" name="email-parents-1" required class="form-control">
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="col-6">
|
||
|
<div class="mb-3">
|
||
|
<label class="form-label">E-Mail Elternteil 2</label>
|
||
|
<input type="email" name="email-parents-2" class="form-control">
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="col-6">
|
||
|
<div class="mb-3">
|
||
|
<label class="form-label">Status</label>
|
||
|
<select name="status" class="form-select">
|
||
|
<?php
|
||
|
$enumValueLabels = [
|
||
|
'active' => 'Aktiv',
|
||
|
'disabled' => 'Inaktiv',
|
||
|
'archived' => 'Archiviert'
|
||
|
];
|
||
|
createEnumSelect('tbl_students', 'status', '', $enumValueLabels);
|
||
|
?>
|
||
|
</select>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="col-md-12">
|
||
|
<button type="submit" name="createstudent" class="btn btn-info float-end"><i class="ti ti-plus me-1"></i>Erstellen</button>
|
||
|
</div>
|
||
|
</div>
|
||
|
</form>
|
||
|
</div>
|
||
|
</div>
|
||
|
<?php include('includes/footer.php'); ?>
|