firm.php 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <?php require_once __DIR__.DIRECTORY_SEPARATOR.'header.php';
  2. if (!$myUser->connected()) header('location: index.php');
  3. if(!$myUser->can('firm','edit')) throw new Exception("Permissions insuffisantes",403);
  4. $firm = Firm::provide();
  5. ?>
  6. <form action="action.php?action=save_firm" id="firmForm" method="POST" enctype="multipart/form-data">
  7. <input id="firm" name="id" type="hidden" value="<?php echo $firm->id; ?>">
  8. <br><h3>Fiche établissement : </h3><br>
  9. <div class="row">
  10. <div class="col">
  11. <label for="label">Libellé : </label>
  12. <input id="label" name="label" class="form-control" placeholder="Nom de la société" value="<?php echo $firm->label; ?>" type="text">
  13. </div>
  14. </div><br>
  15. <div class="row">
  16. <div class="col">
  17. <label for="description">Description : </label>
  18. <input id="description" name="description" class="form-control" placeholder="Description de la société" value="<?php echo $firm->description; ?>" type="text">
  19. </div>
  20. </div><br>
  21. <div class="row">
  22. <div class="col">
  23. <label for="logo">Logo : </label><br/>
  24. <input id="logo" data-type="image" name="logo" class="form-control-file" placeholder="Choisir un logo" value="<?php echo $firm->logo(); ?>" type="file" data-delete="firm_logo_delete(this)" data-default-src="img/default-image.png">
  25. </div>
  26. </div><br>
  27. <div class="row">
  28. <div class="col">
  29. <label for="mail">E-mail : </label>
  30. <input id="mail" name="mail" class="form-control" placeholder="Adresse mail de la société" value="<?php echo $firm->mail; ?>" type="mail">
  31. </div>
  32. </div><br>
  33. <div class="row">
  34. <div class="col">
  35. <label for="phone">Téléphone Fixe : </label>
  36. <input id="phone" name="phone" class="form-control" placeholder="N° téléphone de la société" value="<?php echo $firm->phone; ?>" type="phone">
  37. </div>
  38. </div><br>
  39. <div class="row">
  40. <div class="col">
  41. <label for="fax">Fax : </label>
  42. <input id="fax" name="fax" class="form-control" placeholder="N° fax" value="<?php echo $firm->fax; ?>" type="text">
  43. </div>
  44. </div><br>
  45. <div class="row">
  46. <div class="col">
  47. <label for="street">Adresse : </label>
  48. <input id="street" name="street" class="form-control" placeholder="Adresse" value="<?php echo $firm->street; ?>" type="text">
  49. </div>
  50. </div><br>
  51. <div class="row">
  52. <div class="col">
  53. <label for="street2">Adresse (Complément) : </label>
  54. <input id="street2" name="street2" class="form-control" placeholder="Adresse (Complément)" value="<?php echo $firm->street2; ?>" type="text">
  55. </div>
  56. </div><br>
  57. <div class="row">
  58. <div class="col">
  59. <label for="zipcode">Code postal : </label>
  60. <input id="zipcode" name="zipcode" class="form-control" placeholder="Code postal" value="<?php echo $firm->zipcode; ?>" type="text">
  61. </div>
  62. </div><br>
  63. <div class="row">
  64. <div class="col">
  65. <label for="city">Ville : </label>
  66. <input id="city" name="city" class="form-control" placeholder="Nom de ville" value="<?php echo $firm->city; ?>" type="text">
  67. </div>
  68. </div><br>
  69. <div class="row">
  70. <div class="col">
  71. <label for="siret">N° Siret : </label>
  72. <input id="siret" name="siret" class="form-control" placeholder="N° Siret" value="<?php echo $firm->siret; ?>" type="text">
  73. </div>
  74. </div><br>
  75. <div class="row">
  76. <div class="col">
  77. <label for="iban">N° Iban : </label>
  78. <input id="iban" name="iban" class="form-control" placeholder="N° Iban" value="<?php echo $firm->iban; ?>" type="text">
  79. </div>
  80. </div>
  81. <hr/>
  82. <div class="row">
  83. <div class="col text-center">
  84. <div class="btn btn-success" onclick="$(this).closest('form').submit()"><i class="fas fa-check"></i> Enregistrer</div>
  85. </div>
  86. </div>
  87. </form>
  88. <br>
  89. <?php require_once __ROOT__.'footer.php' ?>