Completed
Push — master ( 4e62c3...4a84db )
by Alexey
04:58
created
system/modules/Ui/widgets/Form/dynamicList.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
                                 echo '<td>';
35 35
                                 $col['options']['noContainer'] = true;
36 36
                                 $col['options']['value'] = $row[$colName];
37
-                                $form->input($col['type'], $name . '[' . ($i) . '][' . $colName . ']', false, $col['options']);
37
+                                $form->input($col['type'], $name.'['.($i).']['.$colName.']', false, $col['options']);
38 38
                                 echo '</td>';
39 39
                             }
40 40
                             echo '<td class="actionTd"><a class="btn btn-danger btn-xs" onclick="inji.Ui.forms.delRowFromList(this);"><i class="glyphicon glyphicon-remove"></i></a></td>';
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     foreach ($options['cols'] as $colName => $col) {
64 64
         echo '<td>';
65 65
         $col['options']['noContainer'] = true;
66
-        $form->input($col['type'], $name . '[counterPlaceholder][' . $colName . ']', false, $col['options']);
66
+        $form->input($col['type'], $name.'[counterPlaceholder]['.$colName.']', false, $col['options']);
67 67
         echo '</td>';
68 68
     }
69 69
     ?>
Please login to merge, or discard this patch.
system/modules/Ui/widgets/Form/dataManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
     } else {
14 14
         $dataManager = new \Ui\DataManager($options['relation']['type'] == 'relModel' ? $options['relation']['relModel'] : $options['relation']['model'], 'manager');
15 15
         $dataManager->predraw();
16
-        echo '<h3>' . $dataManager->table->name . '</h3>';
16
+        echo '<h3>'.$dataManager->table->name.'</h3>';
17 17
         echo '<h4 class=" text-muted">Чтобы добавить связи, сначала создайте объект</h4>';
18 18
         echo '<p class=" text-muted">Просто заполните доступные поля и нажмите кнопку внизу формы. После этого дополнительные поля разблокируются</p>';
19 19
     }
Please login to merge, or discard this patch.
system/modules/Ui/widgets/Form/changePassword.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 
2 2
 <?php
3 3
 echo empty($options['noContainer']) ? '<div class="form-group">' : '';
4
-echo $label !== false ? "<label>{$label}" . (!empty($options['required']) ? ' <span class="required-star">*</span>' : '') . "</label>" : '';
4
+echo $label !== false ? "<label>{$label}".(!empty($options['required']) ? ' <span class="required-star">*</span>' : '')."</label>" : '';
5 5
 ?>
6 6
 <div class="row">
7 7
     <div class="col-xs-6">
Please login to merge, or discard this patch.
system/modules/Ui/widgets/ActiveForm/ActiveForm.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-$id = 'activeForm-' . Tools::randomString();
2
+$id = 'activeForm-'.Tools::randomString();
3 3
 $formInputs = $activeForm->inputs;
