<?php $title='Edit Production Site'; ob_start(); ?>
<h3>Edit Production Site</h3>
<form method="POST" action="/samanta_crm/production-sites/<?= $site['id'] ?>/update">
  <div class="mb-2"><label class="form-label">Code *</label><input name="code" value="<?= htmlspecialchars($site['code']) ?>" class="form-control form-control-sm" required></div>
  <div class="mb-2"><label class="form-label">Name *</label><input name="name" value="<?= htmlspecialchars($site['name']) ?>" class="form-control form-control-sm" required></div>
  <div class="mb-2"><label class="form-label">Description</label><textarea name="description" class="form-control form-control-sm" rows="2"><?= htmlspecialchars($site['description'] ?? '') ?></textarea></div>
  <div class="mb-2"><label class="form-label">Sort Order</label><input name="sort_order" value="<?= htmlspecialchars($site['sort_order']) ?>" class="form-control form-control-sm"></div>
  <div class="form-check mb-2"><input type="checkbox" class="form-check-input" id="ps_active" name="is_active" <?= $site['is_active']?'checked':'' ?>><label for="ps_active" class="form-check-label"><?= __("common.active", "Active") ?></label></div>
  <button class="btn btn-primary"><?= __("common.update", "Update") ?></button> <a class="btn btn-secondary" href="/samanta_crm/production-sites"><?= __("common.cancel", "Cancel") ?></a>
</form>
<?php $content=ob_get_clean(); include '../app/Views/layout.php'; ?>
