@@ -164,12 +164,12 @@ |
||
| 164 | 164 | <li><a href ='' onclick='inji.Ui.dataManagers.get(this).rowSelection("inverse");return false;'>Инвертировать</a></li> |
| 165 | 165 | <li role="separator" class="divider"></li> |
| 166 | 166 | <?php |
| 167 | - foreach ($actions as $action => $actionParams) { |
|
| 168 | - if (class_exists($actionParams['className']) && $actionParams['className']::$groupAction) { |
|
| 169 | - echo "<li><a href ='' onclick='inji.Ui.dataManagers.get(this).groupAction(\"" . str_replace('\\', '\\\\', $action) . "\");return false;'>{$actionParams['className']::$name}</a></li>"; |
|
| 170 | - } |
|
| 171 | - } |
|
| 172 | - ?> |
|
| 167 | + foreach ($actions as $action => $actionParams) { |
|
| 168 | + if (class_exists($actionParams['className']) && $actionParams['className']::$groupAction) { |
|
| 169 | + echo "<li><a href ='' onclick='inji.Ui.dataManagers.get(this).groupAction(\"" . str_replace('\\', '\\\\', $action) . "\");return false;'>{$actionParams['className']::$name}</a></li>"; |
|
| 170 | + } |
|
| 171 | + } |
|
| 172 | + ?> |
|
| 173 | 173 | </ul> |
| 174 | 174 | </div> |
| 175 | 175 | <?php |
@@ -23,17 +23,17 @@ |
||
| 23 | 23 | ?> |
| 24 | 24 | <ul class="treeview" data-col='tree_path'> |
| 25 | 25 | <?php |
| 26 | - if (is_string($objectRoot)) { |
|
| 27 | - $items = $objectRoot::getList(['where' => ['parent_id', 0]]); |
|
| 28 | - } else { |
|
| 29 | - $class = get_class($objectRoot); |
|
| 30 | - $items = $class::getList(['where' => ['parent_id', $objectRoot->pk()]]); |
|
| 31 | - } |
|
| 32 | - $count += count($items); |
|
| 33 | - foreach ($items as $objectChild) { |
|
| 34 | - $count+=static::showLi($objectChild, 1, $maxDeep, $hrefFunc); |
|
| 35 | - } |
|
| 36 | - ?> |
|
| 26 | + if (is_string($objectRoot)) { |
|
| 27 | + $items = $objectRoot::getList(['where' => ['parent_id', 0]]); |
|
| 28 | + } else { |
|
| 29 | + $class = get_class($objectRoot); |
|
| 30 | + $items = $class::getList(['where' => ['parent_id', $objectRoot->pk()]]); |
|
| 31 | + } |
|
| 32 | + $count += count($items); |
|
| 33 | + foreach ($items as $objectChild) { |
|
| 34 | + $count+=static::showLi($objectChild, 1, $maxDeep, $hrefFunc); |
|
| 35 | + } |
|
| 36 | + ?> |
|
| 37 | 37 | </ul> |
| 38 | 38 | <?php |
| 39 | 39 | return $count; |
@@ -61,12 +61,12 @@ discard block |
||
| 61 | 61 | </div> |
| 62 | 62 | </div> |
| 63 | 63 | <?php |
| 64 | - $packchecked = ''; |
|
| 65 | - $packItem = false; |
|
| 66 | - $packSum = 0; |
|
| 67 | - if ($packItem) { |
|
| 68 | - $packchecked = ((!empty($_POST) && empty($_POST['packs']))) ? '' : 'checked'; |
|
| 69 | - ?> |
|
| 64 | + $packchecked = ''; |
|
| 65 | + $packItem = false; |
|
| 66 | + $packSum = 0; |
|
| 67 | + if ($packItem) { |
|
| 68 | + $packchecked = ((!empty($_POST) && empty($_POST['packs']))) ? '' : 'checked'; |
|
| 69 | + ?> |
|
| 70 | 70 | <fieldset id="additional"> |
| 71 | 71 | <h2 class="secondary-title">Дополнительно</h2> |
| 72 | 72 | <div class=" checkout-payment-form"> |
@@ -89,8 +89,8 @@ discard block |
||
| 89 | 89 | </div> |
| 90 | 90 | </fieldset> |
| 91 | 91 | <?php |
| 92 | - } |
|
| 93 | - ?> |
|
| 92 | + } |
|
| 93 | + ?> |
|
| 94 | 94 | </div> |
| 95 | 95 | </div> |
| 96 | 96 | <div class="col-sm-8"> |
@@ -115,24 +115,24 @@ discard block |
||
| 115 | 115 | <div class="col-md-4"> |
| 116 | 116 | <ul class="nav nav-pills nav-stacked"> |
| 117 | 117 | <?php |
| 118 | - $hiddenId = Tools::randomString(); |
|
| 119 | - foreach ($payTypes as $payType) { |
|
| 120 | - if ((!empty($_POST['payType']) && $_POST['payType'] == $payType->id) || $payType->id == $cartPayType->id) { |
|
| 121 | - $checked = 'checked'; |
|
| 122 | - } else { |
|
| 123 | - $checked = ''; |
|
| 124 | - } |
|
| 125 | - echo '<li' . ($checked ? ' class="active"' : '') . '><a href = "#" onclick = "document.getElementById(\'' . $hiddenId . '\').value=\'' . $payType->id . '\';inji.Ecommerce.Cart.calcSum();return false;">'; |
|
| 126 | - echo $payType->name; |
|
| 127 | - echo '</a></li>'; |
|
| 128 | - } |
|
| 129 | - $form->input('hidden', "payType", '', [ |
|
| 130 | - 'value' => $cartPayType->id, |
|
| 131 | - 'attributes' => [ |
|
| 132 | - 'id' => $hiddenId |
|
| 133 | - ], |
|
| 134 | - ]); |
|
| 135 | - ?> |
|
| 118 | + $hiddenId = Tools::randomString(); |
|
| 119 | + foreach ($payTypes as $payType) { |
|
| 120 | + if ((!empty($_POST['payType']) && $_POST['payType'] == $payType->id) || $payType->id == $cartPayType->id) { |
|
| 121 | + $checked = 'checked'; |
|
| 122 | + } else { |
|
| 123 | + $checked = ''; |
|
| 124 | + } |
|
| 125 | + echo '<li' . ($checked ? ' class="active"' : '') . '><a href = "#" onclick = "document.getElementById(\'' . $hiddenId . '\').value=\'' . $payType->id . '\';inji.Ecommerce.Cart.calcSum();return false;">'; |
|
| 126 | + echo $payType->name; |
|
| 127 | + echo '</a></li>'; |
|
| 128 | + } |
|
| 129 | + $form->input('hidden', "payType", '', [ |
|
| 130 | + 'value' => $cartPayType->id, |
|
| 131 | + 'attributes' => [ |
|
| 132 | + 'id' => $hiddenId |
|
| 133 | + ], |
|
| 134 | + ]); |
|
| 135 | + ?> |
|
| 136 | 136 | </ul> |
| 137 | 137 | </div> |
| 138 | 138 | <div class="col-md-8"> |
@@ -2,24 +2,24 @@ |
||
| 2 | 2 | <div class="col-md-4"> |
| 3 | 3 | <ul class="nav nav-pills nav-stacked"> |
| 4 | 4 | <?php |
| 5 | - $hiddenId = Tools::randomString(); |
|
| 6 | - foreach ($deliverys as $delivery) {
|
|
| 7 | - if ((!empty($_POST['delivery']) && $_POST['delivery'] == $delivery->id) || $delivery->id == $cartDelivery->id) {
|
|
| 8 | - $checked = 'checked'; |
|
| 9 | - } else {
|
|
| 10 | - $checked = ''; |
|
| 11 | - } |
|
| 12 | - echo '<li' . ($checked ? ' class="active"' : '') . '><a href = "#" onclick = "document.getElementById(\'' . $hiddenId . '\').value=\'' . $delivery->id . '\';inji.Ecommerce.Cart.calcSum();return false;">'; |
|
| 13 | - echo $delivery->name; |
|
| 14 | - echo '</a></li>'; |
|
| 15 | - } |
|
| 16 | - $form->input('hidden', "delivery", '', [
|
|
| 17 | - 'value' => $cartDelivery->id, |
|
| 18 | - 'attributes' => [ |
|
| 19 | - 'id' => $hiddenId |
|
| 20 | - ], |
|
| 21 | - ]); |
|
| 22 | - ?> |
|
| 5 | + $hiddenId = Tools::randomString(); |
|
| 6 | + foreach ($deliverys as $delivery) {
|
|
| 7 | + if ((!empty($_POST['delivery']) && $_POST['delivery'] == $delivery->id) || $delivery->id == $cartDelivery->id) {
|
|
| 8 | + $checked = 'checked'; |
|
| 9 | + } else {
|
|
| 10 | + $checked = ''; |
|
| 11 | + } |
|
| 12 | + echo '<li' . ($checked ? ' class="active"' : '') . '><a href = "#" onclick = "document.getElementById(\'' . $hiddenId . '\').value=\'' . $delivery->id . '\';inji.Ecommerce.Cart.calcSum();return false;">'; |
|
| 13 | + echo $delivery->name; |
|
| 14 | + echo '</a></li>'; |
|
| 15 | + } |
|
| 16 | + $form->input('hidden', "delivery", '', [
|
|
| 17 | + 'value' => $cartDelivery->id, |
|
| 18 | + 'attributes' => [ |
|
| 19 | + 'id' => $hiddenId |
|
| 20 | + ], |
|
| 21 | + ]); |
|
| 22 | + ?> |
|
| 23 | 23 | </ul> |
| 24 | 24 | </div> |
| 25 | 25 | <div class="col-md-8"> |
@@ -1,16 +1,16 @@ discard block |
||
| 1 | 1 | <fieldset> |
| 2 | 2 | <?php |
| 3 | - if (\Users\User::$cur->id) { |
|
| 4 | - $userAdds = Ecommerce\UserAdds::getList(['where' => ['user_id', \Users\User::$cur->id]]); |
|
| 5 | - $values = []; |
|
| 6 | - foreach ($userAdds as $userAdd) { |
|
| 7 | - $values[$userAdd->id] = $userAdd->values(['array' => true]); |
|
| 8 | - } |
|
| 9 | - if ($userAdds) { |
|
| 10 | - $form->input('select', 'userAddsId', 'Ваши контакты', ['values' => ['' => 'Выберите'] + Ecommerce\UserAdds::getList(['where' => ['user_id', \Users\User::$cur->id], 'forSelect' => true])]); |
|
| 11 | - echo '<hr />'; |
|
| 12 | - } |
|
| 13 | - ?> |
|
| 3 | + if (\Users\User::$cur->id) { |
|
| 4 | + $userAdds = Ecommerce\UserAdds::getList(['where' => ['user_id', \Users\User::$cur->id]]); |
|
| 5 | + $values = []; |
|
| 6 | + foreach ($userAdds as $userAdd) { |
|
| 7 | + $values[$userAdd->id] = $userAdd->values(['array' => true]); |
|
| 8 | + } |
|
| 9 | + if ($userAdds) { |
|
| 10 | + $form->input('select', 'userAddsId', 'Ваши контакты', ['values' => ['' => 'Выберите'] + Ecommerce\UserAdds::getList(['where' => ['user_id', \Users\User::$cur->id], 'forSelect' => true])]); |
|
| 11 | + echo '<hr />'; |
|
| 12 | + } |
|
| 13 | + ?> |
|
| 14 | 14 | <script> |
| 15 | 15 | var userAddsValues = <?= json_encode($values); ?>; |
| 16 | 16 | inji.onLoad(function () { |
@@ -24,9 +24,9 @@ discard block |
||
| 24 | 24 | }) |
| 25 | 25 | </script> |
| 26 | 26 | <?php |
| 27 | - } |
|
| 28 | - foreach (Ecommerce\UserAdds\Field::getList(['order' => ['weight', 'asc']]) as $field) { |
|
| 29 | - $form->input($field->type, "userAdds[fields][{$field->id}]", $field->name, ['required' => $field->required]); |
|
| 30 | - } |
|
| 31 | - ?> |
|
| 27 | + } |
|
| 28 | + foreach (Ecommerce\UserAdds\Field::getList(['order' => ['weight', 'asc']]) as $field) { |
|
| 29 | + $form->input($field->type, "userAdds[fields][{$field->id}]", $field->name, ['required' => $field->required]); |
|
| 30 | + } |
|
| 31 | + ?> |
|
| 32 | 32 | </fieldset> |
| 33 | 33 | \ No newline at end of file |
@@ -1,12 +1,12 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Menu module |
|
| 4 | - * |
|
| 5 | - * @author Alexey Krupskiy <[email protected]> |
|
| 6 | - * @link http://inji.ru/ |
|
| 7 | - * @copyright 2015 Alexey Krupskiy |
|
| 8 | - * @license https://github.com/injitools/cms-Inji/blob/master/LICENSE |
|
| 9 | - */ |
|
| 3 | + * Menu module |
|
| 4 | + * |
|
| 5 | + * @author Alexey Krupskiy <[email protected]> |
|
| 6 | + * @link http://inji.ru/ |
|
| 7 | + * @copyright 2015 Alexey Krupskiy |
|
| 8 | + * @license https://github.com/injitools/cms-Inji/blob/master/LICENSE |
|
| 9 | + */ |
|
| 10 | 10 | class Menu extends Module |
| 11 | 11 | { |
| 12 | 12 | |
@@ -1,12 +1,12 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Recaptcha admin controller |
|
| 4 | - * |
|
| 5 | - * @author Alexey Krupskiy <[email protected]> |
|
| 6 | - * @link http://inji.ru/ |
|
| 7 | - * @copyright 2015 Alexey Krupskiy |
|
| 8 | - * @license https://github.com/injitools/cms-Inji/blob/master/LICENSE |
|
| 9 | - */ |
|
| 3 | + * Recaptcha admin controller |
|
| 4 | + * |
|
| 5 | + * @author Alexey Krupskiy <[email protected]> |
|
| 6 | + * @link http://inji.ru/ |
|
| 7 | + * @copyright 2015 Alexey Krupskiy |
|
| 8 | + * @license https://github.com/injitools/cms-Inji/blob/master/LICENSE |
|
| 9 | + */ |
|
| 10 | 10 | class RecaptchaController extends Controller |
| 11 | 11 | { |
| 12 | 12 | public function indexAction() |
@@ -1,14 +1,14 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Item name |
|
| 4 | - * |
|
| 5 | - * Info |
|
| 6 | - * |
|
| 7 | - * @author Alexey Krupskiy <[email protected]> |
|
| 8 | - * @link http://inji.ru/ |
|
| 9 | - * @copyright 2016 Alexey Krupskiy |
|
| 10 | - * @license https://github.com/injitools/cms-Inji/blob/master/LICENSE |
|
| 11 | - */ |
|
| 3 | + * Item name |
|
| 4 | + * |
|
| 5 | + * Info |
|
| 6 | + * |
|
| 7 | + * @author Alexey Krupskiy <[email protected]> |
|
| 8 | + * @link http://inji.ru/ |
|
| 9 | + * @copyright 2016 Alexey Krupskiy |
|
| 10 | + * @license https://github.com/injitools/cms-Inji/blob/master/LICENSE |
|
| 11 | + */ |
|
| 12 | 12 | |
| 13 | 13 | namespace Money; |
| 14 | 14 | |
@@ -17,30 +17,30 @@ discard block |
||
| 17 | 17 | ?> |
| 18 | 18 | <div class="filter"> |
| 19 | 19 | <?php |
| 20 | - switch ($option->type) { |
|
| 21 | - case 'radio': |
|
| 20 | + switch ($option->type) { |
|
| 21 | + case 'radio': |
|
| 22 | 22 | foreach ($option->items as $item) { |
| 23 | - $this->widget('Ui\Form/' . $option->type, [ |
|
| 24 | - 'label' => $item->name, |
|
| 25 | - 'name' => "filters[options][{$option->id}]", |
|
| 26 | - !empty($_GET['filters']['options'][$option->id]) && $_GET['filters']['options'][$option->id] == $item->id ? 'checked' : false, |
|
| 27 | - 'options' => [ |
|
| 28 | - 'value' => $item->id, |
|
| 29 | - ] |
|
| 30 | - ]); |
|
| 31 | - } |
|
| 32 | - break; |
|
| 33 | - default: |
|
| 23 | + $this->widget('Ui\Form/' . $option->type, [ |
|
| 24 | + 'label' => $item->name, |
|
| 25 | + 'name' => "filters[options][{$option->id}]", |
|
| 26 | + !empty($_GET['filters']['options'][$option->id]) && $_GET['filters']['options'][$option->id] == $item->id ? 'checked' : false, |
|
| 27 | + 'options' => [ |
|
| 28 | + 'value' => $item->id, |
|
| 29 | + ] |
|
| 30 | + ]); |
|
| 31 | + } |
|
| 32 | + break; |
|
| 33 | + default: |
|
| 34 | 34 | $this->widget('Ui\Form/' . $option->type, [ |
| 35 | - 'label' => $option->name, |
|
| 36 | - 'name' => "filters[options][{$option->id}]", |
|
| 37 | - 'options' => [ |
|
| 38 | - 'value' => !empty($_GET['filters']['options'][$option->id]) ? $_GET['filters']['options'][$option->id] : '', |
|
| 39 | - ] |
|
| 40 | - ]); |
|
| 41 | - } |
|
| 42 | - foreach ($option->items as $item) { |
|
| 43 | - ?> |
|
| 35 | + 'label' => $option->name, |
|
| 36 | + 'name' => "filters[options][{$option->id}]", |
|
| 37 | + 'options' => [ |
|
| 38 | + 'value' => !empty($_GET['filters']['options'][$option->id]) ? $_GET['filters']['options'][$option->id] : '', |
|
| 39 | + ] |
|
| 40 | + ]); |
|
| 41 | + } |
|
| 42 | + foreach ($option->items as $item) { |
|
| 43 | + ?> |
|
| 44 | 44 | <div class="radio"> |
| 45 | 45 | <label> |
| 46 | 46 | <input type="radio" name = 'filters[options][<?= $option->id; ?>]' value ="<?= $item->id; ?>" <?= !empty($_GET['filters']['options'][$option->id]) && $_GET['filters']['options'][$option->id] == $item->id ? 'checked' : ''; ?>> |
@@ -48,8 +48,8 @@ discard block |
||
| 48 | 48 | </label> |
| 49 | 49 | </div> |
| 50 | 50 | <?php |
| 51 | - } |
|
| 52 | - ?> |
|
| 51 | + } |
|
| 52 | + ?> |
|
| 53 | 53 | </div> |
| 54 | 54 | <?php |
| 55 | 55 | } |