4 4
 foreach ($formInputs as $inputName => $inputParams) {
5 5
     if (is_object($inputParams)) {
Please login to merge, or discard this patch.
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -9,33 +9,33 @@
 block discarded – undo
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 () {
Please login to merge, or discard this patch.
system/modules/Ui/widgets/DataManager/categorys.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <h3>Категории
2 2
     <div class="pull-right">
3
-        <a class ='btn btn-xs btn-primary' onclick='<?= 'inji.Ui.forms.popUp("' . str_replace('\\', '\\\\', $dataManager->managerOptions['categorys']['model']) . '");'; ?>'>Создать</a>
3
+        <a class ='btn btn-xs btn-primary' onclick='<?= 'inji.Ui.forms.popUp("'.str_replace('\\', '\\\\', $dataManager->managerOptions['categorys']['model']).'");'; ?>'>Создать</a>
4 4
     </div>
5 5
 </h3>
6 6
 <div class="categoryTree">
Please login to merge, or discard this patch.
system/modules/Ui/widgets/DataManager/managerButtons.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 $html = '';
4 4
 foreach ($buttons as $button) {
5 5
     if (!empty($button['class'])) {
6
-        $button['class'] = 'btn btn-primary btn-sm ' . $button['class'];
6
+        $button['class'] = 'btn btn-primary btn-sm '.$button['class'];
7 7
     } else {
8 8
         $button['class'] = 'btn btn-primary btn-sm';
9 9
     }
Please login to merge, or discard this patch.
system/modules/Ui/widgets/DataManager/DataManager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
     'id' => $dataManager->managerId,
4 4
     'class' => 'dataManager',
5 5
     'data-params' => $params,
6
-    'data-modelname' => ($model ? get_class($model) : $dataManager->modelName) . ($model && $model->pk() ? ':' . $model->pk() : ''),
6
+    'data-modelname' => ($model ? get_class($model) : $dataManager->modelName).($model && $model->pk() ? ':'.$model->pk() : ''),
7 7
     'data-managername' => $dataManager->managerName,
8 8
     'data-cols' => $dataManager->cols,
9 9
     'data-options' => $dataManager->managerOptions
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     'style' => ''
23 23
 ];
24 24
 if (!empty($dataManager->managerOptions['categorys'])) {
25
-    $mainCol['style'].='margin-left:260px;';
25
+    $mainCol['style'] .= 'margin-left:260px;';
26 26
     echo '<div class ="pull-left dataManager-categorys" style = "width:250px;">';
27 27
     $this->widget('Ui\DataManager/categorys', compact('dataManager'));
28 28
     echo '</div>';
Please login to merge, or discard this patch.
system/modules/Ui/widgets/Table/row.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
         if (is_array($html)) {
5 5
             extract($html);
6 6
         }
7
-        echo "<td " . (!empty($class) ? "class='{$class}'" : '') . ">{$html}</td>";
7
+        echo "<td ".(!empty($class) ? "class='{$class}'" : '').">{$html}</td>";
8 8
     }
9 9
     ?>
10 10
 </tr>
11 11
\ No newline at end of file
Please login to merge, or discard this patch.
system/modules/Ui/objects/Form.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -31,9 +31,9 @@  discard block
 block discarded – undo
31 31
     {
32 32
         foreach ($data as $key => $item) {
33 33
             if (is_array($item)) {
34
-                $this->genUserDataTree($item, $treeKey ? $treeKey . "[{$key}]" : $key);
34
+                $this->genUserDataTree($item, $treeKey ? $treeKey."[{$key}]" : $key);
35 35
             } else {
36
-                $this->userDataTree[$treeKey ? $treeKey . "[{$key}]" : $key] = $item;
36
+                $this->userDataTree[$treeKey ? $treeKey."[{$key}]" : $key] = $item;
37 37
             }
38 38
         }
39 39
     }
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     {
43 43
         $params = compact('header', 'options');
44 44
         $params['form'] = $this;
45
-        \App::$cur->view->widget('Ui\\' . $this->options['widgetsDir'] . '/begin', $params);
45
+        \App::$cur->view->widget('Ui\\'.$this->options['widgetsDir'].'/begin', $params);
46 46
     }
47 47
 
48 48
     /**
@@ -65,18 +65,18 @@  discard block
 block discarded – undo
65 65
                 } else {
66 66
                     $params['options']['class'] .= ' htmleditor';
67 67
                 }
68
-                \App::$cur->view->widget('Ui\\' . $this->options['widgetsDir'] . '/textarea', $params);
68
+                \App::$cur->view->widget('Ui\\'.$this->options['widgetsDir'].'/textarea', $params);
69 69
                 break;
70 70
             case 'map':
71 71
                 $params = compact('name', 'label', 'options');
72 72
                 $params['form'] = $this;
73 73
                 \App::$cur->libs->loadLib('yandexMap');
74
-                \App::$cur->view->widget('Ui\\' . $this->options['widgetsDir'] . '/map', $params);
74
+                \App::$cur->view->widget('Ui\\'.$this->options['widgetsDir'].'/map', $params);
75 75
                 break;
76 76
             default :
77 77
                 $params = compact('name', 'label', 'options');
78 78
                 $params['form'] = $this;
79
-                \App::$cur->view->widget('Ui\\' . $this->options['widgetsDir'] . '/' . $type, $params);
79
+                \App::$cur->view->widget('Ui\\'.$this->options['widgetsDir'].'/'.$type, $params);
80 80
         }
81 81
     }
82 82
 
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     {
91 91
         $params = compact('btnText', 'attributs');
92 92
         $params['form'] = $this;
93
-        \App::$cur->view->widget('Ui\\' . $this->options['widgetsDir'] . '/end', $params);
93
+        \App::$cur->view->widget('Ui\\'.$this->options['widgetsDir'].'/end', $params);
94 94
     }
95 95
 
96 96
 }
Please login to merge, or discard this patch.