<form class="ps-2" action="" method="post" onsubmit="javascript:traitForm();return false;">
  <button type="button" class="btn btn-sm btn-secondary icon-arrow-left mx-1 mb-3" onclick="javascript:liste();"> Retour à la liste</button>
  <button type="submit" class="btn btn-sm btn-primary icon-floppy-disk mx-1 mb-3"> Enregistrer les modifications</button>
  <?php if ($ville['id']>0): ?>
    Ville n°<b><?=$ville['id'];?></b>
  <?php else: ?>
    Nouvelle ville
  <?php endif; ?>
  <input type="hidden" name="action" id="action" value="save">
  <input type="hidden" name="id" id="id" value="<?=$ville['id'];?>">
  <div class="">
    <label for="cp" class="form-label">Code postal</label>
    <input type="text" name="cp" id="cp" class="form-control form-control-sm" value="<?=$ville['cp'];?>">
  </div>
  <div class="">
    <label for="libel" class="form-label">Nom</label>
    <input type="text" name="libel" id="libel" class="form-control form-control-sm" value="<?=$ville['libel'];?>">
  </div>
</form>
