payment-gateways.phtml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <form method="<?php echo $this->form->getMethod(); ?>" action="<?php echo $this->form->getAction(); ?>" class="form-horizontal">
  2. <?php echo $this->form->hiddenElements; ?>
  3. <div class="table-responsive">
  4. <table class="table">
  5. <thead>
  6. <tr>
  7. <th class="size-small">Payment Gateway</th>
  8. <th>Settings</th>
  9. <th class="size-mini">Site Fees</th>
  10. <th class="size-mini">Direct Payment</th>
  11. </tr>
  12. </thead>
  13. <tbody>
  14. <?php
  15. $checkboxCounter = 0;
  16. foreach ((array) $this->form->getData() as $data) { ?>
  17. <tr>
  18. <td>
  19. <img src="<?php echo $this->baseUrl . $data['logo_path']; ?>" alt="<?php echo $data['name']; ?>">
  20. </td>
  21. <td>
  22. <?php
  23. foreach ($this->formElements as $element) {
  24. if ($element['form_id'] == $data['name']) {
  25. $element = $this->form->getElement($element['id']);
  26. $label = $element->getLabel();
  27. $description = $element->getDescription();
  28. $elementName = $element->getName();
  29. if (isset($data[$elementName])) {
  30. $element->setData($data[$elementName]);
  31. }
  32. $element->setBrackets('[' . $data['id'] . ']')->setMultiple();
  33. echo $this->partial('partials/form-element.phtml', array('element' => $element));
  34. }
  35. } ?>
  36. </td>
  37. <td>
  38. <?php echo $this->form->getElement('site_fees')
  39. ->setData($data['site_fees'])
  40. ->setBrackets('[' . $checkboxCounter . ']')
  41. ->render(); ?>
  42. </td>
  43. <td>
  44. <?php echo $this->form->getElement('direct_payment')
  45. ->setData($data['direct_payment'])
  46. ->setBrackets('[' . $checkboxCounter . ']')
  47. ->render(); ?>
  48. <?php echo $this->form->getElement('id')->setData($data['id'])->render(); ?>
  49. </td>
  50. </tr>
  51. <?php $checkboxCounter ++; ?>
  52. <?php } ?>
  53. <tr>
  54. <td colspan="4"><?php echo $this->form->getElement('submit')->render(); ?></td>
  55. </tr>
  56. </tbody>
  57. </table>
  58. </div>
  59. </form>