Commit 0c65fdc515b4a27d5c7c87d878f5d4880bcf00b7
1 parent
1b2957f9
git
Showing
2 changed files
with
154 additions
and
141 deletions
Show diff stats
frontend/views/accounts/_projects_form.php
| 1 | <?php | 1 | <?php |
| 2 | - /** | ||
| 3 | - * @var Project $project | ||
| 4 | - * @var Specialization[] $specialization | ||
| 5 | - * @var Payment[] $payment | ||
| 6 | - * @var string[] $projects | ||
| 7 | - */ | ||
| 8 | - use common\components\Request; | ||
| 9 | - use common\models\Currency; | ||
| 10 | - use common\models\File; | ||
| 11 | - use common\models\Payment; | ||
| 12 | - use common\models\Project; | ||
| 13 | - use common\models\Specialization; | ||
| 14 | - use common\modules\file\widgets\ImageUploader; | ||
| 15 | - use common\modules\fileloader\widgets\FileloaderWidget; | ||
| 16 | - use kartik\select2\Select2; | ||
| 17 | - use mihaildev\ckeditor\CKEditor; | ||
| 18 | - use yii\helpers\Html; | ||
| 19 | - use yii\jui\DatePicker; | ||
| 20 | - use yii\web\JsExpression; | ||
| 21 | - use yii\widgets\ActiveForm; | ||
| 22 | - | ||
| 23 | - $this->title = 'Проекты'; | ||
| 24 | - $this->params[ 'breadcrumbs' ][] = $this->title; | 2 | +/** |
| 3 | + * @var Project $project | ||
| 4 | + * @var Specialization[] $specialization | ||
| 5 | + * @var Payment[] $payment | ||
| 6 | + * @var string[] $projects | ||
| 7 | + */ | ||
| 8 | +use common\components\Request; | ||
| 9 | +use common\models\Currency; | ||
| 10 | +use common\models\File; | ||
| 11 | +use common\models\Payment; | ||
| 12 | +use common\models\Project; | ||
| 13 | +use common\models\Specialization; | ||
| 14 | +use common\modules\file\widgets\ImageUploader; | ||
| 15 | +use common\modules\fileloader\widgets\FileloaderWidget; | ||
| 16 | +use kartik\select2\Select2; | ||
| 17 | +use mihaildev\ckeditor\CKEditor; | ||
| 18 | +use yii\helpers\Html; | ||
| 19 | +use yii\jui\DatePicker; | ||
| 20 | +use yii\web\JsExpression; | ||
| 21 | +use yii\widgets\ActiveForm; | ||
| 22 | + | ||
| 23 | +$this->title = 'Проекты'; | ||
| 24 | +$this->params[ 'breadcrumbs' ][] = $this->title; | ||
| 25 | ?> | 25 | ?> |
| 26 | <div class="login-left-column-title"><?= $this->title ?></div> | 26 | <div class="login-left-column-title"><?= $this->title ?></div> |
| 27 | 27 | ||
| 28 | <?php | 28 | <?php |
| 29 | - $form = ActiveForm::begin([ 'options' => [ 'enctype' => 'multipart/form-data' ] ]); | 29 | +$form = ActiveForm::begin([ 'options' => [ 'enctype' => 'multipart/form-data' ] ]); |
| 30 | ?> | 30 | ?> |
| 31 | 31 | ||
| 32 | 32 | ||
| 33 | <div class="input-blocks-wrapper"> | 33 | <div class="input-blocks-wrapper"> |
| 34 | <div class="input-blocks"> | 34 | <div class="input-blocks"> |
| 35 | <?= $form->field($project, 'name') | 35 | <?= $form->field($project, 'name') |
| 36 | - ->textInput([ 'class' => 'custom-input-2' ]) ?> | 36 | + ->textInput([ 'class' => 'custom-input-2' ]) ?> |
| 37 | </div> | 37 | </div> |
| 38 | </div> | 38 | </div> |
| 39 | 39 | ||
| 40 | <div class="input-blocks-wrapper"> | 40 | <div class="input-blocks-wrapper"> |
| 41 | <div class="input-blocks admin-project-list admin-currency-second"> | 41 | <div class="input-blocks admin-project-list admin-currency-second"> |
| 42 | <?= $form->field($project, 'project_pid') | 42 | <?= $form->field($project, 'project_pid') |
| 43 | - ->dropDownList($projects, [ 'prompt' => 'Родительский проект' ]) ?> | 43 | + ->dropDownList($projects, [ 'prompt' => 'Родительский проект' ]) ?> |
| 44 | </div> | 44 | </div> |
| 45 | </div> | 45 | </div> |
| 46 | 46 | ||
| @@ -68,13 +68,13 @@ | @@ -68,13 +68,13 @@ | ||
| 68 | <?= $form->field($project, "specializationInput[{$child_second->specialization_id}]", [ | 68 | <?= $form->field($project, "specializationInput[{$child_second->specialization_id}]", [ |
| 69 | 'template' => '{input}{label}{hint}{error}', | 69 | 'template' => '{input}{label}{hint}{error}', |
| 70 | ]) | 70 | ]) |
| 71 | - ->label('<span></span>' . $child_second->specialization_name) | ||
| 72 | - ->checkbox([ | ||
| 73 | - 'value' => $child_second->specialization_id, | ||
| 74 | - 'label' => NULL, | ||
| 75 | - 'uncheck' => NULL, | ||
| 76 | - 'class' => 'custom-check', | ||
| 77 | - ], false) ?> | 71 | + ->label('<span></span>' . $child_second->specialization_name) |
| 72 | + ->checkbox([ | ||
| 73 | + 'value' => $child_second->specialization_id, | ||
| 74 | + 'label' => NULL, | ||
| 75 | + 'uncheck' => NULL, | ||
| 76 | + 'class' => 'custom-check', | ||
| 77 | + ], false) ?> | ||
| 78 | </a> | 78 | </a> |
| 79 | </li> | 79 | </li> |
| 80 | <?php endif; ?> | 80 | <?php endif; ?> |
| @@ -104,33 +104,33 @@ | @@ -104,33 +104,33 @@ | ||
| 104 | <div class="input-blocks-wrapper"> | 104 | <div class="input-blocks-wrapper"> |
| 105 | <div class="input-blocks"> | 105 | <div class="input-blocks"> |
| 106 | <?= $form->field($project, 'city') | 106 | <?= $form->field($project, 'city') |
| 107 | - ->widget(Select2::classname(), [ | ||
| 108 | - 'options' => [ 'placeholder' => 'Выбор города ...' ], | ||
| 109 | - 'pluginOptions' => [ | ||
| 110 | - 'allowClear' => true, | ||
| 111 | - 'minimumInputLength' => 3, | ||
| 112 | - 'ajax' => [ | ||
| 113 | - 'url' => \yii\helpers\Url::to([ 'site/city' ]), | ||
| 114 | - 'dataType' => 'json', | ||
| 115 | - 'data' => new JsExpression('function(params) { return {q:params.term}; }'), | ||
| 116 | - ], | ||
| 117 | - 'escapeMarkup' => new JsExpression('function (markup) { return markup; }'), | ||
| 118 | - 'templateResult' => new JsExpression('function(city) { return city.text; }'), | ||
| 119 | - 'templateSelection' => new JsExpression('function (city) { return city.text; }'), | ||
| 120 | - ], | ||
| 121 | - ]); ?> | 107 | + ->widget(Select2::classname(), [ |
| 108 | + 'options' => [ 'placeholder' => 'Выбор города ...' ], | ||
| 109 | + 'pluginOptions' => [ | ||
| 110 | + 'allowClear' => true, | ||
| 111 | + 'minimumInputLength' => 3, | ||
| 112 | + 'ajax' => [ | ||
| 113 | + 'url' => \yii\helpers\Url::to([ 'site/city' ]), | ||
| 114 | + 'dataType' => 'json', | ||
| 115 | + 'data' => new JsExpression('function(params) { return {q:params.term}; }'), | ||
| 116 | + ], | ||
| 117 | + 'escapeMarkup' => new JsExpression('function (markup) { return markup; }'), | ||
| 118 | + 'templateResult' => new JsExpression('function(city) { return city.text; }'), | ||
| 119 | + 'templateSelection' => new JsExpression('function (city) { return city.text; }'), | ||
| 120 | + ], | ||
| 121 | + ]); ?> | ||
| 122 | </div> | 122 | </div> |
| 123 | 123 | ||
| 124 | 124 | ||
| 125 | <div class="input-blocks street-input"> | 125 | <div class="input-blocks street-input"> |
| 126 | <?= $form->field($project, 'street', [ 'template' => "{label}{input}{hint}{error}" ]) | 126 | <?= $form->field($project, 'street', [ 'template' => "{label}{input}{hint}{error}" ]) |
| 127 | - ->textInput([ 'class' => 'custom-input-2' ]) ?> | 127 | + ->textInput([ 'class' => 'custom-input-2' ]) ?> |
| 128 | </div> | 128 | </div> |
| 129 | 129 | ||
| 130 | 130 | ||
| 131 | <div class="input-blocks home-input"> | 131 | <div class="input-blocks home-input"> |
| 132 | <?= $form->field($project, 'house', [ 'template' => "{label}{input}{hint}{error}" ]) | 132 | <?= $form->field($project, 'house', [ 'template' => "{label}{input}{hint}{error}" ]) |
| 133 | - ->textInput([ 'class' => 'custom-input-2' ]) ?> | 133 | + ->textInput([ 'class' => 'custom-input-2' ]) ?> |
| 134 | </div> | 134 | </div> |
| 135 | </div> | 135 | </div> |
| 136 | </div> | 136 | </div> |
| @@ -140,20 +140,20 @@ | @@ -140,20 +140,20 @@ | ||
| 140 | <?= $form->field($project, 'budget', [ | 140 | <?= $form->field($project, 'budget', [ |
| 141 | 'template' => "{label}<br />{input}\n{hint}\n{error}", | 141 | 'template' => "{label}<br />{input}\n{hint}\n{error}", |
| 142 | ]) | 142 | ]) |
| 143 | - ->textInput([ | ||
| 144 | - 'class' => 'custom-input-2 custom-input-2-date', | ||
| 145 | - 'type' => 'number', | ||
| 146 | - ]) ?> | 143 | + ->textInput([ |
| 144 | + 'class' => 'custom-input-2 custom-input-2-date', | ||
| 145 | + 'type' => 'number', | ||
| 146 | + ]) ?> | ||
| 147 | </div> | 147 | </div> |
| 148 | <div class="input-blocks admin-project-list-two admin-currency-second"> | 148 | <div class="input-blocks admin-project-list-two admin-currency-second"> |
| 149 | <?= $form->field($project, 'budget_currency') | 149 | <?= $form->field($project, 'budget_currency') |
| 150 | - ->label(false) | ||
| 151 | - ->dropDownList(Currency::getCurrencyDropdown(), [ 'class' => 'custom-input-2' ]); ?> | 150 | + ->label(false) |
| 151 | + ->dropDownList(Currency::getCurrencyDropdown(), [ 'class' => 'custom-input-2' ]); ?> | ||
| 152 | </div> | 152 | </div> |
| 153 | <div class="input-blocks admin-who-check-payment admin-project-contractual"> | 153 | <div class="input-blocks admin-who-check-payment admin-project-contractual"> |
| 154 | <?= $form->field($project, 'contractual', [ 'template' => "{input}{label}\n{hint}\n{error}" ]) | 154 | <?= $form->field($project, 'contractual', [ 'template' => "{input}{label}\n{hint}\n{error}" ]) |
| 155 | - ->checkbox([ 'class' => 'custom-check' ], false) | ||
| 156 | - ->label('<span></span>Договорной') ?> | 155 | + ->checkbox([ 'class' => 'custom-check' ], false) |
| 156 | + ->label('<span></span>Договорной') ?> | ||
| 157 | </div> | 157 | </div> |
| 158 | 158 | ||
| 159 | </div> | 159 | </div> |
| @@ -161,37 +161,37 @@ | @@ -161,37 +161,37 @@ | ||
| 161 | <div class="input-blocks-wrapper"> | 161 | <div class="input-blocks-wrapper"> |
| 162 | <div class="input-blocks"> | 162 | <div class="input-blocks"> |
| 163 | <?= $form->field($project, 'payment_variant') | 163 | <?= $form->field($project, 'payment_variant') |
| 164 | - ->radioList([ | ||
| 165 | - 1 => 'Без предоплаты', | ||
| 166 | - 2 => 'Предоплата возможна', | ||
| 167 | - ], [ | ||
| 168 | - 'item' => function($index, $label, $name, $checked, $value) { | ||
| 169 | - $return = '<div class="admin-who-check">'; | ||
| 170 | - $return .= '<input class="custom-radio" id="select_admin_mfp' . $value . '" type="radio" name="' . $name . '" value="' . $value . '" ' . ( $checked ? "checked" : "" ) . ' >'; | ||
| 171 | - $return .= '<label for="select_admin_mfp' . $value . '" >'; | ||
| 172 | - $return .= '<span></span>' . ucwords($label); | ||
| 173 | - $return .= '</label>'; | ||
| 174 | - $return .= '</div>'; | ||
| 175 | - return $return; | ||
| 176 | - }, | ||
| 177 | - ]) ?> | 164 | + ->radioList([ |
| 165 | + 1 => 'Без предоплаты', | ||
| 166 | + 2 => 'Предоплата возможна', | ||
| 167 | + ], [ | ||
| 168 | + 'item' => function($index, $label, $name, $checked, $value) { | ||
| 169 | + $return = '<div class="admin-who-check">'; | ||
| 170 | + $return .= '<input class="custom-radio" id="select_admin_mfp' . $value . '" type="radio" name="' . $name . '" value="' . $value . '" ' . ( $checked ? "checked" : "" ) . ' >'; | ||
| 171 | + $return .= '<label for="select_admin_mfp' . $value . '" >'; | ||
| 172 | + $return .= '<span></span>' . ucwords($label); | ||
| 173 | + $return .= '</label>'; | ||
| 174 | + $return .= '</div>'; | ||
| 175 | + return $return; | ||
| 176 | + }, | ||
| 177 | + ]) ?> | ||
| 178 | </div> | 178 | </div> |
| 179 | </div> | 179 | </div> |
| 180 | 180 | ||
| 181 | <div class="input-blocks-wrapper"> | 181 | <div class="input-blocks-wrapper"> |
| 182 | <div class="input-blocks"> | 182 | <div class="input-blocks"> |
| 183 | <?= $form->field($project, 'paymentInput') | 183 | <?= $form->field($project, 'paymentInput') |
| 184 | - ->checkboxList($payment, [ | ||
| 185 | - 'item' => function($index, $label, $name, $checked, $value) { | ||
| 186 | - $return = '<div class="admin-who-check-payment">'; | ||
| 187 | - $return .= '<input class="custom-check" id="check_admin_mfp' . $value . '" type="checkbox" name="' . $name . '" value="' . $value . '" ' . ( $checked ? "checked" : "" ) . ' >'; | ||
| 188 | - $return .= '<label for="check_admin_mfp' . $value . '" >'; | ||
| 189 | - $return .= '<span></span>' . ucwords($label); | ||
| 190 | - $return .= '</label>'; | ||
| 191 | - $return .= '</div>'; | ||
| 192 | - return $return; | ||
| 193 | - }, | ||
| 194 | - ]) ?> | 184 | + ->checkboxList($payment, [ |
| 185 | + 'item' => function($index, $label, $name, $checked, $value) { | ||
| 186 | + $return = '<div class="admin-who-check-payment">'; | ||
| 187 | + $return .= '<input class="custom-check" id="check_admin_mfp' . $value . '" type="checkbox" name="' . $name . '" value="' . $value . '" ' . ( $checked ? "checked" : "" ) . ' >'; | ||
| 188 | + $return .= '<label for="check_admin_mfp' . $value . '" >'; | ||
| 189 | + $return .= '<span></span>' . ucwords($label); | ||
| 190 | + $return .= '</label>'; | ||
| 191 | + $return .= '</div>'; | ||
| 192 | + return $return; | ||
| 193 | + }, | ||
| 194 | + ]) ?> | ||
| 195 | </div> | 195 | </div> |
| 196 | </div> | 196 | </div> |
| 197 | 197 | ||
| @@ -199,70 +199,71 @@ | @@ -199,70 +199,71 @@ | ||
| 199 | <div class="input-blocks-wrapper"> | 199 | <div class="input-blocks-wrapper"> |
| 200 | <div class="input-blocks admin-project-days"> | 200 | <div class="input-blocks admin-project-days"> |
| 201 | <?= $form->field($project, 'deadline', [ 'template' => "{label}<br />{input}<span class='admn-input-txt' style='padding-left: 10px'>дней</span>\n{hint}\n{error}" ]) | 201 | <?= $form->field($project, 'deadline', [ 'template' => "{label}<br />{input}<span class='admn-input-txt' style='padding-left: 10px'>дней</span>\n{hint}\n{error}" ]) |
| 202 | - ->textInput([ | ||
| 203 | - 'class' => 'custom-input-2 custom-input-2-date', | ||
| 204 | - 'type' => 'number', | ||
| 205 | - ]) ?> | 202 | + ->textInput([ |
| 203 | + 'class' => 'custom-input-2 custom-input-2-date', | ||
| 204 | + 'type' => 'number', | ||
| 205 | + ]) ?> | ||
| 206 | </div> | 206 | </div> |
| 207 | </div> | 207 | </div> |
| 208 | 208 | ||
| 209 | <div class="input-blocks-wrapper full-blocks admin-editor-bl"> | 209 | <div class="input-blocks-wrapper full-blocks admin-editor-bl"> |
| 210 | <div class="input-blocks"> | 210 | <div class="input-blocks"> |
| 211 | <?= $form->field($project, 'description') | 211 | <?= $form->field($project, 'description') |
| 212 | - ->widget(CKEditor::className()) ?> | 212 | + ->widget(CKEditor::className()) ?> |
| 213 | </div> | 213 | </div> |
| 214 | </div> | 214 | </div> |
| 215 | 215 | ||
| 216 | <?php | 216 | <?php |
| 217 | - /* == Old file upload == | ||
| 218 | - ?> | ||
| 219 | - <div class="input-blocks-wrapper admin-project-file"> | ||
| 220 | - <div class="input-blocks"> | ||
| 221 | - <div style="position: absolute; float: left;top: 0; left: 0; z-index: 1; width: 100%; overflow: hidden"> | ||
| 222 | - <div class="gen-admin-title">Присоединить файл</div> | ||
| 223 | - <div class="admin-project-file-btn">Загрузить</div> | ||
| 224 | - <div class="not-file-mb-adm">До 3 Мб файл</div> | ||
| 225 | - </div> | ||
| 226 | - <div style="opacity: 0; height: 54px; width: 100%; float: left;position: absolute; top: 0;left: 0; z-index: 2;-ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=0)'"> | ||
| 227 | - <?= $form->field($project, 'files[]') | ||
| 228 | - ->fileInput([ 'multiple' => 'multiple' ]) ?> | ||
| 229 | - </div> | 217 | +/* == Old file upload == |
| 218 | +?> | ||
| 219 | +<div class="input-blocks-wrapper admin-project-file"> | ||
| 220 | + <div class="input-blocks"> | ||
| 221 | + <div style="position: absolute; float: left;top: 0; left: 0; z-index: 1; width: 100%; overflow: hidden"> | ||
| 222 | + <div class="gen-admin-title">Присоединить файл</div> | ||
| 223 | + <div class="admin-project-file-btn">Загрузить</div> | ||
| 224 | + <div class="not-file-mb-adm">До 3 Мб файл</div> | ||
| 225 | + </div> | ||
| 226 | + <div style="opacity: 0; height: 54px; width: 100%; float: left;position: absolute; top: 0;left: 0; z-index: 2;-ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=0)'"> | ||
| 227 | + <?= $form->field($project, 'files[]') | ||
| 228 | + ->fileInput([ 'multiple' => 'multiple' ]) ?> | ||
| 230 | </div> | 229 | </div> |
| 231 | </div> | 230 | </div> |
| 232 | - <?php | ||
| 233 | - == End of old file upload == */ | 231 | +</div> |
| 232 | +<?php | ||
| 233 | + == End of old file upload == */ | ||
| 234 | ?> | 234 | ?> |
| 235 | 235 | ||
| 236 | <div class="input-blocks-wrapper"> | 236 | <div class="input-blocks-wrapper"> |
| 237 | <?php | 237 | <?php |
| 238 | - echo $form->field($project, 'fileloader') | ||
| 239 | - ->label(false) | ||
| 240 | - ->widget(FileloaderWidget::className(), [ | ||
| 241 | - 'labelOptions' => [ 'label' => '<div class="gen-admin-title">Присоединить файлы</div><div class="admin-project-file-btn">Загрузить</div><div class="not-file-mb-adm">До 3 Мб файл</div>' ], | ||
| 242 | - 'inputOptions' => [ | ||
| 243 | - 'multiple' => 'multiple', | ||
| 244 | - 'class' => 'hidden', | ||
| 245 | - ], | ||
| 246 | - 'options' => [ 'class' => 'fileloader-file' ], | ||
| 247 | - ]); | 238 | + echo $form->field($project, 'fileloader') |
| 239 | + ->label(false) | ||
| 240 | + ->widget(FileloaderWidget::className(), [ | ||
| 241 | + 'labelOptions' => [ 'label' => '<div class="gen-admin-title">Присоединить файлы</div><div class="admin-project-file-btn">Загрузить</div><div class="not-file-mb-adm">До 3 Мб файл</div>' ], | ||
| 242 | + 'inputOptions' => [ | ||
| 243 | + 'multiple' => 'multiple', | ||
| 244 | + 'class' => 'hidden', | ||
| 245 | + ], | ||
| 246 | + 'options' => [ 'class' => 'fileloader-file' ], | ||
| 247 | + ]); | ||
| 248 | ?> | 248 | ?> |
| 249 | </div> | 249 | </div> |
| 250 | 250 | ||
| 251 | <div class="input-blocks-wrapper"> | 251 | <div class="input-blocks-wrapper"> |
| 252 | <div class="input-blocks admin-project-list admin-currency-second"> | 252 | <div class="input-blocks admin-project-list admin-currency-second"> |
| 253 | <?= $form->field($project, 'date_end') | 253 | <?= $form->field($project, 'date_end') |
| 254 | - ->widget(DatePicker::className(), [ | ||
| 255 | - 'dateFormat' => 'yyyy-MM-dd', | ||
| 256 | - 'clientOptions' => [ 'minDate' => 1 ], | ||
| 257 | - ]) ?> | 254 | + ->widget(DatePicker::className(), [ |
| 255 | + 'dateFormat' => 'yyyy-MM-dd', | ||
| 256 | + 'clientOptions' => [ 'minDate' => 1 ], | ||
| 257 | + ]) ?> | ||
| 258 | </div> | 258 | </div> |
| 259 | </div> | 259 | </div> |
| 260 | 260 | ||
| 261 | -<div class="input-blocks-wrapper"> | 261 | +<div class="input-blocks-wrapper hint-link hint-link-check"> |
| 262 | <div class="input-blocks admin-project-list admin-currency-second"> | 262 | <div class="input-blocks admin-project-list admin-currency-second"> |
| 263 | - <?= $form->field($project, 'hidden') | ||
| 264 | - ->checkbox() | ||
| 265 | - ->hint('Проект, снятый с тендера, будет добавлен в Архив (не доступен в поиске, но доступен по ссылке)') ?> | 263 | + <?= $form->field($project, 'hidden', [ 'template' => "{input}{label}\n{hint}\n{error}" ]) |
| 264 | + ->checkbox([ 'class' => 'custom-check admin-check' ], false) | ||
| 265 | + ->label('<span></span>Снять с тендера') | ||
| 266 | + ->hint('Проект, снятый с тендера, будет добавлен в Архив (не доступен в поиске, но доступен по ссылке)') ?> | ||
| 266 | </div> | 267 | </div> |
| 267 | </div> | 268 | </div> |
| 268 | 269 | ||
| @@ -271,18 +272,18 @@ | @@ -271,18 +272,18 @@ | ||
| 271 | <?= Html::submitButton($project->isNewRecord ? Yii::t('app', 'add') : 'Обновить', [ 'class' => 'input-blocks-wrapper button' ]) ?> | 272 | <?= Html::submitButton($project->isNewRecord ? Yii::t('app', 'add') : 'Обновить', [ 'class' => 'input-blocks-wrapper button' ]) ?> |
| 272 | <div class="admin-remove-note"> | 273 | <div class="admin-remove-note"> |
| 273 | <?php | 274 | <?php |
| 274 | - if(!$project->isNewRecord) { | ||
| 275 | - echo Html::a(Yii::t('app', 'delete'), [ | ||
| 276 | - 'accounts/projects-delete', | ||
| 277 | - 'id' => $project->project_id, | ||
| 278 | - ], [ | ||
| 279 | - 'title' => Yii::t('app', 'delete'), | ||
| 280 | - 'aria-label' => Yii::t('app', 'delete'), | ||
| 281 | - 'data-confirm' => Yii::t('app', 'delete_confirm'), | ||
| 282 | - 'data-method' => 'post', | ||
| 283 | - 'data-pjax' => 0, | ||
| 284 | - ]); | ||
| 285 | - } | 275 | + if(!$project->isNewRecord) { |
| 276 | + echo Html::a(Yii::t('app', 'delete'), [ | ||
| 277 | + 'accounts/projects-delete', | ||
| 278 | + 'id' => $project->project_id, | ||
| 279 | + ], [ | ||
| 280 | + 'title' => Yii::t('app', 'delete'), | ||
| 281 | + 'aria-label' => Yii::t('app', 'delete'), | ||
| 282 | + 'data-confirm' => Yii::t('app', 'delete_confirm'), | ||
| 283 | + 'data-method' => 'post', | ||
| 284 | + 'data-pjax' => 0, | ||
| 285 | + ]); | ||
| 286 | + } | ||
| 286 | ?> | 287 | ?> |
| 287 | </div> | 288 | </div> |
| 288 | <div class="admin-back-note"> | 289 | <div class="admin-back-note"> |
| @@ -292,7 +293,7 @@ | @@ -292,7 +293,7 @@ | ||
| 292 | </div> | 293 | </div> |
| 293 | 294 | ||
| 294 | <?php | 295 | <?php |
| 295 | - $form->end(); | 296 | +$form->end(); |
| 296 | ?> | 297 | ?> |
| 297 | <script> | 298 | <script> |
| 298 | $(document).ready( | 299 | $(document).ready( |
| @@ -308,7 +309,7 @@ | @@ -308,7 +309,7 @@ | ||
| 308 | if($('.admin-project-contractual input[type="checkbox"]').prop("checked")) | 309 | if($('.admin-project-contractual input[type="checkbox"]').prop("checked")) |
| 309 | { | 310 | { |
| 310 | $('.admin-project-list-two input, .admin-project-list-two select') | 311 | $('.admin-project-list-two input, .admin-project-list-two select') |
| 311 | - .attr('disabled', 'disabled') | 312 | + .attr('disabled', 'disabled') |
| 312 | } | 313 | } |
| 313 | $('.admin-project-contractual input[type="checkbox"]').change( | 314 | $('.admin-project-contractual input[type="checkbox"]').change( |
| 314 | function() | 315 | function() |
| @@ -316,11 +317,11 @@ | @@ -316,11 +317,11 @@ | ||
| 316 | if($(this).prop("checked")) | 317 | if($(this).prop("checked")) |
| 317 | { | 318 | { |
| 318 | $('.admin-project-list-two input, .admin-project-list-two select') | 319 | $('.admin-project-list-two input, .admin-project-list-two select') |
| 319 | - .attr('disabled', 'disabled') | 320 | + .attr('disabled', 'disabled') |
| 320 | } else | 321 | } else |
| 321 | { | 322 | { |
| 322 | $('.admin-project-list-two input, .admin-project-list-two select') | 323 | $('.admin-project-list-two input, .admin-project-list-two select') |
| 323 | - .removeAttr('disabled') | 324 | + .removeAttr('disabled') |
| 324 | } | 325 | } |
| 325 | } | 326 | } |
| 326 | ) | 327 | ) |
| @@ -334,6 +335,10 @@ | @@ -334,6 +335,10 @@ | ||
| 334 | } | 335 | } |
| 335 | ); | 336 | ); |
| 336 | 337 | ||
| 338 | + $('#project-date_end').focus(function () { | ||
| 339 | + $('#ui-datepicker-div').addClass('fix-color-datepicker') | ||
| 340 | + }) | ||
| 337 | } | 341 | } |
| 338 | ) | 342 | ) |
| 339 | </script> | 343 | </script> |
| 344 | + |
frontend/web/css/style.css
| @@ -3365,7 +3365,7 @@ ul.proektant-comments {margin-top: 15px} | @@ -3365,7 +3365,7 @@ ul.proektant-comments {margin-top: 15px} | ||
| 3365 | width: 104px; | 3365 | width: 104px; |
| 3366 | height: 41px; | 3366 | height: 41px; |
| 3367 | float: right; | 3367 | float: right; |
| 3368 | - margin-right: 20px; | 3368 | + margin-right: 38px; |
| 3369 | position: relative; | 3369 | position: relative; |
| 3370 | } | 3370 | } |
| 3371 | .main-menu-icons-wr a{ | 3371 | .main-menu-icons-wr a{ |
| @@ -4651,7 +4651,7 @@ ul.download-list-files li:hover .download-link {transition: 0.2s; opacity: 1; -m | @@ -4651,7 +4651,7 @@ ul.download-list-files li:hover .download-link {transition: 0.2s; opacity: 1; -m | ||
| 4651 | float: left; | 4651 | float: left; |
| 4652 | } | 4652 | } |
| 4653 | 4653 | ||
| 4654 | -.custom-input-2 { | 4654 | +.custom-input-2, input.hasDatepicker { |
| 4655 | width: 300px; | 4655 | width: 300px; |
| 4656 | height: 29px; | 4656 | height: 29px; |
| 4657 | border: 1px solid #dcdcdc; | 4657 | border: 1px solid #dcdcdc; |
| @@ -4666,7 +4666,7 @@ ul.download-list-files li:hover .download-link {transition: 0.2s; opacity: 1; -m | @@ -4666,7 +4666,7 @@ ul.download-list-files li:hover .download-link {transition: 0.2s; opacity: 1; -m | ||
| 4666 | outline: none; | 4666 | outline: none; |
| 4667 | } | 4667 | } |
| 4668 | .custom-input-2.fix-input-2 {width: 100%} | 4668 | .custom-input-2.fix-input-2 {width: 100%} |
| 4669 | -.custom-input-2:focus, .selectize-input input:focus, .search-work-form select:focus {border: 1px solid #dcdcdc;box-shadow: 1px 2px 2px 0px rgba(215, 215, 215, 0.75) inset; transition: 0.1s; outline: none} | 4669 | +.custom-input-2:focus, .selectize-input input:focus, .search-work-form select:focus, input.hasDatepicker:focus {border: 1px solid #dcdcdc;box-shadow: 1px 2px 2px 0px rgba(215, 215, 215, 0.75) inset; transition: 0.1s; outline: none} |
| 4670 | .input-blocks select {margin-top: 5px} | 4670 | .input-blocks select {margin-top: 5px} |
| 4671 | .input-blocks label, .skills-title { | 4671 | .input-blocks label, .skills-title { |
| 4672 | font-size: 13px; | 4672 | font-size: 13px; |
| @@ -6458,6 +6458,7 @@ input[disabled], select[disabled] { | @@ -6458,6 +6458,7 @@ input[disabled], select[disabled] { | ||
| 6458 | padding-left: 8px; | 6458 | padding-left: 8px; |
| 6459 | width: 85px; | 6459 | width: 85px; |
| 6460 | float: left; | 6460 | float: left; |
| 6461 | + margin-top: 0; | ||
| 6461 | } | 6462 | } |
| 6462 | .admin-table-portfolio .input-group.input-group-xs input:focus{ | 6463 | .admin-table-portfolio .input-group.input-group-xs input:focus{ |
| 6463 | box-shadow: 1px 2px 2px 0px rgba(215, 215, 215, 0.75) inset; transition: 0.1s; outline: none | 6464 | box-shadow: 1px 2px 2px 0px rgba(215, 215, 215, 0.75) inset; transition: 0.1s; outline: none |
| @@ -6801,4 +6802,11 @@ li.active-menu-admin:hover a .ico_num { | @@ -6801,4 +6802,11 @@ li.active-menu-admin:hover a .ico_num { | ||
| 6801 | font-size: 13px; | 6802 | font-size: 13px; |
| 6802 | color: #D40000; | 6803 | color: #D40000; |
| 6803 | margin-top: 12px; | 6804 | margin-top: 12px; |
| 6804 | -} | ||
| 6805 | \ No newline at end of file | 6805 | \ No newline at end of file |
| 6806 | +} | ||
| 6807 | +.hint-link.hint-link-check .hint-block { | ||
| 6808 | + top:0; | ||
| 6809 | + margin-top: -3px; | ||
| 6810 | + left: 133px; | ||
| 6811 | +} | ||
| 6812 | +.hint-link-check {margin-top: 23px} | ||
| 6813 | +.fix-color-datepicker .ui-datepicker-title {color: #fff} | ||
| 6806 | \ No newline at end of file | 6814 | \ No newline at end of file |