<h2>Conference Role Assignment</h2>

<form method="post" action="<?= base_path('admin/roles/assign') ?>">
    <input type="hidden" name="conference_id" value="<?= e($conference_id) ?>">

    <select name="user_id" required>
        <option value="">Select User</option>
        <?php foreach ($users as $u): ?>
            <option value="<?= e($u['id']) ?>">
                <?= e($u['first_name'].' '.$u['last_name'].' ('.$u['email'].')') ?>
            </option>
        <?php endforeach; ?>
    </select>

    <select name="role_code" required>
        <option value="">Select Role</option>
        <option value="chair">Chair</option>
        <option value="tpc">TPC</option>
        <option value="reviewer">Reviewer</option>
        <option value="committee">Committee</option>
        <option value="proofreader">Proofreader</option>
        <option value="production_editor">Production Editor</option>
    </select>

    <button type="submit">Assign</button>
</form>

<hr>

<h3>Current Assignments</h3>

<table border="1" cellpadding="8">
<tr>
    <th>User ID</th>
    <th>Role</th>
</tr>

<?php foreach ($assignments as $a): ?>
<tr>
    <td><?= e($a['user_id']) ?></td>
    <td><?= e($a['role_code']) ?></td>
</tr>
<?php endforeach; ?>

</table>
