95 lines
4.3 KiB
PHP
95 lines
4.3 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>Add doctor</title>
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
<link rel="stylesheet" href="<?= base_url('css/app.css') ?>">
|
|
</head>
|
|
<body class="app-body app-page--admin">
|
|
|
|
<?php $validationErrors = validation_errors(); ?>
|
|
|
|
<div class="container py-5" style="max-width: 560px;">
|
|
|
|
<h2 class="text-center mb-4 app-heading">Add doctor</h2>
|
|
|
|
<?php if (session()->getFlashdata('error')): ?>
|
|
<div class="alert alert-danger app-alert text-center"><?= esc(session()->getFlashdata('error')) ?></div>
|
|
<?php endif; ?>
|
|
|
|
<form method="post" action="<?= base_url('admin/doctors/add') ?>" class="app-form card app-card-dashboard p-4" novalidate>
|
|
<?= csrf_field() ?>
|
|
|
|
<div class="mb-3">
|
|
<label class="form-label" for="name">Full name</label>
|
|
<input type="text" name="name" id="name" value="<?= esc(old('name')) ?>"
|
|
class="form-control <?= isset($validationErrors['name']) ? 'is-invalid' : '' ?>">
|
|
<?= validation_show_error('name') ?>
|
|
</div>
|
|
|
|
<div class="mb-3">
|
|
<label class="form-label" for="email">Email (login)</label>
|
|
<input type="text" name="email" id="email" value="<?= esc(old('email')) ?>"
|
|
class="form-control <?= isset($validationErrors['email']) ? 'is-invalid' : '' ?>" autocomplete="off">
|
|
<?= validation_show_error('email') ?>
|
|
</div>
|
|
|
|
<div class="mb-3">
|
|
<label class="form-label" for="password"> Password</label>
|
|
<input type="password" name="password" id="password"
|
|
class="form-control <?= isset($validationErrors['password']) ? 'is-invalid' : '' ?>" autocomplete="new-password">
|
|
<?= validation_show_error('password') ?>
|
|
</div>
|
|
|
|
<div class="mb-3">
|
|
<label class="form-label" for="specialization">Specialization</label>
|
|
<input type="text" name="specialization" id="specialization" value="<?= esc(old('specialization')) ?>"
|
|
class="form-control <?= isset($validationErrors['specialization']) ? 'is-invalid' : '' ?>"
|
|
placeholder="e.g. Cardiology">
|
|
<?= validation_show_error('specialization') ?>
|
|
</div>
|
|
|
|
<div class="mb-3">
|
|
<label class="form-label" for="experience">Experience (optional)</label>
|
|
<input type="text" name="experience" id="experience" value="<?= esc(old('experience')) ?>"
|
|
class="form-control"
|
|
placeholder="e.g. 10 years">
|
|
<?= validation_show_error('experience') ?>
|
|
</div>
|
|
|
|
<div class="mb-3">
|
|
<label class="form-label" for="fees">Consultation fee (optional)</label>
|
|
<input type="number" name="fees" id="fees" value="<?= esc(old('fees')) ?>"
|
|
class="form-control"
|
|
placeholder="e.g. 500.00" step="0.01" min="0">
|
|
<?= validation_show_error('fees') ?>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-md-6 mb-3">
|
|
<label class="form-label" for="available_from">Available from</label>
|
|
<input type="time" name="available_from" id="available_from" value="<?= esc(old('available_from')) ?>"
|
|
class="form-control <?= isset($validationErrors['available_from']) ? 'is-invalid' : '' ?>">
|
|
<?= validation_show_error('available_from') ?>
|
|
</div>
|
|
<div class="col-md-6 mb-3">
|
|
<label class="form-label" for="available_to">Available to</label>
|
|
<input type="time" name="available_to" id="available_to" value="<?= esc(old('available_to')) ?>"
|
|
class="form-control <?= isset($validationErrors['available_to']) ? 'is-invalid' : '' ?>">
|
|
<?= validation_show_error('available_to') ?>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="d-flex flex-wrap gap-2 justify-content-between mt-4">
|
|
<a href="<?= base_url('admin/dashboard') ?>" class="btn btn-outline-secondary rounded-pill px-4">Cancel</a>
|
|
<button type="submit" class="btn btn-app-primary px-4">Create doctor</button>
|
|
</div>
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|