<?php
$title = "Edit Review Criterion";
?>

<div class="card">

<div class="card-header">
<h3>Edit Review Criterion</h3>
</div>

<div class="card-body">

<form method="post"
      action="/easychair/admin/review-form/save">

<input type="hidden"
       name="id"
       value="<?= (int)$criterion['id'] ?>">

<div class="mb-3">

<label>
Arabic Label
</label>

<input type="text"
       name="title_ar"
       class="form-control"
       value="<?= htmlspecialchars($criterion['title_ar'] ?? '') ?>"
       required>

</div>

<div class="mb-3">

<label>
English Label
</label>

<input type="text"
       name="title_en"
       class="form-control"
       value="<?= htmlspecialchars($criterion['title_en'] ?? '') ?>"
       required>

</div>

<div class="mb-3">

<label>
Description Arabic
</label>

<textarea name="description_ar"
          class="form-control"
          rows="3"><?= htmlspecialchars($criterion['description_ar'] ?? '') ?></textarea>

</div>

<div class="mb-3">

<label>
Description English
</label>

<textarea name="description_en"
          class="form-control"
          rows="3"><?= htmlspecialchars($criterion['description_en'] ?? '') ?></textarea>

</div>

<div class="mb-3">

<label>
Max Score
</label>

<input type="number"
       name="max_score"
       class="form-control"
       value="<?= htmlspecialchars($criterion['max_score'] ?? '') ?>"
       required>

</div>

<div class="mb-3">

<label>
Weight
</label>

<input type="number"
       step="0.01"
       name="weight"
       class="form-control"
       value="<?= htmlspecialchars($criterion['weight'] ?? '') ?>"
       required>

</div>

<div class="mb-3">

<label>
Sort Order
</label>

<input type="number"
       name="sort_order"
       class="form-control"
       value="<?= htmlspecialchars($criterion['sort_order'] ?? '') ?>">

</div>

<button type="submit"
        class="btn btn-success">

Save

</button>

<a href="/easychair/admin/review-form"
   class="btn btn-secondary">

Cancel

</a>

</form>

</div>

</div>
