Copybara bot | be50d49 | 2023-11-30 00:16:42 +0100 | [diff] [blame] | 1 | <?php |
| 2 | require_once(__DIR__."/../core.php"); |
| 3 | security::checkType(security::ADMIN, security::METHOD_NOTFOUND); |
| 4 | |
| 5 | if (!isset($_GET["id"])) { |
| 6 | security::notFound(); |
| 7 | } |
| 8 | |
| 9 | $c = companies::get($_GET["id"]); |
| 10 | |
| 11 | if ($c === false) { |
| 12 | security::notFound(); |
| 13 | } |
| 14 | ?> |
| 15 | |
| 16 | <form action="doeditcompany.php" method="POST" autocomplete="off"> |
| 17 | <h4 class="mdl-dialog__title">Editar empresa</h4> |
| 18 | <div class="mdl-dialog__content"> |
| 19 | <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label"> |
| 20 | <input class="mdl-textfield__input" type="text" name="id" id="edit_id" value="<?=security::htmlsafe($c['id'])?>" readonly="readonly" autocomplete="off"> |
| 21 | <label class="mdl-textfield__label" for="edit_nombre">ID</label> |
| 22 | </div> |
| 23 | <br> |
| 24 | <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label"> |
| 25 | <input class="mdl-textfield__input" type="text" name="name" id="edit_name" value="<?=security::htmlsafe($c['name'])?>" autocomplete="off" data-required> |
| 26 | <label class="mdl-textfield__label" for="edit_name">Nombre de la empresa</label> |
| 27 | </div> |
| 28 | <br> |
| 29 | <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label"> |
| 30 | <input class="mdl-textfield__input" type="text" name="cif" id="edit_cif" value="<?=security::htmlsafe($c['cif'])?>" autocomplete="off"> |
| 31 | <label class="mdl-textfield__label" for="edit_cif">CIF (opcional)</label> |
| 32 | </div> |
| 33 | </div> |
| 34 | <div class="mdl-dialog__actions"> |
| 35 | <button type="submit" class="mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--accent">Confirmar</button> |
| 36 | <button data-dyndialog-close class="mdl-button mdl-js-button mdl-js-ripple-effect cancel">Cancelar</button> |
| 37 | </div> |
| 38 | </form> |