Commit 0f76d3d604457ed9ae94da2e54ec0f933b8bc093
1 parent
9c0722b5
Веталь
Showing
3 changed files
with
115 additions
and
33 deletions
Show diff stats
common/models/Orders.php
frontend/views/basket/index.php
| ... | ... | @@ -44,39 +44,45 @@ $('#orders-delivery input[type=\"radio\"]').click(function(){ |
| 44 | 44 | <?php $form = ActiveForm::begin(['enableClientScript' => false]); ?> |
| 45 | 45 | <div class="rightbar basket_rightbar"> |
| 46 | 46 | <div class="form-order"> |
| 47 | - <div class="input-blocks-wrapper"> | |
| 48 | - <?php echo $form->field($modelOrder, 'name', [ 'options' => [ 'class' => 'input-blocks' ] ])->textInput([ 'class' => 'custom-input-2' ]); ?> | |
| 47 | + <div class="input-blocks-group"> | |
| 48 | + <div class="title_groups">контакты</div> | |
| 49 | + <div class="input-blocks-wrapper"> | |
| 50 | + <?php echo $form->field($modelOrder, 'name', [ 'options' => [ 'class' => 'input-blocks basket_input_2' ] ])->textInput([ 'class' => 'custom-input-2' ]); ?> | |
| 51 | + </div> | |
| 52 | + <div class="input-blocks-wrapper"> | |
| 53 | + <?php echo $form->field($modelOrder, 'phone', [ 'options' => [ 'class' => 'input-blocks basket_input_2' ] ])->textInput([ 'class' => 'custom-input-2' ]); ?> | |
| 54 | + </div> | |
| 55 | + <div class="input-blocks-wrapper"> | |
| 56 | + <?php echo $form->field($modelOrder, 'phone2', [ 'options' => [ 'class' => 'input-blocks basket_input_2' ] ])->textInput([ 'class' => 'custom-input-2' ]); ?> | |
| 57 | + </div> | |
| 58 | + <div class="input-blocks-wrapper"> | |
| 59 | + <?php echo $form->field($modelOrder, 'city', [ 'options' => [ 'class' => 'input-blocks basket_input_2' ] ])->textInput([ 'class' => 'custom-input-2' ]); ?> | |
| 60 | + </div> | |
| 61 | + <div class="input-blocks-wrapper"> | |
| 62 | + <?php echo $form->field($modelOrder, 'adress', [ 'options' => [ 'class' => 'input-blocks basket_input_2' ] ])->textInput([ 'class' => 'custom-input-2' ]); ?> | |
| 63 | + </div> | |
| 64 | + <div class="input-blocks-wrapper"> | |
| 65 | + <?php echo $form->field($modelOrder, 'email', [ 'options' => [ 'class' => 'input-blocks basket_input_2' ] ])->textInput([ 'class' => 'custom-input-2' ]); ?> | |
| 66 | + </div> | |
| 49 | 67 | </div> |
| 50 | - <div class="input-blocks-wrapper"> | |
| 51 | - <?php echo $form->field($modelOrder, 'phone', [ 'options' => [ 'class' => 'input-blocks' ] ])->textInput([ 'class' => 'custom-input-2' ]); ?> | |
| 52 | - </div> | |
| 53 | - <div class="input-blocks-wrapper"> | |
| 54 | - <?php echo $form->field($modelOrder, 'phone2', [ 'options' => [ 'class' => 'input-blocks' ] ])->textInput([ 'class' => 'custom-input-2' ]); ?> | |
| 55 | - </div> | |
| 56 | - <div class="input-blocks-wrapper"> | |
| 57 | - <?php echo $form->field($modelOrder, 'city', [ 'options' => [ 'class' => 'input-blocks' ] ])->textInput([ 'class' => 'custom-input-2' ]); ?> | |
| 58 | - </div> | |
| 59 | - <div class="input-blocks-wrapper"> | |
| 60 | - <?php echo $form->field($modelOrder, 'adress', [ 'options' => [ 'class' => 'input-blocks' ] ])->textInput([ 'class' => 'custom-input-2' ]); ?> | |
| 61 | - </div> | |
| 62 | - <div class="input-blocks-wrapper"> | |
| 63 | - <?php echo $form->field($modelOrder, 'email', [ 'options' => [ 'class' => 'input-blocks' ] ])->textInput([ 'class' => 'custom-input-2' ]); ?> | |
| 64 | - </div> | |
| 65 | - | |
| 66 | - <div class="input-blocks-wrapper"> | |
| 67 | - <?= $form->field($modelOrder, 'delivery') | |
| 68 | - ->radioList(ArrayHelper::map(Delivery::find()->where(['parent_id'=>0])->asArray()->all(), 'id', 'title'),[ | |
| 69 | - 'item' => function($index, $label, $name, $checked, $value) { | |
| 70 | - $return = '<div class="custom-form-buttons">'; | |
| 71 | - $return .= '<input class="custom-radio" id="custom-radio-' . $value . '" ' . ( $checked ? "checked" : "" ) . ' type="radio" name="' . $name . '" value="' . $value . '" >'; | |
| 72 | - $return .= '<label for="custom-radio-' . $value . '" ><span></span>' . $label . '</label>'; | |
| 73 | - $return .= '</div>'; | |
| 74 | - return $return; | |
| 75 | - }, | |
| 76 | - ]) | |
| 77 | - ?> | |
| 68 | + | |
| 69 | + <div class="input-blocks-group radio_grp"> | |
| 70 | + <div class="input-blocks-wrapper"> | |
| 71 | + <?= $form->field($modelOrder, 'delivery') | |
| 72 | + ->radioList(ArrayHelper::map(Delivery::find()->where(['parent_id'=>0])->asArray()->all(), 'id', 'title'),[ | |
| 73 | + 'item' => function($index, $label, $name, $checked, $value) { | |
| 74 | + $return = '<div class="custom-form-buttons">'; | |
| 75 | + $return .= '<input class="custom-radio" id="custom-radio-' . $value . '" ' . ( $checked ? "checked" : "" ) . ' type="radio" name="' . $name . '" value="' . $value . '" >'; | |
| 76 | + $return .= '<label for="custom-radio-' . $value . '" ><span></span>' . $label . '</label>'; | |
| 77 | + $return .= '</div>'; | |
| 78 | + return $return; | |
| 79 | + }, | |
| 80 | + ]) | |
| 81 | + ?> | |
| 82 | + </div> | |
| 78 | 83 | </div> |
| 79 | 84 | |
| 85 | + | |
| 80 | 86 | <div class="both"></div> |
| 81 | 87 | |
| 82 | 88 | <?php foreach(Delivery::find()->where(['parent_id'=>0])->all() as $item):?> |
| ... | ... | @@ -96,8 +102,12 @@ $('#orders-delivery input[type=\"radio\"]').click(function(){ |
| 96 | 102 | </div> |
| 97 | 103 | |
| 98 | 104 | <?php endforeach;?> |
| 105 | + <div class="input-blocks-group radio_grp"> | |
| 106 | + <div class="input-blocks-wrapper"> | |
| 107 | + <?php echo $form->field($modelOrder, 'payment')->radioList(['Оплатить наличными'=>'Оплатить наличными','Оплатить на карту Приват Банка'=>'Оплатить на карту Приват Банка','Оплатить по безналичному расчету'=>'Оплатить по безналичному расчету','Оплатить Правекс-телеграф'=>'Оплатить Правекс-телеграф','Наложенным платежом'=>'Наложенным платежом']); ?> | |
| 108 | + </div> | |
| 109 | + </div> | |
| 99 | 110 | |
| 100 | -<?php echo $form->field($modelOrder, 'payment')->radioList(['Оплатить наличными'=>'Оплатить наличными','Оплатить на карту Приват Банка'=>'Оплатить на карту Приват Банка','Оплатить по безналичному расчету'=>'Оплатить по безналичному расчету','Оплатить Правекс-телеграф'=>'Оплатить Правекс-телеграф','Наложенным платежом'=>'Наложенным платежом']); ?> | |
| 101 | 111 | <div class="both"></div> |
| 102 | 112 | |
| 103 | 113 | ... | ... |
frontend/web/css/style.css
| ... | ... | @@ -1303,7 +1303,79 @@ ul.product-special li.promo:after { |
| 1303 | 1303 | width: 100% !important; |
| 1304 | 1304 | height: 100% !important; |
| 1305 | 1305 | } |
| 1306 | -.input-blocks-wrapper { | |
| 1306 | +.input-blocks-wrapper, .input-blocks { | |
| 1307 | 1307 | width: 100%; |
| 1308 | 1308 | float: left; |
| 1309 | +} | |
| 1310 | +.form-order .input-blocks-wrapper { | |
| 1311 | + margin-top: 6px; | |
| 1312 | +} | |
| 1313 | +.input-blocks label { | |
| 1314 | + font-size: 13px; | |
| 1315 | + color: #333; | |
| 1316 | +} | |
| 1317 | +.basket_input_2 label { | |
| 1318 | + height: 30px; | |
| 1319 | + line-height: 30px; | |
| 1320 | + float: left; | |
| 1321 | + width: 70px !important; | |
| 1322 | + padding-top: 0 !important; | |
| 1323 | +} | |
| 1324 | + | |
| 1325 | +.custom-input-2 { | |
| 1326 | + width: 100%; | |
| 1327 | + height: 30px; | |
| 1328 | + border: 1px solid #d2d2d2; | |
| 1329 | + box-sizing: border-box; | |
| 1330 | + outline: none; | |
| 1331 | + color: #636363; | |
| 1332 | + font-size: 13px; | |
| 1333 | + line-height: 30px; | |
| 1334 | + padding-left: 8px; | |
| 1335 | + margin-top: 5px; | |
| 1336 | + background: #fff; | |
| 1337 | + border-radius: 4px; | |
| 1338 | +} | |
| 1339 | +.basket_input_2 .custom-input-2 { | |
| 1340 | + width: 270px; | |
| 1341 | + float: right; | |
| 1342 | + margin-top: 0; | |
| 1343 | +} | |
| 1344 | +.custom-input-2:focus, .custom-area-3:focus{box-shadow: 1px 2px 2px 0px rgba(215, 215, 215, 0.75) inset; transition: 0.1s} | |
| 1345 | +.title_groups, .radio_grp label.control-label { | |
| 1346 | + font-size: 12px; | |
| 1347 | + font-weight: bold; | |
| 1348 | + text-transform: uppercase; | |
| 1349 | +} | |
| 1350 | +.input-blocks-group { | |
| 1351 | + width: 100%; | |
| 1352 | + float: left; | |
| 1353 | + border-bottom: 1px solid #d2d2d2; | |
| 1354 | + padding-bottom: 20px; | |
| 1355 | + margin-top: 18px; | |
| 1356 | +} | |
| 1357 | +.custom-form-buttons { | |
| 1358 | + width: 100%; | |
| 1359 | + float: left; | |
| 1360 | +} | |
| 1361 | +input.custom-radio + label, input.custom-check + label { | |
| 1362 | + font-size: 13px; | |
| 1363 | + cursor: pointer; | |
| 1364 | + margin-left: 6px; | |
| 1365 | +} | |
| 1366 | +/***radio***/ | |
| 1367 | +input.custom-radio, input.custom-check {display: none} | |
| 1368 | +input.custom-radio + label span{ | |
| 1369 | + width: 16px; | |
| 1370 | + height: 16px; | |
| 1371 | + background: url('../img/radio_new.png') no-repeat; | |
| 1372 | + float: left; | |
| 1373 | + transition: .2s; | |
| 1374 | +} | |
| 1375 | +input.custom-radio:checked + label span, input.custom-radio:checked + label:hover span { | |
| 1376 | + background: url('../img/radio_new-active.png') no-repeat; | |
| 1377 | +} | |
| 1378 | + | |
| 1379 | +input.custom-radio + label:hover { | |
| 1380 | + text-decoration: underline; | |
| 1309 | 1381 | } |
| 1310 | 1382 | \ No newline at end of file | ... | ... |