shipping-carriers.phtml 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. <caption>
  6. <?php echo function_exists('curl_version') ? '<span class="label label-success">cURL Enabled</span>' : '<span class="label label-warning">cURL Disabled</span>'; ?>
  7. <?php echo ini_get('allow_url_fopen') ? '<span class="label label-success">allow_url_fopen Enabled</span>' : '<span class="label label-warning">allow_url_fopen Disabled</span>'; ?>
  8. <?php echo class_exists('SOAPClient') ? '<span class="label label-success">SOAPClient Enabled</span>' : '<span class="label label-warning">SOAPClient Disabled</span>'; ?>
  9. </caption>
  10. <thead>
  11. <tr>
  12. <th class="size-small">Shipping Carrier</th>
  13. <th>Settings</th>
  14. <th class="size-mini">Enabled</th>
  15. </tr>
  16. </thead>
  17. <tbody>
  18. <?php
  19. $checkboxCounter = 0;
  20. foreach ((array) $this->form->getData() as $data) { ?>
  21. <tr>
  22. <td>
  23. <img src="<?php echo $this->baseUrl . $data['logo_path']; ?>" alt="<?php echo $data['name']; ?>">
  24. </td>
  25. <td>
  26. <?php
  27. foreach ($this->formElements as $element) {
  28. if ($element['form_id'] == $data['name']) {
  29. $element = $this->form->getElement($element['id']);
  30. $label = $element->getLabel();
  31. $description = $element->getDescription();
  32. $elementName = $element->getName();
  33. if (isset($data[$elementName])) {
  34. $element->setData($data[$elementName]);
  35. }
  36. $element->setBrackets('[' . $data['id'] . ']')->setMultiple();
  37. echo $this->partial('partials/form-element.phtml', array('element' => $element));
  38. }
  39. }
  40. echo (isset($this->carrierDescription[$data['name']])) ? '<div>' . $this->carrierDescription[$data['name']] . '</div>' : ''; ?>
  41. </td>
  42. <td>
  43. <?php echo $this->form->getElement('enabled')
  44. ->setData($data['enabled'])
  45. ->setBrackets('[' . $checkboxCounter . ']')
  46. ->render(); ?>
  47. <?php echo $this->form->getElement('id')->setData($data['id'])->render(); ?>
  48. </td>
  49. </tr>
  50. <?php $checkboxCounter ++; ?>
  51. <?php } ?>
  52. <tr>
  53. <td colspan="4"><?php echo $this->form->getElement('submit')->render(); ?></td>
  54. </tr>
  55. </tbody>
  56. </table>
  57. </div>
  58. </form>