<div class="header">
    <h1>Edit driver</h1>
</div>
<?php if (session('error')): ?>
<p class="error"><?= esc(session('error')) ?></p>
<?php endif ?>
<p>Driver: <?= esc($driver->phone) ?></p>
<form method="post" action="<?= base_url('admin/drivers/update/' . $driver->id) ?>">
    <input type="hidden" name="<?= csrf_token() ?>" value="<?= csrf_hash() ?>">
    <p>
        <label>Name (shown to customers)</label><br>
        <input type="text" name="display_name" value="<?= esc($driver->display_name ?? '') ?>" placeholder="e.g. John M." required style="max-width: 300px;">
    </p>
    <p>
        <button type="submit" class="btn btn-primary">Save</button>
        <a href="<?= base_url('admin/drivers') ?>" class="btn btn-secondary">Cancel</a>
    </p>
</form>
