@@ -22,13 +22,13 @@ |
||
22 | 22 | 'style' => '' |
23 | 23 | ]; |
24 | 24 | if (!empty($dataManager->managerOptions['categorys'])) { |
25 | - $mainCol['style'].='margin-left:260px;'; |
|
26 | - echo '<div class ="pull-left dataManager-categorys" style = "width:250px;">'; |
|
27 | - $this->widget('Ui\DataManager/categorys', compact('dataManager')); |
|
28 | - echo '</div>'; |
|
25 | + $mainCol['style'].='margin-left:260px;'; |
|
26 | + echo '<div class ="pull-left dataManager-categorys" style = "width:250px;">'; |
|
27 | + $this->widget('Ui\DataManager/categorys', compact('dataManager')); |
|
28 | + echo '</div>'; |
|
29 | 29 | } |
30 | 30 | if (!empty($dataManager->managerOptions['filters'])) { |
31 | - ?> |
|
31 | + ?> |
|
32 | 32 | <div class="modal fade" id = "<?= $dataManager->managerId; ?>_filters" > |
33 | 33 | <div class="modal-dialog modal-lg"> |
34 | 34 | <div class="modal-content"> |
@@ -2,9 +2,9 @@ |
||
2 | 2 | $aditionalInputs = []; |
3 | 3 | $showedInput = false; |
4 | 4 | if(!empty($options['createBtn'])){ |
5 | - $optionsHtml = '<option disabled onclick="'.$options['createBtn']['onclick'].'">'.$options['createBtn']['text'].'</option>'; |
|
5 | + $optionsHtml = '<option disabled onclick="'.$options['createBtn']['onclick'].'">'.$options['createBtn']['text'].'</option>'; |
|
6 | 6 | }else { |
7 | - $optionsHtml = ''; |
|
7 | + $optionsHtml = ''; |
|
8 | 8 | } |
9 | 9 | |
10 | 10 | foreach ($options['values'] as $key => $value) { |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | |
14 | 14 | class Select extends \Ui\ActiveForm\Input { |
15 | 15 | |
16 | - public function draw() { |
|
16 | + public function draw() { |
|
17 | 17 | $inputName = $this->colName(); |
18 | 18 | $inputLabel = $this->colLabel(); |
19 | 19 | $inputParams = $this->colParams; |
@@ -25,41 +25,41 @@ discard block |
||
25 | 25 | ]; |
26 | 26 | $modelName = ''; |
27 | 27 | switch ($inputParams['source']) { |
28 | - case 'model': |
|
28 | + case 'model': |
|
29 | 29 | $modelName = $inputParams['model']; |
30 | 30 | break; |
31 | - case 'relation': |
|
31 | + case 'relation': |
|
32 | 32 | if ($this->activeForm->modelName) { |
33 | - $itemModelName = $this->activeForm->modelName; |
|
34 | - $relation = $itemModelName::getRelation($inputParams['relation']); |
|
35 | - if ($relation['model'] && class_exists($relation['model'])) { |
|
33 | + $itemModelName = $this->activeForm->modelName; |
|
34 | + $relation = $itemModelName::getRelation($inputParams['relation']); |
|
35 | + if ($relation['model'] && class_exists($relation['model'])) { |
|
36 | 36 | $modelName = $relation['model']; |
37 | - } |
|
37 | + } |
|
38 | 38 | } |
39 | 39 | } |
40 | 40 | if (!empty($modelName)) { |
41 | - $inputOptions['createBtn'] = [ |
|
42 | - 'text' => 'Создать элемент', |
|
43 | - 'onclick' => 'inji.Ui.forms.popUp(\'' . addslashes($modelName) . '\',{},function(elem){' |
|
44 | - . 'return function(data,modal){inji.Ui.forms.submitAjax($(elem).closest(\'form\')[0], {notSave: true});}}(this))' |
|
45 | - ]; |
|
41 | + $inputOptions['createBtn'] = [ |
|
42 | + 'text' => 'Создать элемент', |
|
43 | + 'onclick' => 'inji.Ui.forms.popUp(\'' . addslashes($modelName) . '\',{},function(elem){' |
|
44 | + . 'return function(data,modal){inji.Ui.forms.submitAjax($(elem).closest(\'form\')[0], {notSave: true});}}(this))' |
|
45 | + ]; |
|
46 | 46 | } |
47 | 47 | if (!empty($inputOptions['values'][$this->activeForm->model->{$this->colName}]) && |
48 | 48 | is_array($inputOptions['values'][$this->activeForm->model->{$this->colName}]) && |
49 | 49 | !empty($inputOptions['values'][$this->activeForm->model->{$this->colName}]['input'])) { |
50 | - $aditionalCol = $inputOptions['values'][$this->activeForm->model->{$this->colName}]['input']['name']; |
|
51 | - $inputOptions['aditionalValue'] = $this->activeForm->model->$aditionalCol; |
|
50 | + $aditionalCol = $inputOptions['values'][$this->activeForm->model->{$this->colName}]['input']['name']; |
|
51 | + $inputOptions['aditionalValue'] = $this->activeForm->model->$aditionalCol; |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | $preset = $this->preset(); |
55 | 55 | |
56 | 56 | if ($preset !== null) { |
57 | - $inputOptions['disabled'] = true; |
|
58 | - $this->form->input('hidden', $inputName, '', $inputOptions); |
|
59 | - return true; |
|
57 | + $inputOptions['disabled'] = true; |
|
58 | + $this->form->input('hidden', $inputName, '', $inputOptions); |
|
59 | + return true; |
|
60 | 60 | } |
61 | 61 | $this->form->input('select', $inputName, $inputLabel, $inputOptions); |
62 | 62 | return true; |
63 | - } |
|
63 | + } |
|
64 | 64 | |
65 | 65 | } |
@@ -168,12 +168,12 @@ |
||
168 | 168 | <li><a href ='' onclick='inji.Ui.dataManagers.get(this).rowSelection("inverse");return false;'>Инвертировать</a></li> |
169 | 169 | <li role="separator" class="divider"></li> |
170 | 170 | <?php |
171 | - foreach ($actions as $action => $actionParams) { |
|
172 | - if (class_exists($actionParams['className']) && $actionParams['className']::$groupAction) { |
|
173 | - echo "<li><a role='button' href ='#' onclick='inji.Ui.dataManagers.get(this).groupAction(\"" . str_replace('\\', '\\\\', $action) . "\");return false;'>{$actionParams['className']::$name}</a></li>"; |
|
174 | - } |
|
175 | - } |
|
176 | - ?> |
|
171 | + foreach ($actions as $action => $actionParams) { |
|
172 | + if (class_exists($actionParams['className']) && $actionParams['className']::$groupAction) { |
|
173 | + echo "<li><a role='button' href ='#' onclick='inji.Ui.dataManagers.get(this).groupAction(\"" . str_replace('\\', '\\\\', $action) . "\");return false;'>{$actionParams['className']::$name}</a></li>"; |
|
174 | + } |
|
175 | + } |
|
176 | + ?> |
|
177 | 177 | </ul> |
178 | 178 | </div> |
179 | 179 | <?php |
@@ -6,12 +6,12 @@ discard block |
||
6 | 6 | <?php |
7 | 7 | $socials = Users\Social::getList(['where' => ['active', 1]]); |
8 | 8 | if ($socials) { |
9 | - ?> |
|
9 | + ?> |
|
10 | 10 | <div class="form-group"> |
11 | 11 | <label>Регистрация через соц.сети</label><br /> |
12 | 12 | <?php |
13 | 13 | foreach (Users\Social::getList(['where' => ['active', 1]]) as $social) { |
14 | - echo "<a href = '/users/social/auth/{$social->code}'>{$social->name()}</a> "; |
|
14 | + echo "<a href = '/users/social/auth/{$social->code}'>{$social->name()}</a> "; |
|
15 | 15 | } |
16 | 16 | ?> |
17 | 17 | </div> |
@@ -41,15 +41,15 @@ discard block |
||
41 | 41 | <div class ='row'> |
42 | 42 | <div class="col-sm-6"> |
43 | 43 | <?php |
44 | - if (!empty(App::$cur->users->config['invites'])) { |
|
44 | + if (!empty(App::$cur->users->config['invites'])) { |
|
45 | 45 | ?> |
46 | 46 | <div class ='form-group'> |
47 | 47 | <label><?= !empty(App::$cur->users->config['invitesName']) ? App::$cur->users->config['invitesName'] : 'Код приглашения'; ?></label> |
48 | 48 | <input type ='text' name ='invite_code' class ='form-control' value ="<?= (isset($_POST['invite_code']) ? $_POST['invite_code'] : ((!empty($_COOKIE['invite_code']) ? $_COOKIE['invite_code'] : ((!empty($_GET['invite_code']) ? $_GET['invite_code'] : ''))))); ?>" /> |
49 | 49 | </div> |
50 | 50 | <?php |
51 | - } |
|
52 | - ?> |
|
51 | + } |
|
52 | + ?> |
|
53 | 53 | </div> |
54 | 54 | </div> |
55 | 55 | <div class ='form-group'> |