Commit 6a42c489afb6610011f22276324a41caff2801ff
1 parent
444e4745
image size
Showing
1 changed file
with
11 additions
and
11 deletions
Show diff stats
frontend/views/basket/index.php
... | ... | @@ -51,24 +51,24 @@ $('#order-delivery input[type=\"radio\"]').click(function(){ |
51 | 51 | <?php echo $form->field($modelOrder,'adress'); ?> |
52 | 52 | <?php echo $form->field($modelOrder,'email'); ?> |
53 | 53 | <?= $form->field($modelOrder, 'delivery') |
54 | - ->radioList(ArrayHelper::map(Delivery::find()->where(['parent_id'=>0])->asArray()->all(), 'id', 'title')) | |
54 | + ->radioList(ArrayHelper::map(Delivery::find()->where(['parent_id'=>0])->asArray()->all(), 'id', 'title'), [ | |
55 | + 'item' => function($index, $label, $name, $checked, $value) { | |
56 | + $return = '<div class="custom-form-buttons">'; | |
57 | + $return .= '<input class="custom-radio" id="custom-radio-' . $value . '" ' . ( $checked ? "checked" : "" ) . ' type="radio" name="' . $name . '" value="' . $value . '" >'; | |
58 | + $return .= '<label for="custom-radio-' . $value . '" ><span></span>' . $label . '</label>'; | |
59 | + $return .= '</div>'; | |
60 | + return $return; | |
61 | + }, | |
62 | + ]); | |
55 | 63 | ?> |
64 | + | |
56 | 65 | <div class="both"></div> |
57 | 66 | |
58 | 67 | <?php foreach(Delivery::find()->where(['parent_id'=>0])->all() as $item):?> |
59 | 68 | <div class='delivery-data' id='delivery-data-<?=$item->id?>'> |
60 | 69 | <?=$item->text?> |
61 | 70 | <?= $form->field($modelOrder, 'delivery') |
62 | - ->radioList(ArrayHelper::map(Delivery::find()->where(['parent_id'=>$item->id])->asArray()->all(), 'id', 'title'), | |
63 | - [ | |
64 | - 'item' => function($index, $label, $name, $checked, $value) { | |
65 | - $return = '<div class="custom-form-buttons">'; | |
66 | - $return .= '<input class="custom-radio" id="custom-radio-' . $value . '" ' . ( $checked ? "checked" : "" ) . ' type="radio" name="' . $name . '" value="' . $value . '" >'; | |
67 | - $return .= '<label for="custom-radio-' . $value . '" ><span></span>' . $label . '</label>'; | |
68 | - $return .= '</div>'; | |
69 | - return $return; | |
70 | - }, | |
71 | - ]); | |
71 | + ->radioList(ArrayHelper::map(Delivery::find()->where(['parent_id'=>$item->id])->asArray()->all(), 'id', 'title'),['id' => 'order-delivery-childs'])->label(false) | |
72 | 72 | ?> |
73 | 73 | </div> |
74 | 74 | ... | ... |