79 lines
3.7 KiB
PHP
79 lines
3.7 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>Doctor profile</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--doctor">
|
|
|
|
<?php $validationErrors = validation_errors(); ?>
|
|
|
|
<div class="container py-5" style="max-width: 560px;">
|
|
|
|
<h2 class="text-center mb-4 app-heading">Your profile</h2>
|
|
|
|
<?php if (session()->getFlashdata('success')): ?>
|
|
<div class="alert alert-success app-alert text-center"><?= esc(session()->getFlashdata('success')) ?></div>
|
|
<?php endif; ?>
|
|
<?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('doctor/profile') ?>" class="app-form card app-card-dashboard p-4">
|
|
<?= csrf_field() ?>
|
|
|
|
<div class="mb-3">
|
|
<label class="form-label" for="specialization">Specialization</label>
|
|
<input type="text" name="specialization" id="specialization"
|
|
value="<?= esc(old('specialization', $doctor['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</label>
|
|
<input type="text" name="experience" id="experience"
|
|
value="<?= esc(old('experience', $doctor['experience'] ?? '')) ?>"
|
|
class="form-control <?= isset($validationErrors['experience']) ? 'is-invalid' : '' ?>"placeholder="e.g. 10 years">
|
|
<?= validation_show_error('experience') ?>
|
|
</div>
|
|
|
|
<div class="mb-3">
|
|
<label class="form-label" for="fees">Consultation fee</label>
|
|
<input type="text" name="fees" id="fees"
|
|
value="<?= esc(old('fees', $doctor['fees'] ?? '')) ?>"
|
|
class="form-control <?= isset($validationErrors['fees']) ? 'is-invalid' : '' ?>"
|
|
placeholder="e.g. 500.00">
|
|
<?= 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', $doctor['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', $doctor['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('doctor/dashboard') ?>" class="btn btn-outline-secondary rounded-pill px-4">Back</a>
|
|
<button type="submit" class="btn btn-app-primary px-4">Save changes</button>
|
|
</div>
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|