@@ -9,33 +9,33 @@ |
||
9 | 9 | ?> |
10 | 10 | <div id ='<?= $id; ?>' class="uiActiveForm" data-modelname="<?= $activeForm->modelName; ?>" data-formname="<?= $activeForm->formName; ?>" data-inputs='<?= json_encode($formInputs); ?>'> |
11 | 11 | <?php |
12 | - $form->action = $activeForm->action; |
|
13 | - $form->begin($activeForm->header, ['onsubmit' => $ajax ? 'inji.Ui.forms.submitAjax(this);return false;' : ''], ['activeForm' => $activeForm]); |
|
12 | + $form->action = $activeForm->action; |
|
13 | + $form->begin($activeForm->header, ['onsubmit' => $ajax ? 'inji.Ui.forms.submitAjax(this);return false;' : ''], ['activeForm' => $activeForm]); |
|
14 | 14 | |
15 | - if (empty($activeForm->form['noMapCell'])) { |
|
16 | - foreach ($activeForm->form['map'] as $row) { |
|
17 | - $colSize = 12 / count($row); |
|
18 | - echo "<div class ='row'>"; |
|
19 | - foreach ($row as $col) { |
|
20 | - echo "<div class = 'col-sm-{$colSize}'>"; |
|
21 | - if ($col) { |
|
22 | - $activeForm->drawCol($col, $activeForm->inputs[$col], $form, $params); |
|
23 | - } |
|
24 | - echo '</div>'; |
|
25 | - } |
|
26 | - echo '</div>'; |
|
27 | - } |
|
28 | - } else { |
|
29 | - foreach ($activeForm->form['map'] as $row) { |
|
30 | - foreach ($row as $col) { |
|
31 | - if ($col) { |
|
32 | - $activeForm->drawCol($col, $activeForm->inputs[$col], $form, $params); |
|
33 | - } |
|
34 | - } |
|
35 | - } |
|
36 | - } |
|
37 | - $form->end($activeForm->model ? ($activeForm->model->pk() ? 'Сохранить' : 'Создать') : 'Отправить', [], ['activeForm' => $activeForm]); |
|
38 | - ?> |
|
15 | + if (empty($activeForm->form['noMapCell'])) { |
|
16 | + foreach ($activeForm->form['map'] as $row) { |
|
17 | + $colSize = 12 / count($row); |
|
18 | + echo "<div class ='row'>"; |
|
19 | + foreach ($row as $col) { |
|
20 | + echo "<div class = 'col-sm-{$colSize}'>"; |
|
21 | + if ($col) { |
|
22 | + $activeForm->drawCol($col, $activeForm->inputs[$col], $form, $params); |
|
23 | + } |
|
24 | + echo '</div>'; |
|
25 | + } |
|
26 | + echo '</div>'; |
|
27 | + } |
|
28 | + } else { |
|
29 | + foreach ($activeForm->form['map'] as $row) { |
|
30 | + foreach ($row as $col) { |
|
31 | + if ($col) { |
|
32 | + $activeForm->drawCol($col, $activeForm->inputs[$col], $form, $params); |
|
33 | + } |
|
34 | + } |
|
35 | + } |
|
36 | + } |
|
37 | + $form->end($activeForm->model ? ($activeForm->model->pk() ? 'Сохранить' : 'Создать') : 'Отправить', [], ['activeForm' => $activeForm]); |
|
38 | + ?> |
|
39 | 39 | </div> |
40 | 40 | <script> |
41 | 41 | inji.onLoad(function () { |
@@ -8,7 +8,7 @@ |
||
8 | 8 | } |
9 | 9 | ?>> |
10 | 10 | <?php |
11 | - } |
|
12 | - ?> |
|
11 | + } |
|
12 | + ?> |
|
13 | 13 | <?= !empty($header) ? "<h1>{$header}</h1>" : ''; ?> |
14 | 14 | |
15 | 15 | \ No newline at end of file |
@@ -5,10 +5,10 @@ |
||
5 | 5 | <div class="form-group"> |
6 | 6 | <button class ='btn btn-primary' |
7 | 7 | <?php |
8 | - foreach ($attributs as $attribute => $value) { |
|
9 | - echo " {$attribute} = '{$value}' "; |
|
10 | - } |
|
11 | - ?> |
|
8 | + foreach ($attributs as $attribute => $value) { |
|
9 | + echo " {$attribute} = '{$value}' "; |
|
10 | + } |
|
11 | + ?> |
|
12 | 12 | ><?= $btnText; ?></button> |
13 | 13 | </div> |
14 | 14 | <?php |