@@ -25,7 +25,7 @@ |
||
| 25 | 25 | if ($param->type == 'custom') { |
| 26 | 26 | $parserName = $param->value; |
| 27 | 27 | } else { |
| 28 | - $parserName = '\Migrations\Parser\Object\\' . ucfirst($param->type); |
|
| 28 | + $parserName = '\Migrations\Parser\Object\\'.ucfirst($param->type); |
|
| 29 | 29 | } |
| 30 | 30 | if (!\Tools::isAssoc($this->data)) { |
| 31 | 31 | foreach ($this->data as $data) { |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -return function ($step = NULL, $params = []) { |
|
| 3 | +return function($step = NULL, $params = []) { |
|
| 4 | 4 | App::$cur->db->createTable('notifications_notification', [ |
| 5 | 5 | 'notification_id' => 'pk', |
| 6 | 6 | 'notification_chanel_id' => 'int(11) UNSIGNED NOT NULL', |
@@ -29,8 +29,8 @@ discard block |
||
| 29 | 29 | 'subscriber_device_subscriber_id' => 'int(11) UNSIGNED NOT NULL', |
| 30 | 30 | 'subscriber_device_date_last_check' => 'timestamp NOT NULL DEFAULT 0', |
| 31 | 31 | 'subscriber_device_date_create' => 'timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP', |
| 32 | - ],[ |
|
| 33 | - 'UNIQUE INDEX ' . App::$cur->db->table_prefix . 'notifications_subscriber_device_subscriber_device_key (subscriber_device_key)' |
|
| 32 | + ], [ |
|
| 33 | + 'UNIQUE INDEX '.App::$cur->db->table_prefix.'notifications_subscriber_device_subscriber_device_key (subscriber_device_key)' |
|
| 34 | 34 | ]); |
| 35 | 35 | App::$cur->db->createTable('notifications_subscribe', [ |
| 36 | 36 | 'subscribe_id' => 'pk', |
@@ -16,9 +16,9 @@ |
||
| 16 | 16 | $app = new App(); |
| 17 | 17 | $app->name = $appOptions->name; |
| 18 | 18 | $app->system = true; |
| 19 | - $app->staticPath = "/" . $appOptions->dir . "/static"; |
|
| 20 | - $app->templatesPath = "/" . $appOptions->dir . "/static/templates"; |
|
| 21 | - $app->path = INJI_PROGRAM_DIR . '/' . $appOptions->dir; |
|
| 19 | + $app->staticPath = "/".$appOptions->dir."/static"; |
|
| 20 | + $app->templatesPath = "/".$appOptions->dir."/static/templates"; |
|
| 21 | + $app->path = INJI_PROGRAM_DIR.'/'.$appOptions->dir; |
|
| 22 | 22 | $app->type = 'app'; |
| 23 | 23 | $app->installed = true; |
| 24 | 24 | $app->params = []; |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | foreach ($inputs[$inputName]['cols'] as $col) { |
| 59 | 59 | $part = trim($part); |
| 60 | 60 | if ($part && strlen($part) > 2) { |
| 61 | - $colWhere[] = [$col, '%' . $part . '%', 'LIKE', $first ? 'AND' : 'OR']; |
|
| 61 | + $colWhere[] = [$col, '%'.$part.'%', 'LIKE', $first ? 'AND' : 'OR']; |
|
| 62 | 62 | $first = false; |
| 63 | 63 | } |
| 64 | 64 | } |
@@ -13,7 +13,7 @@ |
||
| 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 | } |
@@ -1,7 +1,7 @@ |
||
| 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"> |
@@ -1,5 +1,5 @@ |
||
| 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)) { |
@@ -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 () { |
@@ -3,7 +3,7 @@ |
||
| 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 | } |
@@ -4,7 +4,7 @@ |
||
| 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 |