1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <form method="<?php echo $this->form->getMethod(); ?>" action="<?php echo $this->form->getAction(); ?>" class="form-horizontal">
- <?php echo $this->form->hiddenElements; ?>
- <div class="table-responsive">
- <table class="table">
- <caption>
- <?php echo function_exists('curl_version') ? '<span class="label label-success">cURL Enabled</span>' : '<span class="label label-warning">cURL Disabled</span>'; ?>
- <?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>'; ?>
- <?php echo class_exists('SOAPClient') ? '<span class="label label-success">SOAPClient Enabled</span>' : '<span class="label label-warning">SOAPClient Disabled</span>'; ?>
- </caption>
- <thead>
- <tr>
- <th class="size-small">Shipping Carrier</th>
- <th>Settings</th>
- <th class="size-mini">Enabled</th>
- </tr>
- </thead>
- <tbody>
- <?php
- $checkboxCounter = 0;
- foreach ((array) $this->form->getData() as $data) { ?>
- <tr>
- <td>
- <img src="<?php echo $this->baseUrl . $data['logo_path']; ?>" alt="<?php echo $data['name']; ?>">
- </td>
- <td>
- <?php
- foreach ($this->formElements as $element) {
- if ($element['form_id'] == $data['name']) {
- $element = $this->form->getElement($element['id']);
- $label = $element->getLabel();
- $description = $element->getDescription();
- $elementName = $element->getName();
- if (isset($data[$elementName])) {
- $element->setData($data[$elementName]);
- }
- $element->setBrackets('[' . $data['id'] . ']')->setMultiple();
- echo $this->partial('partials/form-element.phtml', array('element' => $element));
- }
- }
- echo (isset($this->carrierDescription[$data['name']])) ? '<div>' . $this->carrierDescription[$data['name']] . '</div>' : ''; ?>
- </td>
- <td>
- <?php echo $this->form->getElement('enabled')
- ->setData($data['enabled'])
- ->setBrackets('[' . $checkboxCounter . ']')
- ->render(); ?>
- <?php echo $this->form->getElement('id')->setData($data['id'])->render(); ?>
- </td>
- </tr>
- <?php $checkboxCounter ++; ?>
- <?php } ?>
- <tr>
- <td colspan="4"><?php echo $this->form->getElement('submit')->render(); ?></td>
- </tr>
- </tbody>
- </table>
- </div>
- </form>
|