Commit c7e64161fc2ac1446298e66e10343810d20467b6
1 parent
7968ef20
tokar commit
Showing
7 changed files
with
336 additions
and
249 deletions
Show diff stats
backend/web/js/option.js
@@ -151,4 +151,73 @@ $(function() { | @@ -151,4 +151,73 @@ $(function() { | ||
151 | $(document).on('change', 'input[name="User[type]"]', function() { | 151 | $(document).on('change', 'input[name="User[type]"]', function() { |
152 | accountRedraw(); | 152 | accountRedraw(); |
153 | }); | 153 | }); |
154 | -}); | ||
155 | \ No newline at end of file | 154 | \ No newline at end of file |
155 | +}); | ||
156 | +$(document).ready(function(){ | ||
157 | + specializationTags() | ||
158 | + function specializationTags(){ | ||
159 | + addSpecializationTagsLoad() | ||
160 | + removeSpecializationTags() | ||
161 | + newAddSpecializationTags() | ||
162 | + checkSpecialization() | ||
163 | + | ||
164 | + function addSpecializationTagsLoad(){ | ||
165 | + var specTags = $('.admin-page .third-ul-menu input:checked') | ||
166 | + for (var spI=0;spI<specTags.length;spI++) { | ||
167 | + var newSpecTagsId = $(specTags[spI]).attr('id') | ||
168 | + var newSpecTagsTxt = $(specTags[spI]).parents('a').text() | ||
169 | + $('.admin-page .admin-specialization-selected ul').append('<li data-spec-id="'+newSpecTagsId+'">'+newSpecTagsTxt+'</li>') | ||
170 | + } | ||
171 | + } | ||
172 | + | ||
173 | + function removeSpecializationTags(){ | ||
174 | + $('body').on('click', '.admin-page .admin-specialization-selected ul li', function(){ | ||
175 | + var removeSpecTagsId = $(this).attr('data-spec-id') | ||
176 | + $('.admin-page .third-ul-menu #'+removeSpecTagsId).attr('checked', false) | ||
177 | + $(this).remove() | ||
178 | + | ||
179 | + if(($('.admin-page .admin-specialization-selected ul li').size())<1){ | ||
180 | + $('.input-blocks-wrapper.admin-menu-list .admn-menu-err').addClass('has-error') | ||
181 | + } else { | ||
182 | + $('.input-blocks-wrapper.admin-menu-list .admn-menu-err').addClass('has-error').removeClass('has-error') | ||
183 | + } | ||
184 | + }) | ||
185 | + } | ||
186 | + | ||
187 | + function newAddSpecializationTags(){ | ||
188 | + $('.admin-page .third-ul-menu input').change(function(){ | ||
189 | + var thisSpecTagsId = $(this).attr('id') | ||
190 | + var thisSpecTagsTxt = $(this).parents('a').text() | ||
191 | + if($(this).prop("checked")){ | ||
192 | + $('.admin-page .admin-specialization-selected ul').append('<li data-spec-id="'+thisSpecTagsId+'">'+thisSpecTagsTxt+'</li>') | ||
193 | + } else { | ||
194 | + $('.admin-page .admin-specialization-selected ul li[data-spec-id="'+thisSpecTagsId+'"]').remove() | ||
195 | + | ||
196 | + } | ||
197 | + | ||
198 | + if( ($('.admin-page .admin-specialization-selected ul li').length)>0 ){ | ||
199 | + $('.input-blocks-wrapper.admin-menu-list .admn-menu-err').addClass('has-error').removeClass('has-error') | ||
200 | + } else { | ||
201 | + $('.input-blocks-wrapper.admin-menu-list .admn-menu-err').addClass('has-error') | ||
202 | + } | ||
203 | + }) | ||
204 | + } | ||
205 | + | ||
206 | + function checkSpecialization(){ | ||
207 | + if($('.input-blocks-wrapper').hasClass('admin-menu-list')){ | ||
208 | + $('body').on('click', '.admin-page .admin-save-btn button', function(e){ | ||
209 | + if( ($('.admin-page .admin-specialization-selected ul li').length)>0 ){ | ||
210 | + $('.input-blocks-wrapper.admin-menu-list .admn-menu-err').removeClass('has-error') | ||
211 | + } else { | ||
212 | + var errorOffsetSpecial = $('.input-blocks-wrapper.admin-menu-list').offset().top | ||
213 | + e.preventDefault() | ||
214 | + $('body,html').animate({scrollTop:errorOffsetSpecial-50}, 400) | ||
215 | + $('.input-blocks-wrapper.admin-menu-list .admn-menu-err').addClass('has-error') | ||
216 | + } | ||
217 | + }) | ||
218 | + } | ||
219 | + } | ||
220 | + } | ||
221 | + $('.admin-page .admin-menu-list .content-menu-first a').addClass('no-click') | ||
222 | + $('.admin-page .admin-menu-list .content-menu-first a.remove-link, .third-ul-menu a').removeClass('no-click') | ||
223 | + $('.admin-page .admin-menu-list .content-menu-first a.no-click').click(function(e){e.preventDefault()}) | ||
224 | +}) |
frontend/views/accounts/_portfolio_form.php
@@ -46,46 +46,58 @@ | @@ -46,46 +46,58 @@ | ||
46 | </div> | 46 | </div> |
47 | 47 | ||
48 | <div class="input-blocks-wrapper admin-menu-list"> | 48 | <div class="input-blocks-wrapper admin-menu-list"> |
49 | - <ul class="content-menu-first"> | ||
50 | - <?php foreach($specializations as $specialization): ?> | ||
51 | - <li data-img="<?= $specialization->image ?>"> | ||
52 | - <span data-menu-bg="<?= $specialization->background ?>" style="background: <?= $specialization->background ?>"></span><a href="#"><?= $specialization->specialization_name ?></a> | ||
53 | - <ul> | ||
54 | - <?php foreach($specialization->children as $child_first): ?> | ||
55 | - | ||
56 | - <?php if($child_first instanceof Specialization): ?> | ||
57 | - <li> | ||
58 | - <a href="#"><?= $child_first->specialization_name ?></a> | ||
59 | - <ul> | ||
60 | - <?php foreach($child_first->children as $child_second): ?> | ||
61 | - <?php if($child_first instanceof Specialization): ?> | ||
62 | - <li> | ||
63 | - <a href="#" title="<?= $child_second->specialization_name ?>"> | ||
64 | - <?= $form->field($portfolio, "specializationInput[{$child_second->specialization_id}]", [ | ||
65 | - 'template' => '{input}{label}{hint}{error}', | ||
66 | - ]) | ||
67 | - ->label('<span></span>' . $child_second->specialization_name) | ||
68 | - ->checkbox([ | ||
69 | - 'value' => $child_second->specialization_id, | ||
70 | - 'label' => NULL, | ||
71 | - 'uncheck' => NULL, | ||
72 | - 'class' => 'custom-check', | ||
73 | - ], false) ?> | ||
74 | - </a> | ||
75 | - </li> | ||
76 | - <?php endif; ?> | ||
77 | - <?php endforeach; ?> | ||
78 | - </ul> | ||
79 | - </li> | ||
80 | - <?php endif; ?> | ||
81 | - <?php endforeach; ?> | ||
82 | - | ||
83 | - </ul> | ||
84 | - </li> | ||
85 | - <?php endforeach; ?> | ||
86 | - </ul> | 49 | + <div class="input-blocks" style="width: 100%; margin-bottom: 5px"> |
50 | + <label>Специализации</label> | ||
51 | + <div class="required"></div> | ||
52 | + </div> | ||
53 | + | ||
54 | + <div class="style"> | ||
55 | + <ul class="content-menu-first"> | ||
56 | + <?php foreach($specializations as $specialization): ?> | ||
57 | + <li data-img="<?= $specialization->image ?>"> | ||
58 | + <span data-menu-bg="<?= $specialization->background ?>" style="background: <?= $specialization->background ?>"></span><a href="#"><?= $specialization->specialization_name ?></a> | ||
59 | + <ul> | ||
60 | + <?php foreach($specialization->children as $child_first): ?> | ||
61 | + | ||
62 | + <?php if($child_first instanceof Specialization): ?> | ||
63 | + <li> | ||
64 | + <a href="#"><?= $child_first->specialization_name ?></a> | ||
65 | + <ul> | ||
66 | + <?php foreach($child_first->children as $child_second): ?> | ||
67 | + <?php if($child_first instanceof Specialization): ?> | ||
68 | + <li> | ||
69 | + <a href="#" title="<?= $child_second->specialization_name ?>"> | ||
70 | + <?= $form->field($portfolio, "specializationInput[{$child_second->specialization_id}]", [ | ||
71 | + 'template' => '{input}{label}{hint}{error}', | ||
72 | + ]) | ||
73 | + ->label('<span></span>' . $child_second->specialization_name) | ||
74 | + ->checkbox([ | ||
75 | + 'value' => $child_second->specialization_id, | ||
76 | + 'label' => NULL, | ||
77 | + 'uncheck' => NULL, | ||
78 | + 'class' => 'custom-check', | ||
79 | + ], false) ?> | ||
80 | + </a> | ||
81 | + </li> | ||
82 | + <?php endif; ?> | ||
83 | + <?php endforeach; ?> | ||
84 | + </ul> | ||
85 | + </li> | ||
86 | + <?php endif; ?> | ||
87 | + <?php endforeach; ?> | ||
88 | + | ||
89 | + </ul> | ||
90 | + </li> | ||
91 | + <?php endforeach; ?> | ||
92 | + </ul> | ||
93 | + </div> | ||
94 | + | ||
95 | + <div class="style admn-menu-err"> | ||
96 | + <div class="help-block">Необходимо выбрать хотя бы одну «специализацию».</div> | ||
97 | + </div> | ||
87 | </div> | 98 | </div> |
88 | 99 | ||
100 | + <div class="admin-specialization-selected style"><ul></ul></div> | ||
89 | 101 | ||
90 | <div class="input-blocks-wrapper admin-avatar admin-blog-min-img admin-portfolio-foto"> | 102 | <div class="input-blocks-wrapper admin-avatar admin-blog-min-img admin-portfolio-foto"> |
91 | <div style="font-size: 13px;color: inherit;font-weight: 700;">Фото главное</div> | 103 | <div style="font-size: 13px;color: inherit;font-weight: 700;">Фото главное</div> |
frontend/views/accounts/_projects_form.php
@@ -47,47 +47,59 @@ | @@ -47,47 +47,59 @@ | ||
47 | ->dropDownList($projects, [ 'prompt' => 'Родительский проект' ]) ?> | 47 | ->dropDownList($projects, [ 'prompt' => 'Родительский проект' ]) ?> |
48 | </div> | 48 | </div> |
49 | </div> | 49 | </div> |
50 | + | ||
50 | <div class="input-blocks-wrapper admin-menu-list"> | 51 | <div class="input-blocks-wrapper admin-menu-list"> |
51 | - <ul class="content-menu-first"> | ||
52 | - <?php foreach($specializations as $specialization):?> | ||
53 | - <li data-img="<?= $specialization->image?>"> | ||
54 | - <span data-menu-bg="<?= $specialization->background ?>" style="background: <?= $specialization->background ?>"></span><a href="#"><?= $specialization->specialization_name?></a> | ||
55 | - <ul> | ||
56 | - <?php foreach($specialization->children as $child_first):?> | ||
57 | - | ||
58 | - <?php if($child_first instanceof Specialization):?> | ||
59 | - <li> | ||
60 | - <a href="#"><?= $child_first->specialization_name?></a> | ||
61 | - <ul> | ||
62 | - <?php foreach($child_first->children as $child_second):?> | ||
63 | - <?php if($child_first instanceof Specialization): ?> | ||
64 | - <li> | ||
65 | - <a href="#" title="<?= $child_second->specialization_name ?>"> | ||
66 | - <?= $form->field($project, "specializationInput[{$child_second->specialization_id}]", [ | ||
67 | - 'template' => '{input}{label}{hint}{error}', | ||
68 | - ]) | ||
69 | - ->label('<span></span>' . $child_second->specialization_name) | ||
70 | - ->checkbox([ | ||
71 | - 'value' => $child_second->specialization_id, | ||
72 | - 'label' => NULL, | ||
73 | - 'uncheck' => NULL, | ||
74 | - 'class' => 'custom-check', | ||
75 | - ], false) ?> | ||
76 | - </a> | ||
77 | - </li> | ||
78 | - <?php endif;?> | ||
79 | - <?php endforeach; ?> | ||
80 | - </ul> | ||
81 | - </li> | ||
82 | - <?php endif; ?> | ||
83 | - <?php endforeach; ?> | ||
84 | - | ||
85 | - </ul> | ||
86 | - </li> | ||
87 | - <?php endforeach; ?> | ||
88 | - </ul> | 52 | + <div class="input-blocks" style="width: 100%; margin-bottom: 5px"> |
53 | + <label>Специализации</label> | ||
54 | + <div class="required"></div> | ||
55 | + </div> | ||
56 | + <div class="style"> | ||
57 | + <ul class="content-menu-first"> | ||
58 | + <?php foreach($specializations as $specialization): ?> | ||
59 | + <li data-img="<?= $specialization->image ?>"> | ||
60 | + <span data-menu-bg="<?= $specialization->background ?>" style="background: <?= $specialization->background ?>"></span><a href="#"><?= $specialization->specialization_name ?></a> | ||
61 | + <ul> | ||
62 | + <?php foreach($specialization->children as $child_first): ?> | ||
63 | + | ||
64 | + <?php if($child_first instanceof Specialization): ?> | ||
65 | + <li> | ||
66 | + <a href="#"><?= $child_first->specialization_name ?></a> | ||
67 | + <ul> | ||
68 | + <?php foreach($child_first->children as $child_second): ?> | ||
69 | + <?php if($child_first instanceof Specialization): ?> | ||
70 | + <li> | ||
71 | + <a href="#" title="<?= $child_second->specialization_name ?>"> | ||
72 | + <?= $form->field($project, "specializationInput[{$child_second->specialization_id}]", [ | ||
73 | + 'template' => '{input}{label}{hint}{error}', | ||
74 | + ]) | ||
75 | + ->label('<span></span>' . $child_second->specialization_name) | ||
76 | + ->checkbox([ | ||
77 | + 'value' => $child_second->specialization_id, | ||
78 | + 'label' => NULL, | ||
79 | + 'uncheck' => NULL, | ||
80 | + 'class' => 'custom-check', | ||
81 | + ], false) ?> | ||
82 | + </a> | ||
83 | + </li> | ||
84 | + <?php endif; ?> | ||
85 | + <?php endforeach; ?> | ||
86 | + </ul> | ||
87 | + </li> | ||
88 | + <?php endif; ?> | ||
89 | + <?php endforeach; ?> | ||
90 | + | ||
91 | + </ul> | ||
92 | + </li> | ||
93 | + <?php endforeach; ?> | ||
94 | + </ul> | ||
95 | + </div> | ||
96 | + <div class="style admn-menu-err"> | ||
97 | + <div class="help-block">Необходимо выбрать хотя бы одну «специализацию».</div> | ||
98 | + </div> | ||
89 | </div> | 99 | </div> |
90 | 100 | ||
101 | +<div class="admin-specialization-selected style"><ul></ul></div> | ||
102 | + | ||
91 | 103 | ||
92 | <div class="conacts-admin style">Адрес проекта:</div> | 104 | <div class="conacts-admin style">Адрес проекта:</div> |
93 | <div class="form-inline"> | 105 | <div class="form-inline"> |
frontend/views/accounts/_vacancy_form.php
@@ -103,54 +103,58 @@ | @@ -103,54 +103,58 @@ | ||
103 | <div class="input-blocks-wrapper admin-menu-list"> | 103 | <div class="input-blocks-wrapper admin-menu-list"> |
104 | <div class="input-blocks" style="width: 100%; margin-bottom: 5px"> | 104 | <div class="input-blocks" style="width: 100%; margin-bottom: 5px"> |
105 | <label>Специализации</label> | 105 | <label>Специализации</label> |
106 | + <div class="required"></div> | ||
106 | </div> | 107 | </div> |
107 | - <ul class="content-menu-first"> | ||
108 | - <?php foreach($specializations as $specialization): ?> | ||
109 | - <li data-img="<?= $specialization->image ?>"> | ||
110 | - <span data-menu-bg="<?= $specialization->background ?>" style="background: <?= $specialization->background ?>"></span><a href="#"><?= $specialization->specialization_name ?></a> | ||
111 | - <ul> | ||
112 | - <?php foreach($specialization->children as $child_first): ?> | ||
113 | 108 | ||
114 | - <?php if($child_first instanceof Specialization): ?> | ||
115 | - <li> | ||
116 | - <a href="#"><?= $child_first->specialization_name ?></a> | ||
117 | - <ul> | ||
118 | - <?php foreach($child_first->children as $child_second): ?> | ||
119 | - <?php if($child_first instanceof Specialization): ?> | ||
120 | - <li> | ||
121 | - <a href="#" title="<?= $child_second->specialization_name ?>"> | ||
122 | - <?= $form->field($vacancy, "specializationInput[{$child_second->specialization_id}]", [ | ||
123 | - 'template' => '{input}{label}{hint}{error}', | ||
124 | - ]) | ||
125 | - ->label('<span></span>' . $child_second->specialization_name) | ||
126 | - ->checkbox([ | ||
127 | - 'value' => $child_second->specialization_id, | ||
128 | - 'label' => NULL, | ||
129 | - 'uncheck' => NULL, | ||
130 | - 'class' => 'custom-check', | ||
131 | - ], false) ?> | ||
132 | - </a> | ||
133 | - </li> | ||
134 | - <?php endif; ?> | ||
135 | - <?php endforeach; ?> | ||
136 | - </ul> | ||
137 | - </li> | ||
138 | - <?php endif; ?> | ||
139 | - <?php endforeach; ?> | 109 | + <div class="style"> |
110 | + <ul class="content-menu-first"> | ||
111 | + <?php foreach($specializations as $specialization): ?> | ||
112 | + <li data-img="<?= $specialization->image ?>"> | ||
113 | + <span data-menu-bg="<?= $specialization->background ?>" style="background: <?= $specialization->background ?>"></span><a href="#"><?= $specialization->specialization_name ?></a> | ||
114 | + <ul> | ||
115 | + <?php foreach($specialization->children as $child_first): ?> | ||
116 | + | ||
117 | + <?php if($child_first instanceof Specialization): ?> | ||
118 | + <li> | ||
119 | + <a href="#"><?= $child_first->specialization_name ?></a> | ||
120 | + <ul> | ||
121 | + <?php foreach($child_first->children as $child_second): ?> | ||
122 | + <?php if($child_first instanceof Specialization): ?> | ||
123 | + <li> | ||
124 | + <a href="#" title="<?= $child_second->specialization_name ?>"> | ||
125 | + <?= $form->field($vacancy, "specializationInput[{$child_second->specialization_id}]", [ | ||
126 | + 'template' => '{input}{label}{hint}{error}', | ||
127 | + ]) | ||
128 | + ->label('<span></span>' . $child_second->specialization_name) | ||
129 | + ->checkbox([ | ||
130 | + 'value' => $child_second->specialization_id, | ||
131 | + 'label' => NULL, | ||
132 | + 'uncheck' => NULL, | ||
133 | + 'class' => 'custom-check', | ||
134 | + ], false) ?> | ||
135 | + </a> | ||
136 | + </li> | ||
137 | + <?php endif; ?> | ||
138 | + <?php endforeach; ?> | ||
139 | + </ul> | ||
140 | + </li> | ||
141 | + <?php endif; ?> | ||
142 | + <?php endforeach; ?> | ||
143 | + | ||
144 | + </ul> | ||
145 | + </li> | ||
146 | + <?php endforeach; ?> | ||
147 | + </ul> | ||
148 | + </div> | ||
140 | 149 | ||
141 | - </ul> | ||
142 | - </li> | ||
143 | - <?php endforeach; ?> | ||
144 | - </ul> | 150 | + <div class="style admn-menu-err"> |
151 | + <div class="help-block">Необходимо выбрать хотя бы одну «специализацию».</div> | ||
152 | + </div> | ||
145 | </div> | 153 | </div> |
146 | 154 | ||
147 | -<div class="admin-specialization-selected style"> | ||
148 | - <ul> | 155 | +<div class="admin-specialization-selected style"><ul></ul></div> |
149 | 156 | ||
150 | - </ul> | ||
151 | -</div> | ||
152 | - | ||
153 | -<div class="input-blocks-wrapper admin-vacancy-check" style="margin-top: 29px"> | 157 | +<div class="input-blocks-wrapper admin-vacancy-check admin-vacancy-check-fx-marg" style="margin-top: 19px"> |
154 | <div class="input-blocks"> | 158 | <div class="input-blocks"> |
155 | <?= $form->field($vacancy, 'employmentInput') | 159 | <?= $form->field($vacancy, 'employmentInput') |
156 | ->checkboxList($employment, | 160 | ->checkboxList($employment, |
@@ -219,41 +223,5 @@ | @@ -219,41 +223,5 @@ | ||
219 | $('.input-blocks.admin-currency-second select').change(function(){ | 223 | $('.input-blocks.admin-currency-second select').change(function(){ |
220 | $(this).blur() | 224 | $(this).blur() |
221 | }) | 225 | }) |
222 | - | ||
223 | - specializationTags() | ||
224 | - function specializationTags(){ | ||
225 | - addSpecializationTags() | ||
226 | - removeSpecializationTags() | ||
227 | - newAddSpecializationTags() | ||
228 | - | ||
229 | - function addSpecializationTags(){ | ||
230 | - var specTags = $('.admin-page .third-ul-menu input:checked') | ||
231 | - for (var spI=0;spI<specTags.length;spI++) { | ||
232 | - var newSpecTagsId = $(specTags[spI]).attr('id') | ||
233 | - var newSpecTagsTxt = $(specTags[spI]).parents('a').text() | ||
234 | - $('.admin-page .admin-specialization-selected ul').append('<li data-spec-id="'+newSpecTagsId+'">'+newSpecTagsTxt+'</li>') | ||
235 | - } | ||
236 | - } | ||
237 | - | ||
238 | - function removeSpecializationTags(){ | ||
239 | - $('body').on('click', '.admin-page .admin-specialization-selected ul li', function(){ | ||
240 | - var removeSpecTagsId = $(this).attr('data-spec-id') | ||
241 | - $('.admin-page .third-ul-menu #'+removeSpecTagsId).attr('checked', false) | ||
242 | - $(this).remove() | ||
243 | - }) | ||
244 | - } | ||
245 | - | ||
246 | - function newAddSpecializationTags(){ | ||
247 | - $('.admin-page .third-ul-menu input').change(function(){ | ||
248 | - var thisSpecTagsId = $(this).attr('id') | ||
249 | - var thisSpecTagsTxt = $(this).parents('a').text() | ||
250 | - if($(this).prop("checked")){ | ||
251 | - $('.admin-page .admin-specialization-selected ul').append('<li data-spec-id="'+thisSpecTagsId+'">'+thisSpecTagsTxt+'</li>') | ||
252 | - } else { | ||
253 | - $('.admin-page .admin-specialization-selected ul li[data-spec-id="'+thisSpecTagsId+'"]').remove() | ||
254 | - } | ||
255 | - }) | ||
256 | - } | ||
257 | - } | ||
258 | }) | 226 | }) |
259 | </script> | 227 | </script> |
260 | \ No newline at end of file | 228 | \ No newline at end of file |
frontend/views/accounts/service.php
@@ -52,42 +52,58 @@ | @@ -52,42 +52,58 @@ | ||
52 | </div> | 52 | </div> |
53 | </div> | 53 | </div> |
54 | 54 | ||
55 | - <div class="input-blocks-wrapper"> | ||
56 | - <ul class="content-menu-first"> | ||
57 | - <?php foreach($specializations as $specialization): ?> | ||
58 | - <li data-img="<?= $specialization->image ?>"> | ||
59 | - <span data-menu-bg="<?= $specialization->background ?>" style="background: <?= $specialization->background ?>"></span><a href="#"><?= $specialization->specialization_name ?></a> | ||
60 | - <ul> | ||
61 | - <?php foreach($specialization->children as $child_first): ?> | 55 | + <div class="input-blocks-wrapper admin-menu-list"> |
56 | + <div class="input-blocks" style="width: 100%; margin-bottom: 5px"> | ||
57 | + <label>Специализации</label> | ||
58 | + <div class="required"></div> | ||
59 | + </div> | ||
60 | + <div class="style"> | ||
61 | + <ul class="content-menu-first"> | ||
62 | + <?php foreach($specializations as $specialization): ?> | ||
63 | + <li data-img="<?= $specialization->image ?>"> | ||
64 | + <span data-menu-bg="<?= $specialization->background ?>" style="background: <?= $specialization->background ?>"></span><a href="#"><?= $specialization->specialization_name ?></a> | ||
65 | + <ul> | ||
66 | + <?php foreach($specialization->children as $child_first): ?> | ||
62 | 67 | ||
63 | - <?php if($child_first instanceof Specialization): ?> | ||
64 | - <li> | ||
65 | - <a href="#"><?= $child_first->specialization_name ?></a> | ||
66 | - <ul> | ||
67 | - <?php foreach($child_first->children as $child_second): ?> | ||
68 | - <?php if($child_first instanceof Specialization): ?> | ||
69 | - <li> | ||
70 | - <a href="#"> | ||
71 | - <?= $form->field($user, "specializationInput[{$child_second->specialization_id}]") | ||
72 | - ->checkbox([ | ||
73 | - 'value' => $child_second->specialization_id, | ||
74 | - 'label' => $child_second->specialization_name, | ||
75 | - 'uncheck' => NULL, | ||
76 | - ]) ?> | ||
77 | - </a> | ||
78 | - </li> | ||
79 | - <?php endif; ?> | ||
80 | - <?php endforeach; ?> | ||
81 | - </ul> | ||
82 | - </li> | ||
83 | - <?php endif; ?> | ||
84 | - <?php endforeach; ?> | 68 | + <?php if($child_first instanceof Specialization): ?> |
69 | + <li> | ||
70 | + <a href="#"><?= $child_first->specialization_name ?></a> | ||
71 | + <ul> | ||
72 | + <?php foreach($child_first->children as $child_second): ?> | ||
73 | + <?php if($child_first instanceof Specialization): ?> | ||
74 | + <li> | ||
75 | + <a href="#" title="<?= $child_second->specialization_name ?>"> | ||
76 | + <?= $form->field($user, "specializationInput[{$child_second->specialization_id}]", [ | ||
77 | + 'template' => '{input}{label}{hint}{error}', | ||
78 | + ]) | ||
79 | + ->label('<span></span>' . $child_second->specialization_name) | ||
80 | + ->checkbox([ | ||
81 | + 'value' => $child_second->specialization_id, | ||
82 | + 'label' => NULL, | ||
83 | + 'uncheck' => NULL, | ||
84 | + 'class' => 'custom-check', | ||
85 | + ], false) ?> | ||
86 | + </a> | ||
87 | + </li> | ||
88 | + <?php endif; ?> | ||
89 | + <?php endforeach; ?> | ||
90 | + </ul> | ||
91 | + </li> | ||
92 | + <?php endif; ?> | ||
93 | + <?php endforeach; ?> | ||
85 | 94 | ||
86 | - </ul> | ||
87 | - </li> | ||
88 | - <?php endforeach; ?> | ||
89 | - </ul> | 95 | + </ul> |
96 | + </li> | ||
97 | + <?php endforeach; ?> | ||
98 | + </ul> | ||
99 | + </div> | ||
100 | + <div class="style admn-menu-err"> | ||
101 | + <div class="help-block">Необходимо выбрать хотя бы одну «специализацию».</div> | ||
102 | + </div> | ||
90 | </div> | 103 | </div> |
104 | + | ||
105 | + <div class="admin-specialization-selected style"><ul></ul></div> | ||
106 | + | ||
91 | <div class="input-blocks-wrapper admin-city-array"> | 107 | <div class="input-blocks-wrapper admin-city-array"> |
92 | <div class="input-blocks"> | 108 | <div class="input-blocks"> |
93 | <?= $form->field($user_info, 'geographies') | 109 | <?= $form->field($user_info, 'geographies') |
frontend/views/accounts/vacancy.php
@@ -17,71 +17,74 @@ | @@ -17,71 +17,74 @@ | ||
17 | <div class="admin-all-pages-add"> | 17 | <div class="admin-all-pages-add"> |
18 | <?= Html::a(Yii::t('app', 'Добавить'), [ 'vacancy-create' ], [ 'class' => 'btn btn-success' ]) ?> | 18 | <?= Html::a(Yii::t('app', 'Добавить'), [ 'vacancy-create' ], [ 'class' => 'btn btn-success' ]) ?> |
19 | </div> | 19 | </div> |
20 | -<?= GridView::widget([ | ||
21 | - 'options' => ['class'=>'style admin-all-pages-wr'], | ||
22 | - 'dataProvider' => $dataProvider, | ||
23 | - 'filterModel' => $searchModel, | ||
24 | - 'columns' => [ | ||
25 | - [ | ||
26 | - 'attribute' => 'vacancy_id', | ||
27 | - 'label' => 'ID', | ||
28 | - ], | ||
29 | - 'name', | ||
30 | - [ | ||
31 | - 'attribute' => 'date_add', | ||
32 | - 'filter' => "<div class=\"input-group input-group-xs input-daterange\"> | 20 | +<div class="admin-table-portfolio admin-table-vacancy"> |
21 | + <?= GridView::widget([ | ||
22 | + 'options' => ['class'=>'style admin-all-pages-wr'], | ||
23 | + 'dataProvider' => $dataProvider, | ||
24 | + 'filterModel' => $searchModel, | ||
25 | + 'columns' => [ | ||
26 | + [ | ||
27 | + 'attribute' => 'vacancy_id', | ||
28 | + 'label' => 'ID', | ||
29 | + ], | ||
30 | + 'name', | ||
31 | + [ | ||
32 | + 'attribute' => 'date_add', | ||
33 | + 'filter' => "<div class=\"input-group input-group-xs input-daterange\"> | ||
33 | <span class='field-teamsearch-experience_from_from'>". | 34 | <span class='field-teamsearch-experience_from_from'>". |
34 | - DatePicker::widget([ | ||
35 | - 'model' => $searchModel, | ||
36 | - 'attribute' => 'date_add_from', | ||
37 | - 'language' => 'ru', | ||
38 | - 'dateFormat' => 'yyyy-MM-dd', | ||
39 | - 'clientOptions' => [ | ||
40 | - 'changeYear' => true, | ||
41 | - 'changeMonth' => true, | ||
42 | - ], | ||
43 | - ]). | ||
44 | - "</span> | 35 | + DatePicker::widget([ |
36 | + 'model' => $searchModel, | ||
37 | + 'attribute' => 'date_add_from', | ||
38 | + 'language' => 'ru', | ||
39 | + 'dateFormat' => 'yyyy-MM-dd', | ||
40 | + 'clientOptions' => [ | ||
41 | + 'changeYear' => true, | ||
42 | + 'changeMonth' => true, | ||
43 | + ], | ||
44 | + ]). | ||
45 | + "</span> | ||
45 | <span class=\"input-group-addon kv-field-separator\"> | 46 | <span class=\"input-group-addon kv-field-separator\"> |
46 | <i class=\"glyphicon glyphicon-resize-horizontal\"></i> | 47 | <i class=\"glyphicon glyphicon-resize-horizontal\"></i> |
47 | </span> | 48 | </span> |
48 | <span class='field-teamsearch-experience_from_to'>". | 49 | <span class='field-teamsearch-experience_from_to'>". |
49 | - DatePicker::widget([ | ||
50 | - 'model' => $searchModel, | ||
51 | - 'attribute' => 'date_add_to', | ||
52 | - 'language' => 'ru', | ||
53 | - 'dateFormat' => 'yyyy-MM-dd', | ||
54 | - 'clientOptions' => [ | ||
55 | - 'changeYear' => true, | ||
56 | - 'changeMonth' => true, | ||
57 | - ], | ||
58 | - ]) | ||
59 | - ."</span> | 50 | + DatePicker::widget([ |
51 | + 'model' => $searchModel, | ||
52 | + 'attribute' => 'date_add_to', | ||
53 | + 'language' => 'ru', | ||
54 | + 'dateFormat' => 'yyyy-MM-dd', | ||
55 | + 'clientOptions' => [ | ||
56 | + 'changeYear' => true, | ||
57 | + 'changeMonth' => true, | ||
58 | + ], | ||
59 | + ]) | ||
60 | + ."</span> | ||
60 | </div>", | 61 | </div>", |
61 | - 'format' => 'html', | ||
62 | - ], | ||
63 | - 'view_count', | ||
64 | - [ | ||
65 | - 'class' => ActionColumn::className(), | ||
66 | - 'buttons' => [ | ||
67 | - 'update' => function($url, $model, $key) { | ||
68 | - return Html::a('<img src="/images/ico_pencil.png" alt="">', | ||
69 | - ['vacancy-update', 'id' => $model->vacancy_id | ||
70 | - ],[ | ||
71 | - 'title' => 'Редактировать', | ||
72 | - ]); | ||
73 | - }, | ||
74 | - 'delete' => function($url, $model, $key) { | ||
75 | - return Html::a('<img src="/images/delete-ico.png" alt="">', ['vacancy-delete', 'id' => $model->vacancy_id], [ | ||
76 | - 'title' => 'Удалить', | ||
77 | - 'aria-label' => 'Удалить', | ||
78 | - 'data-confirm' => 'Вы уверены, что хотите удалить этот элемент?', | ||
79 | - 'data-method' => 'post', | ||
80 | - 'data-pjax' => '0', | ||
81 | - ]); | ||
82 | - }, | 62 | + 'format' => 'html', |
83 | ], | 63 | ], |
84 | - 'template' => '{update} {delete}' | 64 | + 'view_count', |
65 | + [ | ||
66 | + 'class' => ActionColumn::className(), | ||
67 | + 'buttons' => [ | ||
68 | + 'update' => function($url, $model, $key) { | ||
69 | + return Html::a('<img src="/images/ico_pencil.png" alt="">', | ||
70 | + ['vacancy-update', 'id' => $model->vacancy_id | ||
71 | + ],[ | ||
72 | + 'title' => 'Редактировать', | ||
73 | + ]); | ||
74 | + }, | ||
75 | + 'delete' => function($url, $model, $key) { | ||
76 | + return Html::a('<img src="/images/delete-ico.png" alt="">', ['vacancy-delete', 'id' => $model->vacancy_id], [ | ||
77 | + 'title' => 'Удалить', | ||
78 | + 'aria-label' => 'Удалить', | ||
79 | + 'data-confirm' => 'Вы уверены, что хотите удалить этот элемент?', | ||
80 | + 'data-method' => 'post', | ||
81 | + 'data-pjax' => '0', | ||
82 | + ]); | ||
83 | + }, | ||
84 | + ], | ||
85 | + 'template' => '{update} {delete}' | ||
86 | + ] | ||
85 | ] | 87 | ] |
86 | - ] | ||
87 | -]); ?> | 88 | + ]); ?> |
89 | +</div> | ||
90 | + |
frontend/web/css/style.css
@@ -5936,12 +5936,14 @@ a {color: #0072bc} | @@ -5936,12 +5936,14 @@ a {color: #0072bc} | ||
5936 | margin-left: 0; | 5936 | margin-left: 0; |
5937 | } | 5937 | } |
5938 | .admin-who-check-payment .custom-check + label:hover {border-bottom: 1px solid #333333} | 5938 | .admin-who-check-payment .custom-check + label:hover {border-bottom: 1px solid #333333} |
5939 | +.admin-who-check-payment {margin-top: 6px} | ||
5939 | .admin-service-wr .input-blocks-wrapper { | 5940 | .admin-service-wr .input-blocks-wrapper { |
5940 | margin-top: 24px; | 5941 | margin-top: 24px; |
5941 | } | 5942 | } |
5942 | .admin-vacancy-check .admin-who-check-payment { | 5943 | .admin-vacancy-check .admin-who-check-payment { |
5943 | margin-top: 10px; | 5944 | margin-top: 10px; |
5944 | } | 5945 | } |
5946 | +.admin-vacancy-check-fx-marg .admin-who-check-payment {margin-top: 6px} | ||
5945 | .admin-vacancy-check .admin-who-check-payment:first-child {margin-top: 6px} | 5947 | .admin-vacancy-check .admin-who-check-payment:first-child {margin-top: 6px} |
5946 | .admin-hint-vacancy-contact { | 5948 | .admin-hint-vacancy-contact { |
5947 | position: absolute; | 5949 | position: absolute; |
@@ -6242,6 +6244,7 @@ input[disabled], select[disabled] { | @@ -6242,6 +6244,7 @@ input[disabled], select[disabled] { | ||
6242 | .admin-table-gallery .input-group.input-group-xs input { | 6244 | .admin-table-gallery .input-group.input-group-xs input { |
6243 | width: 131px; | 6245 | width: 131px; |
6244 | } | 6246 | } |
6247 | +.admin-table-vacancy table tr td:first-child{max-width: 80px} | ||
6245 | .admin-table-gallery .input-group.input-group-xs.input-daterange { | 6248 | .admin-table-gallery .input-group.input-group-xs.input-daterange { |
6246 | width: 293px; | 6249 | width: 293px; |
6247 | } | 6250 | } |
@@ -6344,7 +6347,7 @@ input[disabled], select[disabled] { | @@ -6344,7 +6347,7 @@ input[disabled], select[disabled] { | ||
6344 | background: url("/images/menu-ico/ico-4-active.png") 100% 50% no-repeat ; | 6347 | background: url("/images/menu-ico/ico-4-active.png") 100% 50% no-repeat ; |
6345 | } | 6348 | } |
6346 | .admin-specialization-selected {overflow: hidden;} | 6349 | .admin-specialization-selected {overflow: hidden;} |
6347 | -.admin-specialization-selected ul {float: left; width: 740px; margin-left: -20px; margin-top: -8px;} | 6350 | +.admin-specialization-selected ul {float: left; width: 740px; margin-left: -20px; margin-top: -9px;margin-bottom: 0} |
6348 | .admin-specialization-selected ul li { | 6351 | .admin-specialization-selected ul li { |
6349 | text-decoration: none; | 6352 | text-decoration: none; |
6350 | font-size: 13px; | 6353 | font-size: 13px; |
@@ -6365,4 +6368,8 @@ input[disabled], select[disabled] { | @@ -6365,4 +6368,8 @@ input[disabled], select[disabled] { | ||
6365 | top: 1px; | 6368 | top: 1px; |
6366 | right: -9px; | 6369 | right: -9px; |
6367 | background: url("/images/delete-ico-min.png")no-repeat; | 6370 | background: url("/images/delete-ico-min.png")no-repeat; |
6371 | +} | ||
6372 | +.admn-menu-err .help-block{ | ||
6373 | + width: 245px; | ||
6374 | + margin-left: -5px; | ||
6368 | } | 6375 | } |
6369 | \ No newline at end of file | 6376 | \ No newline at end of file |