Commit 1b334a5497f733e6993d27497faec4ff582fc8df

Authored by Anastasia
1 parent 1ae1f431

bug fix artbox-order

Showing 1 changed file with 2 additions and 78 deletions   Show diff stats
views/shop/_form.php
@@ -32,85 +32,9 @@ @@ -32,85 +32,9 @@
32 'form' => $form, 32 'form' => $form,
33 ] 33 ]
34 ) ?> 34 ) ?>
35 - <?php foreach ($days as $key => $day): ?>  
36 - <?= Html::beginTag('div') ?>  
37 - <?= Html::label($day . ' c'); ?>  
38 - <?= Html::textInput(  
39 - "Shop[modeStr][$key][from]",  
40 - ( isset($model->modeStr[ $key ][ 'from' ]) ) ? $model->modeStr[ $key ][ 'from' ] : '09:00',  
41 - [  
42 - 'size' => 10,  
43 - 'type' => 'time',  
44 -  
45 - ]  
46 - ) ?>  
47 - <?= Html::label(' до '); ?>  
48 -  
49 - <?= Html::textInput(  
50 - "Shop[modeStr][$key][to]",  
51 - ( isset($model->modeStr[ $key ][ 'to' ]) ) ? $model->modeStr[ $key ][ 'to' ] : '18:00',  
52 - [  
53 - 'size' => 10,  
54 - 'type' => 'time',  
55 - ]  
56 - ) ?>  
57 - <?= Html::label(' выходной '); ?>  
58 - <?= Html::checkbox("Shop[modeStr][$key][off]", ( isset($model->modeStr[ $key ][ 'off' ]) ) ? true : false) ?>  
59 - <?= Html::endTag('div'); ?>  
60 - <?php endforeach; ?>  
61 - <?php if (isset($model->modeStr[ 'data' ])): ?>  
62 -  
63 - <?php foreach ($model->modeStr[ 'data' ] as $key => $data): ?>  
64 - <?= Html::beginTag('div') ?>  
65 - <?= Html::label(' Дата'); ?>  
66 - <?= Html::textInput(  
67 - "Shop[modeStr][data][$key][data]",  
68 - ( isset($data[ 'data' ]) ) ? $data[ 'data' ] : '',  
69 - [  
70 - 'size' => 10,  
71 - 'type' => 'data',  
72 - ]  
73 - ) ?>  
74 - <?= Html::label(' c'); ?>  
75 - <?= Html::textInput(  
76 - "Shop[modeStr][data][$key][from]",  
77 - ( isset($data[ 'from' ]) ) ? $data[ 'from' ] : '',  
78 - [  
79 - 'size' => 10,  
80 - 'type' => 'time',  
81 -  
82 - ]  
83 - ) ?>  
84 - <?= Html::label(' до '); ?>  
85 -  
86 - <?= Html::textInput(  
87 - "Shop[modeStr][data][$key][to]",  
88 - ( isset($data[ 'to' ]) ) ? $data[ 'to' ] : '',  
89 - [  
90 - 'size' => 10,  
91 - 'type' => 'time',  
92 - ]  
93 - ) ?>  
94 - <?= Html::label(' выходной '); ?>  
95 - <?= Html::checkbox("Shop[modeStr][data][$key][off]", ( isset($data[ 'off' ]) ) ? true : false) ?>  
96 - <?= Html::endTag('div'); ?>  
97 - <?php endforeach; ?>  
98 - <?php endif ?>  
99 - <?= Html::button(  
100 - Html::tag(  
101 - 'li',  
102 - '',  
103 - [  
104 - 'class' => 'fa fa-plus',  
105 - ]  
106 - ) . ' Добавить дату',  
107 - [  
108 - 'id' => 'add-data',  
109 - 'class' => 'btn btn-success',  
110 - 'data-count' => ( isset($model->modeStr[ 'data' ]) ) ? count($model->modeStr[ 'data' ]) : 0,  
111 - ]  
112 - ) ?>  
113 35
  36 + <?= $form->field($model, 'mode')
  37 + ->textarea() ?>
114 38
115 39
116 <?= Select2::widget( 40 <?= Select2::widget(