<?php $title='Add Unit'; ob_start(); ?>
<h3>Add Unit</h3>
<form method="POST" action="/samanta_crm/units">
  <div class="mb-2"><label class="form-label">Code *</label><input name="code" class="form-control form-control-sm" required></div>
  <div class="mb-2"><label class="form-label">Name *</label><input name="name" class="form-control form-control-sm" required></div>
  <div class="mb-2"><label class="form-label">Scope</label>
    <select name="scope" class="form-select form-select-sm">
      <option value="product">Product</option>
      <option value="ingredient">Ingredient</option>
      <option value="both">Both</option>
    </select>
  </div>
  <div class="mb-2"><label class="form-label">Sort Order</label><input name="sort_order" value="0" class="form-control form-control-sm"></div>
  <div class="form-check mb-2"><input type="checkbox" class="form-check-input" id="u_active" name="is_active" checked><label for="u_active" class="form-check-label"><?= __("common.active", "Active") ?></label></div>
  <button class="btn btn-primary"><?= __("common.save", "Save") ?></button> <a class="btn btn-secondary" href="/samanta_crm/units"><?= __("common.cancel", "Cancel") ?></a>
</form>
<?php $content=ob_get_clean(); include '../app/Views/layout.php'; ?>
