Commit ca009a8957285e52c8657d248edcb59c97f36720
Merge remote-tracking branch 'origin/master'
Showing
7 changed files
with
116 additions
and
38 deletions
Show diff stats
common/widgets/views/courses_field.php
common/widgets/views/development_field.php
common/widgets/views/education_field.php
| ... | ... | @@ -4,10 +4,10 @@ |
| 4 | 4 | ?> |
| 5 | 5 | <fieldset> |
| 6 | 6 | |
| 7 | - <legend>Образование</legend> | |
| 7 | +<div class="skills-title">Образование</div> | |
| 8 | 8 | |
| 9 | - <p class="btn btn-success add_field_<?= $this->context->id ?>">Добавить поле</p> | |
| 10 | 9 | |
| 10 | + <p class="btn btn-success add_field_<?= $this->context->id ?>">Добавить поле</p> | |
| 11 | 11 | |
| 12 | 12 | <?php $t = 0; |
| 13 | 13 | for($i = 1; $i <= count($model); $i++): |
| ... | ... | @@ -19,16 +19,24 @@ |
| 19 | 19 | 'class' => 'form-group', |
| 20 | 20 | 'id' => isset( $model[ $i ][ 'parent_key' ] ) ? $model[ $i ][ 'parent_key' ] : 0, |
| 21 | 21 | ]) ?> |
| 22 | - <input type="text" placeholder="Название" class="form-control" value="<?= isset( $model[ $t ][ 'value' ] ) ? $model[ $t ][ 'value' ] : '' ?>" name="Fields[education][<?= $row ?>][0][name]"/> | |
| 23 | - <input type="number" class="form-control" value="<?= isset( $model[ ++$t ][ 'value' ] ) ? $model[ $t ][ 'value' ] : '' ?>" name="Fields[education][<?= $row ?>][1][year_from]"/> | |
| 24 | - <input type="number" class="form-control" value="<?= isset( $model[ ++$t ][ 'value' ] ) ? $model[ $t ][ 'value' ] : '' ?>" name="Fields[education][<?= $row ?>][2][year_to]"/> | |
| 22 | + <input id="edu-name-<?= $t ?>" type="text" placeholder="Название" class="form-control custom-input-2" value="<?= isset( $model[ $t ][ 'value' ] ) ? $model[ $t ][ 'value' ] : '' ?>" name="Fields[education][<?= $row ?>][0][name]"/> | |
| 23 | + <label for="edu-name-<?= $t ?>"></label> | |
| 24 | + | |
| 25 | + <input id="edu-to-<?= $t ?>" type="number" class="form-control form-control custom-input-2 custom-input-2-date" value="<?= isset( $model[ ++$t ][ 'value' ] ) ? $model[ $t ][ 'value' ] : '' ?>" name="Fields[education][<?= $row ?>][1][year_from]"/> | |
| 26 | + <label for="edu-to-<?= $t ?>"></label> | |
| 27 | + | |
| 28 | + <input id="edu-to-<?= $t ?>" type="number" class="form-control form-control custom-input-2 custom-input-2-date" value="<?= isset( $model[ ++$t ][ 'value' ] ) ? $model[ $t ][ 'value' ] : '' ?>" name="Fields[education][<?= $row ?>][2][year_to]"/> | |
| 29 | + <label for="edu-out-<?= $t ?>"></label> | |
| 30 | + | |
| 25 | 31 | <span data-id="<?= isset( $model[ $i ][ 'parent_key' ] ) ? $model[ $i ][ 'parent_key' ] : 0 ?>" title="удалить" class="glyphicon glyphicon-trash delete-field-item"></span> |
| 26 | 32 | <?= Html::endTag('div') ?> |
| 27 | 33 | <?php $i = ++$t; ?> |
| 28 | 34 | <?php endfor; ?> |
| 29 | 35 | |
| 30 | 36 | |
| 37 | + | |
| 31 | 38 | </fieldset> |
| 39 | + | |
| 32 | 40 | <script> |
| 33 | 41 | var start_i_<?=$this->context->id?> = <?=$i?>; |
| 34 | 42 | $ (document) |
| ... | ... | @@ -44,9 +52,12 @@ |
| 44 | 52 | var block_id = $ (this) |
| 45 | 53 | .parent ('fieldset'); |
| 46 | 54 | var sub_block = '<div class="form-group" >' + |
| 47 | - '<input type="text" placeholder="Название" class="form-control" value="" name="Fields[education][' + start_i_<?=$this->context->id?>++ + '][0][name]" />' + | |
| 48 | - '<input type="number" class="form-control" value="" name="Fields[education][' + start_i_<?=$this->context->id?>++ + '][1][year_from]" />' + | |
| 49 | - '<input type="number" class="form-control" value="" name="Fields[education][' + start_i_<?=$this->context->id?>++ + '][2][year_to]" />' + | |
| 55 | + '<input id="edu-name-' + start_i_<?=$this->context->id?>++ +'" type="text" placeholder="" class="form-control custom-input-2" value="" name="Fields[education][' + start_i_<?=$this->context->id?>++ + '][0][name]" />' + | |
| 56 | + '<label for="edu-name-' + start_i_<?=$this->context->id?>++ +'"></label>'+ | |
| 57 | + '<input id="edu-to-' + start_i_<?=$this->context->id?>++ +'" type="number" class="form-control custom-input-2 custom-input-2-date" value="" name="Fields[education][' + start_i_<?=$this->context->id?>++ + '][1][year_from]" />' + | |
| 58 | + '<label for="edu-to-' + start_i_<?=$this->context->id?>++ +'"></label>'+ | |
| 59 | + '<input id="edu-out-' + start_i_<?=$this->context->id?>++ +'"" type="number" class="form-control custom-input-2 custom-input-2-date" value="" name="Fields[education][' + start_i_<?=$this->context->id?>++ + '][2][year_to]" />' + | |
| 60 | + '<label for="edu-out-' + start_i_<?=$this->context->id?>++ +'"></label>'+ | |
| 50 | 61 | '<span title="удалить" class="glyphicon glyphicon-trash delete-field-item"></span>' + |
| 51 | 62 | '<div>'; |
| 52 | 63 | console.log (block); | ... | ... |
common/widgets/views/soft_field.php
| ... | ... | @@ -4,7 +4,7 @@ |
| 4 | 4 | ?> |
| 5 | 5 | <fieldset> |
| 6 | 6 | |
| 7 | - <legend>Работа с программами</legend> | |
| 7 | + <div class="skills-title">Работа с программами</div> | |
| 8 | 8 | |
| 9 | 9 | <p class="btn btn-success add_field_<?= $this->context->id ?>">Добавить поле</p> |
| 10 | 10 | |
| ... | ... | @@ -19,7 +19,7 @@ |
| 19 | 19 | 'class' => 'form-group', |
| 20 | 20 | 'id' => isset( $model[ $i ][ 'parent_key' ] ) ? $model[ $i ][ 'parent_key' ] : 0, |
| 21 | 21 | ]) ?> |
| 22 | - <input type="text" placeholder="Программа" class="form-control" value="<?= isset( $model[ $t ][ 'value' ] ) ? $model[ $t ][ 'value' ] : '' ?>" name="Fields[soft][<?= $row ?>][0][soft]"/> | |
| 22 | + <input type="text" placeholder="" class="form-control custom-input-2" value="<?= isset( $model[ $t ][ 'value' ] ) ? $model[ $t ][ 'value' ] : '' ?>" name="Fields[soft][<?= $row ?>][0][soft]"/> | |
| 23 | 23 | <span data-id="<?= isset( $model[ $i ][ 'parent_key' ] ) ? $model[ $i ][ 'parent_key' ] : 0 ?>" title="удалить" class="glyphicon glyphicon-trash delete-field-item"></span> |
| 24 | 24 | <?= Html::endTag('div') ?> |
| 25 | 25 | <?php $i = ++$t; ?> |
| ... | ... | @@ -42,7 +42,7 @@ |
| 42 | 42 | var block_id = $ (this) |
| 43 | 43 | .parent ('fieldset'); |
| 44 | 44 | var sub_block = '<div class="form-group" >' + |
| 45 | - '<input type="text" placeholder="Программа" class="form-control" value="" name="Fields[soft][' + start_i_<?=$this->context->id?>++ + '][0][soft]" />' + | |
| 45 | + '<input type="text" placeholder="" class="form-control custom-input-2" value="" name="Fields[soft][' + start_i_<?=$this->context->id?>++ + '][0][soft]" />' + | |
| 46 | 46 | '<span title="удалить" class="glyphicon glyphicon-trash delete-field-item"></span>' + |
| 47 | 47 | '<div>'; |
| 48 | 48 | console.log (block); | ... | ... |
frontend/views/accounts/add-skills.php
| ... | ... | @@ -12,31 +12,57 @@ use \common\widgets\MultiLangForm; |
| 12 | 12 | $this->title = 'Дополнительные навыки'; |
| 13 | 13 | $this->params['breadcrumbs'][] = $this->title; |
| 14 | 14 | ?> |
| 15 | -<h1><?= $this->title ?></h1> | |
| 15 | + <div class="login-left-column-title"><?= $this->title ?></div> | |
| 16 | 16 | <?php |
| 17 | 17 | $form = ActiveForm::begin(); |
| 18 | 18 | ?> |
| 19 | -<?= FieldEditor::widget ( | |
| 20 | - [ | |
| 21 | - 'template' => 'soft', 'item_id' => $user->id, 'model' => 'common\models\User', 'language' => 'ru', | |
| 22 | - ] | |
| 23 | -); ?> | |
| 24 | -<?= FieldEditor::widget ( | |
| 25 | - [ | |
| 26 | - 'template' => 'education', 'item_id' => $user->id, 'model' => 'common\models\User', 'language' => 'ru', | |
| 27 | - ] | |
| 28 | -); ?> | |
| 29 | -<?= FieldEditor::widget ( | |
| 30 | - [ | |
| 31 | - 'template' => 'development', 'item_id' => $user->id, 'model' => 'common\models\User', 'language' => 'ru', | |
| 32 | - ] | |
| 33 | -); ?> | |
| 34 | -<?= FieldEditor::widget ( | |
| 35 | - [ | |
| 36 | - 'template' => 'courses', 'item_id' => $user->id, 'model' => 'common\models\User', 'language' => 'ru', | |
| 37 | - ] | |
| 38 | -); ?> | |
| 39 | - <?= Html::submitButton('Обновить') ?> | |
| 19 | +<div class="skills-admin-wrapper style"> | |
| 20 | + <div class="input-blocks-wrapper"> | |
| 21 | + <div class="input-blocks"> | |
| 22 | + <?= FieldEditor::widget ( | |
| 23 | + [ | |
| 24 | + 'template' => 'soft', 'item_id' => $user->id, 'model' => 'common\models\User', 'language' => 'ru', | |
| 25 | + ] | |
| 26 | + ); ?> | |
| 27 | + </div> | |
| 28 | + </div> | |
| 29 | + | |
| 30 | + <div class="input-blocks-wrapper"> | |
| 31 | + <div class="input-blocks"> | |
| 32 | + <?= FieldEditor::widget ( | |
| 33 | + [ | |
| 34 | + 'template' => 'education', 'item_id' => $user->id, 'model' => 'common\models\User', 'language' => 'ru', | |
| 35 | + ] | |
| 36 | + ); ?> | |
| 37 | + </div> | |
| 38 | + </div> | |
| 39 | + | |
| 40 | + <div class="input-blocks-wrapper"> | |
| 41 | + <div class="input-blocks"> | |
| 42 | + <?= FieldEditor::widget ( | |
| 43 | + [ | |
| 44 | + 'template' => 'development', 'item_id' => $user->id, 'model' => 'common\models\User', 'language' => 'ru', | |
| 45 | + ] | |
| 46 | + ); ?> | |
| 47 | + </div> | |
| 48 | + </div> | |
| 49 | + | |
| 50 | + <div class="input-blocks-wrapper"> | |
| 51 | + <div class="input-blocks"> | |
| 52 | + <?= FieldEditor::widget ( | |
| 53 | + [ | |
| 54 | + 'template' => 'courses', 'item_id' => $user->id, 'model' => 'common\models\User', 'language' => 'ru', | |
| 55 | + ] | |
| 56 | + ); ?> | |
| 57 | + </div> | |
| 58 | + </div> | |
| 59 | + | |
| 60 | + <div class="input-blocks-wrapper"> | |
| 61 | + <div class="input-blocks"> | |
| 62 | + <?= Html::submitButton('Обновить') ?> | |
| 63 | + </div> | |
| 64 | + </div> | |
| 65 | +</div> | |
| 40 | 66 | <?php |
| 41 | 67 | $form->end(); |
| 42 | 68 | ?> |
| 43 | 69 | \ No newline at end of file | ... | ... |
frontend/views/layouts/admin.php
frontend/web/css/style.css
| ... | ... | @@ -4567,7 +4567,7 @@ ul.download-list-files li:hover .download-link {transition: 0.2s; opacity: 1; -m |
| 4567 | 4567 | .custom-input-2.fix-input-2 {width: 100%} |
| 4568 | 4568 | .custom-input-2:focus, .selectize-input input:focus {box-shadow: 1px 2px 2px 0px rgba(215, 215, 215, 0.75) inset; transition: 0.1s} |
| 4569 | 4569 | |
| 4570 | -.input-blocks label { | |
| 4570 | +.input-blocks label, .skills-title { | |
| 4571 | 4571 | font-size: 13px; |
| 4572 | 4572 | color: inherit; |
| 4573 | 4573 | font-weight: 700; |
| ... | ... | @@ -5413,4 +5413,45 @@ ul.menu-admin li.logout-li, ul.menu-admin li.logout-li a, ul.menu-admin li:last- |
| 5413 | 5413 | top: 25px; |
| 5414 | 5414 | left: 288px; |
| 5415 | 5415 | } |
| 5416 | -.success_download .not-file-mb-adm{display: none} | |
| 5417 | 5416 | \ No newline at end of file |
| 5417 | +.success_download .not-file-mb-adm{display: none} | |
| 5418 | +.skills-title {border-bottom: none} | |
| 5419 | +.skills-admin-wrapper {margin-top: 29px} | |
| 5420 | +.skills-admin-wrapper .btn{ | |
| 5421 | + border: none; | |
| 5422 | + background: none; | |
| 5423 | + color: #0072bc; | |
| 5424 | + border-bottom: 1px dashed #0072bc; | |
| 5425 | + padding: 0; | |
| 5426 | + border-radius: 0; | |
| 5427 | + line-height: 13px; | |
| 5428 | +} | |
| 5429 | +.skills-admin-wrapper .btn:focus, .skills-admin-wrapper .btn:active{ | |
| 5430 | + background: none; | |
| 5431 | + color: #003AA7; | |
| 5432 | + box-shadow: none; | |
| 5433 | +} | |
| 5434 | +.skills-admin-wrapper .glyphicon-trash:before { | |
| 5435 | + content: '' !important; | |
| 5436 | + width: 13px; | |
| 5437 | + height: 13px; | |
| 5438 | + cursor: pointer; | |
| 5439 | + background: url("/images/delete-ico.png") no-repeat; | |
| 5440 | + display: block; | |
| 5441 | +} | |
| 5442 | +.skills-admin-wrapper .custom-input-2 { | |
| 5443 | + border-radius: 0; | |
| 5444 | + outline: none; | |
| 5445 | +} | |
| 5446 | +.skills-admin-wrapper .custom-input-2:focus{border: 1px solid #dcdcdc;} | |
| 5447 | +.skills-admin-wrapper .form-group {position: relative} | |
| 5448 | +.skills-admin-wrapper .glyphicon { | |
| 5449 | + position: absolute; | |
| 5450 | + top: 50%; | |
| 5451 | + margin-top: -7px; | |
| 5452 | + right: -18px; | |
| 5453 | +} | |
| 5454 | +.custom-input-2.custom-input-2-date { | |
| 5455 | + width: 60px; | |
| 5456 | + padding: 0; | |
| 5457 | + padding-left: 12px; | |
| 5458 | +} | |
| 5418 | 5459 | \ No newline at end of file | ... | ... |