card_edit.tpl.php 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <?php
  2. /* Copyright (C) 2010-2018 Regis Houssin <regis.houssin@inodbox.com>
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 3 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  16. */
  17. // Protection to avoid direct call of template
  18. if (empty($conf) || !is_object($conf)) {
  19. print "Error, template page can't be called as URL";
  20. exit;
  21. }
  22. $object = $GLOBALS['object'];
  23. $statutarray = array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOnSell"));
  24. ?>
  25. <!-- BEGIN PHP TEMPLATE EDIT.TPL -->
  26. <?php
  27. $head = product_prepare_head($object);
  28. $titre = $langs->trans("CardProduct".$object->type);
  29. print dol_get_fiche_head($head, 'card', $titre, 0, 'service');
  30. dol_htmloutput_errors($object->error, $object->errors);
  31. ?>
  32. <form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="post">
  33. <input type="hidden" name="token" value="<?php echo newToken(); ?>">
  34. <input type="hidden" name="action" value="update">
  35. <input type="hidden" name="id" value="<?php echo $object->id; ?>">
  36. <input type="hidden" name="canvas" value="<?php echo $object->canvas; ?>">
  37. <table class="border allwidth">
  38. <tr>
  39. <td class="fieldrequired" width="20%"><?php echo $langs->trans("Ref"); ?></td>
  40. <td><input name="ref" size="40" maxlength="32" value="<?php echo $object->ref; ?>">
  41. </td></tr>
  42. <tr>
  43. <td class="fieldrequired"><?php echo $langs->trans("Label"); ?></td>
  44. <td><input name="label" size="40" value="<?php echo $object->label; ?>"></td>
  45. </tr>
  46. <tr>
  47. <td class="fieldrequired"><?php echo $langs->trans("Status").' ('.$langs->trans("Sell").')'; ?></td>
  48. <td><?php echo $form->selectarray('statut', $statutarray, $object->status); ?></td>
  49. </tr>
  50. <tr>
  51. <td class="fieldrequired"><?php echo $langs->trans("Status").' ('.$langs->trans("Buy").')'; ?></td>
  52. <td><?php echo $form->selectarray('statut_buy', $statutarray, $object->status_buy); ?></td>
  53. </tr>
  54. <tr><td><?php echo $langs->trans("Duration"); ?></td>
  55. <td><input name="duration_value" size="6" maxlength="5" value="<?php echo $object->duration_value; ?>"> &nbsp;
  56. <?php echo $object->duration_unit; ?>
  57. </td></tr>
  58. <tr><td class="tdtop"><?php echo $langs->trans("NoteNotVisibleOnBill"); ?></td><td>
  59. <?php echo $object->textarea_note; ?>
  60. </td></tr>
  61. </table>
  62. <br>
  63. <div align="center"><input type="submit" class="button button-save" value="<?php echo $langs->trans("Save"); ?>"> &nbsp; &nbsp;
  64. <input type="submit" class="button button-cancel" name="cancel" value="<?php echo $langs->trans("Cancel"); ?>"></div>
  65. </form>
  66. <!-- END PHP TEMPLATE -->