<?php require __DIR__ . '/../../layouts/header.php'; ?>

<div class="card p-4">
<h4>Review: <?= htmlspecialchars($submission['title']) ?></h4>

<form method="post" action="<?= base_path('reviewer/review/save') ?>">
<input type="hidden" name="submission_id" value="<?= $submission['id'] ?>">
<input type="hidden" name="round_no" value="<?= $submission['current_round_no'] ?>">

<div class="mb-3">
<label>Score (1-10)</label>
<input type="number" name="score" class="form-control"
value="<?= $review['score'] ?? '' ?>" min="1" max="10">
</div>

<div class="mb-3">
<label>Confidence (1-5)</label>
<input type="number" name="confidence" class="form-control"
value="<?= $review['confidence'] ?? '' ?>" min="1" max="5">
</div>

<div class="mb-3">
<label>Recommendation</label>
<select name="recommendation" class="form-control">
<option value="accept">Accept</option>
<option value="weak_accept">Weak Accept</option>
<option value="borderline">Borderline</option>
<option value="weak_reject">Weak Reject</option>
<option value="reject">Reject</option>
</select>
</div>

<div class="mb-3">
<label>Comments to Author</label>
<textarea name="comments_author" class="form-control"><?= $review['comments_to_author'] ?? '' ?></textarea>
</div>

<div class="mb-3">
<label>Comments to Committee</label>
<textarea name="comments_committee" class="form-control"><?= $review['comments_to_committee'] ?? '' ?></textarea>
</div>

<button type="submit" class="btn btn-secondary">Save Draft</button>
<button type="submit" name="final_submit" class="btn btn-primary">Submit Final Review</button>

</form>
</div>

<?php require __DIR__ . '/../../layouts/footer.php'; ?>
