fees-tiers.phtml 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <?php
  2. /**
  3. * @version 7.8
  4. */
  5. ?>
  6. <form method="<?php echo $this->form->getMethod(); ?>" action="<?php echo $this->form->getAction(); ?>"
  7. class="form-horizontal">
  8. <?php
  9. echo $this->form->hiddenElements;
  10. /** @var \Cube\Form\Element $element */
  11. $element = $this->form->getElement('category_id');
  12. if (!$element->isHidden()) {
  13. echo $this->partial('partials/form-element.phtml', array('element' => $element));
  14. }
  15. if ($feeName == 'sale') {
  16. $element = $this->form->getElement('sale_fee_payer');
  17. $element->setValue($this->settings['sale_fee_payer']);
  18. if (!$element->isHidden()) {
  19. echo $this->partial('partials/form-element.phtml', array('element' => $element));
  20. }
  21. } ?>
  22. <div class="table-responsive">
  23. <table class="table table-striped table-hover">
  24. <thead>
  25. <tr>
  26. <th class="size-mini"><?php echo $this->translate('Fee Amount'); ?></th>
  27. <th class="size-small"><?php echo $this->translate('Calculation Type'); ?></th>
  28. <th><?php echo $this->translate('Range [ From (>=) - To (<) ]'); ?></th>
  29. <th class="size-mini"><?php echo $this->translate('Delete'); ?></th>
  30. </tr>
  31. </thead>
  32. <tbody>
  33. <?php
  34. foreach ($this->form->getData() as $data) {
  35. if (array_key_exists('amount', (array)$data)) {
  36. ?>
  37. <tr>
  38. <td>
  39. <?php echo $this->form->getElement('amount')->setData($data['amount']); ?>
  40. </td>
  41. <td>
  42. <?php echo $this->form->getElement('calculation_type')->setData($data['calculation_type']); ?>
  43. </td>
  44. <td>
  45. <?php echo $this->form->getElement('tier_from')->setData($data['tier_from']); ?>
  46. -
  47. <?php echo $this->form->getElement('tier_to')->setData($data['tier_to']); ?>
  48. </td>
  49. <td>
  50. <?php echo $this->form->getElement('id')->setData($data['id']); ?>
  51. <?php echo $this->form->getElement('delete')->setMultiOptions(array($data['id'] => null)); ?>
  52. </td>
  53. </tr>
  54. <?php
  55. }
  56. } ?>
  57. <tr>
  58. <th colspan="4"><?php echo $this->translate('Insert New Fee Tier'); ?></th>
  59. </tr>
  60. <tr>
  61. <td>
  62. <?php echo $this->form->getElement('amount')->clearData(); ?>
  63. </td>
  64. <td>
  65. <?php echo $this->form->getElement('calculation_type')->clearData(); ?>
  66. </td>
  67. <td>
  68. <?php echo $this->form->getElement('tier_from')->clearData(); ?>
  69. -
  70. <?php echo $this->form->getElement('tier_to')->clearData(); ?>
  71. </td>
  72. <td>
  73. <?php echo $this->form->getElement('id')->clearData(); ?>
  74. </td>
  75. </tr>
  76. <tr>
  77. <td colspan="4"><?php echo $this->form->submit; ?></td>
  78. </tr>
  79. </tbody>
  80. </table>
  81. </div>
  82. </form>