3766 |
stevensc |
1 |
<?php
|
1 |
www |
2 |
$acl = $this->viewModel()->getRoot()->getVariable('acl');
|
|
|
3 |
$currentUser = $this->currentUserHelper();
|
|
|
4 |
$roleName = $currentUser->getUserTypeId();
|
|
|
5 |
|
|
|
6 |
$routeAdd = $this->url('jobs/add');
|
|
|
7 |
|
|
|
8 |
$routeDatatable = $this->url('jobs');
|
|
|
9 |
|
|
|
10 |
$allowAdd = $acl->isAllowed($roleName, 'jobs/add') ? 1 : 0;
|
|
|
11 |
$allowDelete = $acl->isAllowed($roleName, 'jobs/delete') ? 1 : 0;
|
|
|
12 |
$allowEdit = $acl->isAllowed($roleName, 'jobs/edit') ? 1 : 0;
|
|
|
13 |
$allowUsersWhoApplied = $acl->isAllowed($roleName, 'jobs/users-who-applied') ? 1 : 0;
|
|
|
14 |
|
|
|
15 |
$this->headLink()->appendStylesheet($this->basePath('plugins/nprogress/nprogress.css'));
|
|
|
16 |
$this->inlineScript()->appendFile($this->basePath('plugins/nprogress/nprogress.js'));
|
|
|
17 |
|
|
|
18 |
$this->inlineScript()->appendFile($this->basePath('plugins/ckeditor/ckeditor.js'));
|
|
|
19 |
|
|
|
20 |
|
|
|
21 |
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-fileinput/css/fileinput.min.css'));
|
|
|
22 |
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-fileinput/themes/explorer-fas/theme.css'));
|
|
|
23 |
|
|
|
24 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/plugins/piexif.js'));
|
|
|
25 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/plugins/sortable.js'));
|
|
|
26 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/fileinput.js'));
|
|
|
27 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/locales/es.js'));
|
|
|
28 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/themes/fas/theme.js'));
|
|
|
29 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/themes/explorer-fas/theme.js'));
|
|
|
30 |
|
|
|
31 |
|
|
|
32 |
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/jquery.validate.js'));
|
|
|
33 |
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/additional-methods.js'));
|
|
|
34 |
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/localization/messages_es.js'));
|
|
|
35 |
|
|
|
36 |
$this->headLink()->appendStylesheet($this->basePath('plugins/datatables-bs4/css/dataTables.bootstrap4.min.css'));
|
|
|
37 |
$this->headLink()->appendStylesheet($this->basePath('plugins/datatables-responsive/css/responsive.bootstrap4.min.css'));
|
|
|
38 |
|
|
|
39 |
$this->inlineScript()->appendFile($this->basePath('plugins/datatables/jquery.dataTables.min.js'));
|
|
|
40 |
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-bs4/js/dataTables.bootstrap4.min.js'));
|
|
|
41 |
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/dataTables.responsive.min.js'));
|
|
|
42 |
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/responsive.bootstrap4.min.js'));
|
|
|
43 |
|
|
|
44 |
|
|
|
45 |
|
|
|
46 |
$this->headLink()->appendStylesheet($this->basePath('plugins/select2/css/select2.min.css'));
|
|
|
47 |
$this->headLink()->appendStylesheet($this->basePath('plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css'));
|
|
|
48 |
$this->inlineScript()->appendFile($this->basePath('plugins/select2/js/select2.min.js'));
|
|
|
49 |
|
|
|
50 |
|
|
|
51 |
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-input-number/input-number-format.jquery.min.js'));
|
|
|
52 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-confirmation/dist/bootstrap-confirmation.js'));
|
|
|
53 |
|
|
|
54 |
|
|
|
55 |
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap4-toggle/css/bootstrap4-toggle.min.css'));
|
|
|
56 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap4-toggle/js/bootstrap4-toggle.min.js'));
|
|
|
57 |
|
|
|
58 |
$this->inlineScript()->appendFile($this->basePath('plugins/moment/moment-with-locales.min.js'));
|
|
|
59 |
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-datetimepicker/css/bootstrap-datetimepicker.css'));
|
|
|
60 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js'));
|
|
|
61 |
|
|
|
62 |
|
|
|
63 |
$this->headStyle()->captureStart();
|
|
|
64 |
echo <<<CSS
|
|
|
65 |
|
|
|
66 |
|
|
|
67 |
#gridTableUsersWhoApplied {
|
|
|
68 |
display: flex;
|
|
|
69 |
flex-flow: column;
|
|
|
70 |
width: 100%;
|
|
|
71 |
}
|
|
|
72 |
|
|
|
73 |
#gridTableUsersWhoApplied thead {
|
|
|
74 |
flex: 0 0 auto;
|
|
|
75 |
}
|
|
|
76 |
|
|
|
77 |
#gridTableUsersWhoApplied tbody {
|
|
|
78 |
flex: 1 1 auto;
|
|
|
79 |
display: block;
|
|
|
80 |
overflow-y: auto;
|
|
|
81 |
overflow-x: hidden;
|
|
|
82 |
}
|
|
|
83 |
|
|
|
84 |
#gridTableUsersWhoApplied tr {
|
|
|
85 |
width: 100%;
|
|
|
86 |
display: table;
|
|
|
87 |
table-layout: fixed;
|
|
|
88 |
}
|
|
|
89 |
CSS;
|
|
|
90 |
$this->headStyle()->captureEnd();
|
|
|
91 |
|
|
|
92 |
$this->inlineScript()->captureStart();
|
|
|
93 |
echo <<<JS
|
|
|
94 |
jQuery( document ).ready(function( $ ) {
|
|
|
95 |
var route_status = '';
|
|
|
96 |
var route_title = '';
|
|
|
97 |
var route_extended = '';
|
|
|
98 |
var route_location = '';
|
|
|
99 |
var route_job_category = '';
|
|
|
100 |
var route_employment_type = '';
|
|
|
101 |
var route_salary = '';
|
|
|
102 |
var route_experience = '';
|
|
|
103 |
var route_languages = '';
|
|
|
104 |
var route_degrees = '';
|
|
|
105 |
var route_skills = '';
|
|
|
106 |
var route_last_date_of_application = '';
|
|
|
107 |
|
|
|
108 |
var allowDelete = $allowDelete;
|
|
|
109 |
var allowEdit = $allowEdit;
|
|
|
110 |
var allowUsersWhoApplied = $allowUsersWhoApplied;
|
|
|
111 |
|
|
|
112 |
|
|
|
113 |
$.validator.addMethod('greaterThanFloat', function (value, element, param) {
|
|
|
114 |
var otherElement = $(param);
|
|
|
115 |
return parseFloat(value) > parseFloat(otherElement.val());
|
|
|
116 |
}, 'ERROR_INVALID_MINIMUM');
|
|
|
117 |
|
|
|
118 |
|
|
|
119 |
|
|
|
120 |
$.validator.addMethod('greaterThan', function (value, element, param) {
|
|
|
121 |
var otherElement = $(param);
|
|
|
122 |
return parseInt(value, 10) > parseInt(otherElement.val(), 10);
|
|
|
123 |
}, 'ERROR_INVALID_MINIMUM');
|
|
|
124 |
|
|
|
125 |
|
|
|
126 |
$.validator.addMethod('checkLocation', function (value, element, param) {
|
|
|
127 |
var otherElement = $(param);
|
|
|
128 |
|
|
|
129 |
return $.trim(otherElement.val()).length > 0;
|
|
|
130 |
}, 'ERROR_PLACED_AUTOCOMPLETE_DOES_NOT_CONTAIN_GEOMETRY');
|
|
|
131 |
|
|
|
132 |
|
|
|
133 |
|
|
|
134 |
$.validator.setDefaults({
|
|
|
135 |
debug: true,
|
|
|
136 |
highlight: function(element) {
|
|
|
137 |
$(element).addClass('is-invalid');
|
|
|
138 |
},
|
|
|
139 |
unhighlight: function(element) {
|
|
|
140 |
$(element).removeClass('is-invalid');
|
|
|
141 |
},
|
|
|
142 |
errorElement: 'span',
|
|
|
143 |
errorClass: 'error invalid-feedback',
|
|
|
144 |
errorPlacement: function(error, element) {
|
|
|
145 |
if(element.parent('.form-group').length) {
|
|
|
146 |
error.insertAfter(element);
|
|
|
147 |
} else if(element.parent('.toggle').length) {
|
|
|
148 |
error.insertAfter(element.parent().parent());
|
|
|
149 |
} else {
|
|
|
150 |
error.insertAfter(element.parent());
|
|
|
151 |
}
|
|
|
152 |
}
|
|
|
153 |
});
|
|
|
154 |
|
|
|
155 |
|
|
|
156 |
|
|
|
157 |
$.fn.showFormErrorValidator = function(fieldname, errors) {
|
|
|
158 |
var field = $(fieldname);
|
|
|
159 |
if(field) {
|
|
|
160 |
$(field).addClass('form-group-has-error');
|
|
|
161 |
|
|
|
162 |
var error = $('<div id="' + fieldname +'-error" class="form-group-invalid-feedback">' + errors + '</div>');
|
|
|
163 |
if(field.parent('.form-group').length) {
|
|
|
164 |
error.insertAfter(field.parent());
|
|
|
165 |
} else {
|
|
|
166 |
error.insertAfter(field);
|
|
|
167 |
}
|
|
|
168 |
}
|
|
|
169 |
};
|
|
|
170 |
|
|
|
171 |
var validatorAdd = $('#form-add').validate({
|
|
|
172 |
debug: true,
|
|
|
173 |
onclick: false,
|
|
|
174 |
onkeyup: false,
|
|
|
175 |
onfocusout: false,
|
|
|
176 |
ignore: [],
|
|
|
177 |
rules: {
|
|
|
178 |
'name': {
|
|
|
179 |
required: true,
|
|
|
180 |
maxlength: 128,
|
|
|
181 |
},
|
|
|
182 |
'title': {
|
|
|
183 |
required: true,
|
|
|
184 |
},
|
|
|
185 |
'last_date_of_application': {
|
|
|
186 |
required: true,
|
|
|
187 |
},
|
|
|
188 |
'job_category_id' : {
|
|
|
189 |
required: true,
|
|
|
190 |
},
|
|
|
191 |
'employment_type' : {
|
|
|
192 |
required: true,
|
|
|
193 |
},
|
|
|
194 |
'add_location_search': {
|
|
|
195 |
required: true,
|
|
|
196 |
checkLocation: '#form-add #latitude'
|
|
|
197 |
}
|
|
|
198 |
},
|
|
|
199 |
submitHandler: function(form)
|
|
|
200 |
{
|
|
|
201 |
NProgress.start();
|
|
|
202 |
$.ajax({
|
|
|
203 |
'dataType' : 'json',
|
|
|
204 |
'accept' : 'application/json',
|
|
|
205 |
'method' : 'post',
|
|
|
206 |
'url' : '$routeAdd',
|
|
|
207 |
'data' : $('#form-add').serialize(),
|
|
|
208 |
}).done(function(response) {
|
|
|
209 |
if(response['success']) {
|
|
|
210 |
$('#add-job-box').modal('hide');
|
|
|
211 |
gridTable.api().ajax.reload(null, false);
|
|
|
212 |
|
|
|
213 |
$('#overview-title').html(response['data']['title']);
|
|
|
214 |
$('#overview-job-category').html(response['data']['job_category']);
|
|
|
215 |
$('#overview-last-date-of-application').html(response['data']['last_date_of_application']);
|
|
|
216 |
$('#overview-employment-type').html(response['data']['employment_type']);
|
|
|
217 |
$('#overview-location').html(response['data']['location']);
|
|
|
218 |
|
|
|
219 |
$('#overview-status').html(response['data']['status']);
|
|
|
220 |
$('#overview-description').html(response['data']['description']);
|
|
|
221 |
|
|
|
222 |
$('#overview-salary').html(response['data']['salary']);
|
|
|
223 |
$('#overview-experience').html('')
|
|
|
224 |
|
|
|
225 |
|
|
|
226 |
|
|
|
227 |
|
|
|
228 |
|
|
|
229 |
$('list-skills').empty();
|
|
|
230 |
$('list-languages').empty();
|
|
|
231 |
$('list-degrees').empty();
|
|
|
232 |
|
|
|
233 |
|
|
|
234 |
route_status = response['data']['route_status'];
|
|
|
235 |
route_title = response['data']['route_title'];
|
|
|
236 |
route_extended = response['data']['route_extended'];
|
|
|
237 |
route_location = response['data']['route_location'];
|
|
|
238 |
route_job_category = response['data']['route_job_category'];
|
|
|
239 |
route_employment_type = response['data']['route_employment_type'];
|
|
|
240 |
route_salary = response['data']['route_salary'];
|
|
|
241 |
route_experience = response['data']['route_experience'];
|
|
|
242 |
route_languages = response['data']['route_languages'];
|
|
|
243 |
route_degrees = response['data']['route_degrees'];
|
|
|
244 |
route_skills = response['data']['route_skills'];
|
|
|
245 |
route_last_date_of_application = response['data']['route_last_date_of_application'];
|
|
|
246 |
|
|
|
247 |
$('#divListing').hide();
|
|
|
248 |
$('#divEdit').show();
|
|
|
249 |
|
|
|
250 |
} else {
|
|
|
251 |
validatorAdd.resetForm();
|
|
|
252 |
if(jQuery.type(response['data']) == 'string') {
|
|
|
253 |
$.fn.showError(response['data']);
|
|
|
254 |
} else {
|
|
|
255 |
$.each(response['data'], function( fieldname, errors ) {
|
|
|
256 |
$.fn.showFormErrorValidator('#form-add #' + fieldname, errors);
|
|
|
257 |
});
|
|
|
258 |
}
|
|
|
259 |
}
|
|
|
260 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
261 |
$.fn.showError(textStatus);
|
|
|
262 |
}).always(function() {
|
|
|
263 |
NProgress.done();
|
|
|
264 |
});
|
|
|
265 |
return false;
|
|
|
266 |
},
|
|
|
267 |
invalidHandler: function(form, validator) {
|
|
|
268 |
|
|
|
269 |
}
|
|
|
270 |
});
|
|
|
271 |
|
|
|
272 |
$(".close-box, .btn-add-job-cancel").on("click", function(e){
|
|
|
273 |
e.preventDefault();
|
|
|
274 |
$('#add-job-box').modal('hide');
|
|
|
275 |
return false;
|
|
|
276 |
});
|
|
|
277 |
|
|
|
278 |
$('body').on('click', 'button.btn-add', function(e) {
|
|
|
279 |
e.preventDefault();
|
|
|
280 |
|
|
|
281 |
|
|
|
282 |
$('#form-add #title').val('');
|
|
|
283 |
$('#form-add #last_date_of_application').val('');
|
|
|
284 |
$('#form-add #employment_type').val('').trigger('change');
|
|
|
285 |
$('#form-add #job_category_id').val('').trigger('change');
|
|
|
286 |
$('#form-add #formatted_address').val('');
|
|
|
287 |
$('#form-add #address1').val('');
|
|
|
288 |
$('#form-add #address2').val('');
|
|
|
289 |
$('#form-add #country').val('');
|
|
|
290 |
$('#form-add #state').val('');
|
|
|
291 |
$('#form-add #city1').val('');
|
|
|
292 |
$('#form-add #city2').val('');
|
|
|
293 |
$('#form-add #postal_code').val('');
|
|
|
294 |
$('#form-add #latitude').val('');
|
|
|
295 |
$('#form-add #longitude').val('');
|
|
|
296 |
$('#form-add #add_location_search').val('');
|
|
|
297 |
validatorAdd.resetForm();
|
|
|
298 |
|
|
|
299 |
$('#add-job-box').modal('show');
|
|
|
300 |
return false;
|
|
|
301 |
});
|
|
|
302 |
|
|
|
303 |
|
|
|
304 |
$('body').on('click', 'button.btn-view-profile', function(e) {
|
|
|
305 |
e.preventDefault();
|
|
|
306 |
|
|
|
307 |
var href = $(this).data('href');
|
|
|
308 |
window.open(href, '_blank');
|
|
|
309 |
|
|
|
310 |
});
|
|
|
311 |
|
|
|
312 |
$('body').on('click', 'button.btn-users-who-applied', function(e) {
|
|
|
313 |
e.preventDefault();
|
|
|
314 |
|
|
|
315 |
var href = $(this).data('href');
|
|
|
316 |
NProgress.start();
|
|
|
317 |
$.ajax({
|
|
|
318 |
'dataType' : 'json',
|
|
|
319 |
'accept' : 'application/json',
|
|
|
320 |
'method' : 'get',
|
|
|
321 |
'url' : href
|
|
|
322 |
}).done(function(response) {
|
|
|
323 |
if(response['success']) {
|
|
|
324 |
$('#gridTableUsersWhoApplied tbody').empty();
|
|
|
325 |
$.each(response['data'], function(i, record) {
|
|
|
326 |
var s = '<tr>';
|
|
|
327 |
s = s + '<td>' + record['first_name'] + '</td>';
|
|
|
328 |
s = s + '<td>' + record['last_name'] + '</td>';
|
|
|
329 |
s = s + '<td>' + record['email'] + '</td>';
|
|
|
330 |
s = s + '<td><button class="btn btn-default btn-view-profile" data-href="' + record['link_view']+ '"><i class="fa fa-external-link"></i></button></td>';
|
|
|
331 |
s = s + '<tr>';
|
|
|
332 |
|
|
|
333 |
$('#gridTableUsersWhoApplied tbody').append(s);
|
|
|
334 |
|
|
|
335 |
});
|
|
|
336 |
|
|
|
337 |
|
|
|
338 |
$('#modalUsersWhoApplied').modal('show');
|
|
|
339 |
} else {
|
|
|
340 |
$.fn.showError(response['data']);
|
|
|
341 |
|
|
|
342 |
}
|
|
|
343 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
344 |
$.fn.showError(textStatus);
|
|
|
345 |
}).always(function() {
|
|
|
346 |
NProgress.done();
|
|
|
347 |
});
|
|
|
348 |
return false;
|
|
|
349 |
|
|
|
350 |
});
|
|
|
351 |
|
|
|
352 |
|
|
|
353 |
var validatorSalary = $('#form-salary').validate({
|
|
|
354 |
debug: true,
|
|
|
355 |
onclick: false,
|
|
|
356 |
onkeyup: false,
|
|
|
357 |
ignore: [],
|
|
|
358 |
rules: {
|
|
|
359 |
'salary_visible': {
|
|
|
360 |
required: false,
|
|
|
361 |
},
|
|
|
362 |
'salary_min': {
|
|
|
363 |
required: '#form-salary #salary_visible:checked',
|
|
|
364 |
number: true,
|
|
|
365 |
maxlength: 10,
|
|
|
366 |
},
|
|
|
367 |
'salary currency': {
|
|
|
368 |
required: '#form-salary #salary_visible:checked',
|
|
|
369 |
maxlength: 5,
|
|
|
370 |
},
|
|
|
371 |
'salary_max': {
|
|
|
372 |
required: '#form-salary #salary_visible:checked',
|
|
|
373 |
number: true,
|
|
|
374 |
maxlength: 10,
|
|
|
375 |
greaterThanFloat : '#form-salary #salary_min',
|
|
|
376 |
},
|
|
|
377 |
},
|
|
|
378 |
submitHandler: function(form)
|
|
|
379 |
{
|
|
|
380 |
NProgress.start();
|
|
|
381 |
$.ajax({
|
|
|
382 |
'dataType' : 'json',
|
|
|
383 |
'accept' : 'application/json',
|
|
|
384 |
'method' : 'post',
|
|
|
385 |
'url' : route_salary,
|
|
|
386 |
'data' : $('#form-salary').serialize()
|
|
|
387 |
}).done(function(response) {
|
|
|
388 |
if(response['success']) {
|
|
|
389 |
$('#overview-salary').html(response['data']);
|
|
|
390 |
$("#salary-box").modal('hide');
|
|
|
391 |
} else {
|
|
|
392 |
validatorSalary.resetForm();
|
|
|
393 |
if(jQuery.type(response['data']) == 'string') {
|
|
|
394 |
$.fn.showError(response['data']);
|
|
|
395 |
} else {
|
|
|
396 |
$.each(response['data'], function( fieldname, errors ) {
|
|
|
397 |
$.fn.showFormErrorValidator('#form-salary #' + fieldname, errors);
|
|
|
398 |
});
|
|
|
399 |
}
|
|
|
400 |
}
|
|
|
401 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
402 |
$.fn.showError(textStatus);
|
|
|
403 |
}).always(function() {
|
|
|
404 |
NProgress.done();
|
|
|
405 |
});
|
|
|
406 |
return false;
|
|
|
407 |
},
|
|
|
408 |
invalidHandler: function(form, validator) {
|
|
|
409 |
|
|
|
410 |
}
|
|
|
411 |
});
|
|
|
412 |
|
|
|
413 |
$('.btn-salary-edit').on("click", function(e){
|
|
|
414 |
e.preventDefault();
|
|
|
415 |
|
|
|
416 |
NProgress.start();
|
|
|
417 |
$.ajax({
|
|
|
418 |
'dataType' : 'json',
|
|
|
419 |
'accept' : 'application/json',
|
|
|
420 |
'method' : 'get',
|
|
|
421 |
'url' : route_salary,
|
|
|
422 |
}).done(function(response) {
|
|
|
423 |
if(response['success']) {
|
|
|
424 |
if(response['data']['salary_visible'] == 'y') {
|
|
|
425 |
$('#form-salary #salary_visible').bootstrapToggle('on')
|
|
|
426 |
$('#form-salary #salary_min').val(response['data']['salary_min']);
|
|
|
427 |
$('#form-salary #salary_min').prop('readonly', false);
|
|
|
428 |
$('#form-salary #salary_max').val(response['data']['salary_max']);
|
|
|
429 |
$('#form-salary #salary_max').prop('readonly', false);
|
|
|
430 |
$('#form-salary #salary_currency').val(response['data']['salary_currency']);
|
|
|
431 |
$('#form-salary #salary_currency').prop('disable',false);
|
|
|
432 |
} else {
|
|
|
433 |
$('#form-salary #salary_visible').bootstrapToggle('off')
|
|
|
434 |
$('#form-salary #salary_min').val('1');
|
|
|
435 |
$('#form-salary #salary_min').prop('readonly', true);
|
|
|
436 |
$('#form-salary #salary_max').val('99');
|
|
|
437 |
$('#form-salary #salary_max').prop('readonly', true);
|
|
|
438 |
$('#form-salary #salary_currency').val('USD');
|
|
|
439 |
$('#form-salary #salary_currency').prop('disable',true);
|
|
|
440 |
}
|
|
|
441 |
validatorSalary.resetForm();
|
|
|
442 |
$("#salary-box").modal('show');
|
|
|
443 |
} else {
|
|
|
444 |
$.fn.showError(response['data']);
|
|
|
445 |
}
|
|
|
446 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
447 |
$.fn.showError(textStatus);
|
|
|
448 |
}).always(function() {
|
|
|
449 |
NProgress.done();
|
|
|
450 |
});
|
|
|
451 |
return false;
|
|
|
452 |
|
|
|
453 |
});
|
|
|
454 |
|
|
|
455 |
$('.btn-salary-close').on("click", function(e){
|
|
|
456 |
e.preventDefault();
|
|
|
457 |
|
|
|
458 |
$("#salary-box").modal('hide');
|
|
|
459 |
return false;
|
|
|
460 |
});
|
|
|
461 |
|
|
|
462 |
var validatorExperience = $('#form-experience').validate({
|
|
|
463 |
debug: true,
|
|
|
464 |
onclick: false,
|
|
|
465 |
onkeyup: false,
|
|
|
466 |
ignore: [],
|
|
|
467 |
rules: {
|
|
|
468 |
'experience_visible': {
|
|
|
469 |
required: false,
|
|
|
470 |
},
|
|
|
471 |
'experience_min': {
|
|
|
472 |
required: '#form-experience #experience_visible:checked',
|
|
|
473 |
digits: true,
|
|
|
474 |
maxlength: 2,
|
|
|
475 |
},
|
|
|
476 |
'experience_max': {
|
|
|
477 |
required: '#form-experience #experience_visible:checked',
|
|
|
478 |
digits: true,
|
|
|
479 |
maxlength: 4,
|
|
|
480 |
greaterThan : '#form-experience #experience_min',
|
|
|
481 |
},
|
|
|
482 |
},
|
|
|
483 |
submitHandler: function(form)
|
|
|
484 |
{
|
|
|
485 |
NProgress.start();
|
|
|
486 |
$.ajax({
|
|
|
487 |
'dataType' : 'json',
|
|
|
488 |
'accept' : 'application/json',
|
|
|
489 |
'method' : 'post',
|
|
|
490 |
'url' : route_experience,
|
|
|
491 |
'data' : $('#form-experience').serialize()
|
|
|
492 |
}).done(function(response) {
|
|
|
493 |
if(response['success']) {
|
|
|
494 |
$('#overview-experience').html(response['data']);
|
|
|
495 |
$("#experience-box").modal('hide');
|
|
|
496 |
} else {
|
|
|
497 |
validatorExperience.resetForm();
|
|
|
498 |
if(jQuery.type(response['data']) == 'string') {
|
|
|
499 |
$.fn.showError(response['data']);
|
|
|
500 |
} else {
|
|
|
501 |
$.each(response['data'], function( fieldname, errors ) {
|
|
|
502 |
$.fn.showFormErrorValidator('#form-experience #' + fieldname, errors);
|
|
|
503 |
});
|
|
|
504 |
}
|
|
|
505 |
}
|
|
|
506 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
507 |
$.fn.showError(textStatus);
|
|
|
508 |
}).always(function() {
|
|
|
509 |
NProgress.done();
|
|
|
510 |
});
|
|
|
511 |
return false;
|
|
|
512 |
},
|
|
|
513 |
invalidHandler: function(form, validator) {
|
|
|
514 |
|
|
|
515 |
}
|
|
|
516 |
});
|
|
|
517 |
|
|
|
518 |
$('.btn-experience-edit').on("click", function(e){
|
|
|
519 |
e.preventDefault();
|
|
|
520 |
|
|
|
521 |
NProgress.start();
|
|
|
522 |
$.ajax({
|
|
|
523 |
'dataType' : 'json',
|
|
|
524 |
'accept' : 'application/json',
|
|
|
525 |
'method' : 'get',
|
|
|
526 |
'url' : route_experience,
|
|
|
527 |
}).done(function(response) {
|
|
|
528 |
if(response['success']) {
|
|
|
529 |
if(response['data']['experience_visible'] == 'y') {
|
|
|
530 |
$('#form-experience #experience_visible').bootstrapToggle('on')
|
|
|
531 |
$('#form-experience #experience_min').val(response['data']['experience_min']);
|
|
|
532 |
$('#form-experience #experience_min').prop('readonly', false);
|
|
|
533 |
$('#form-experience #experience_max').val(response['data']['experience_max']);
|
|
|
534 |
$('#form-experience #experience_max').prop('readonly', false);
|
|
|
535 |
} else {
|
|
|
536 |
$('#form-experience #experience_visible').bootstrapToggle('off')
|
|
|
537 |
$('#form-experience #experience_min').val('1');
|
|
|
538 |
$('#form-experience #experience_min').prop('readonly', true);
|
|
|
539 |
$('#form-experience #experience_max').val('5');
|
|
|
540 |
$('#form-experience #experience_max').prop('readonly', true);
|
|
|
541 |
}
|
|
|
542 |
|
|
|
543 |
validatorExperience.resetForm();
|
|
|
544 |
$("#experience-box").modal('show');
|
|
|
545 |
} else {
|
|
|
546 |
$.fn.showError(response['data']);
|
|
|
547 |
}
|
|
|
548 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
549 |
$.fn.showError(textStatus);
|
|
|
550 |
}).always(function() {
|
|
|
551 |
NProgress.done();
|
|
|
552 |
});
|
|
|
553 |
return false;
|
|
|
554 |
|
|
|
555 |
});
|
|
|
556 |
|
|
|
557 |
$('.btn-experience-close').on("click", function(e){
|
|
|
558 |
e.preventDefault();
|
|
|
559 |
|
|
|
560 |
$("#experience-box").modal('hide');
|
|
|
561 |
return false;
|
|
|
562 |
});
|
|
|
563 |
|
|
|
564 |
|
|
|
565 |
$('.btn-skills-edit').on("click", function(e){
|
|
|
566 |
e.preventDefault();
|
|
|
567 |
|
|
|
568 |
NProgress.start();
|
|
|
569 |
$.ajax({
|
|
|
570 |
'dataType' : 'json',
|
|
|
571 |
'accept' : 'application/json',
|
|
|
572 |
'method' : 'get',
|
|
|
573 |
'url' : route_skills,
|
|
|
574 |
}).done(function(response) {
|
|
|
575 |
if(response['success']) {
|
|
|
576 |
$('#form-skill #skills').val(response['data']).trigger('change');
|
|
|
577 |
validatorSkills.resetForm();
|
|
|
578 |
|
|
|
579 |
$('#skills-box').modal('show');
|
|
|
580 |
} else {
|
|
|
581 |
$.fn.showError(response['data']);
|
|
|
582 |
}
|
|
|
583 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
584 |
$.fn.showError(textStatus);
|
|
|
585 |
}).always(function() {
|
|
|
586 |
NProgress.done();
|
|
|
587 |
});
|
|
|
588 |
return false;
|
|
|
589 |
|
|
|
590 |
});
|
|
|
591 |
|
|
|
592 |
$('.btn-skills-close').on("click", function(e){
|
|
|
593 |
e.preventDefault();
|
|
|
594 |
|
|
|
595 |
$('#skills-box').modal('hide');
|
|
|
596 |
return false;
|
|
|
597 |
});
|
|
|
598 |
|
|
|
599 |
var validatorSkills = $('#form-skill').validate({
|
|
|
600 |
debug: true,
|
|
|
601 |
onclick: false,
|
|
|
602 |
onkeyup: false,
|
|
|
603 |
onfocusout: false,
|
|
|
604 |
ignore: [],
|
|
|
605 |
rules: {
|
|
|
606 |
'skills[]': {
|
|
|
607 |
required: true,
|
|
|
608 |
}
|
|
|
609 |
},
|
|
|
610 |
submitHandler: function(form)
|
|
|
611 |
{
|
|
|
612 |
NProgress.start();
|
|
|
613 |
$.ajax({
|
|
|
614 |
'dataType' : 'json',
|
|
|
615 |
'accept' : 'application/json',
|
|
|
616 |
'method' : 'post',
|
|
|
617 |
'url' : route_skills,
|
|
|
618 |
'data' : {
|
|
|
619 |
'skills[]' : $('#form-skill #skills').val()
|
|
|
620 |
},
|
|
|
621 |
}).done(function(response) {
|
|
|
622 |
if(response['success']) {
|
|
|
623 |
|
|
|
624 |
$('#list-skills').empty();
|
|
|
625 |
$.each(response['data'], function(index, item) {
|
|
|
626 |
$('#list-skills').append('<li><a href="#" title="">' + item.label + '</a></li>');
|
|
|
627 |
});
|
|
|
628 |
|
|
|
629 |
$("#skills-box").modal('hide');
|
|
|
630 |
} else {
|
|
|
631 |
validatorSkills.resetForm();
|
|
|
632 |
if(jQuery.type(response['data']) == 'string') {
|
|
|
633 |
$.fn.showError(response['data']);
|
|
|
634 |
} else {
|
|
|
635 |
$.each(response['data'], function( fieldname, errors ) {
|
|
|
636 |
$.fn.showFormErrorValidator('#form-skill #' + fieldname, errors);
|
|
|
637 |
});
|
|
|
638 |
}
|
|
|
639 |
}
|
|
|
640 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
641 |
$.fn.showError(textStatus);
|
|
|
642 |
}).always(function() {
|
|
|
643 |
NProgress.done();
|
|
|
644 |
});
|
|
|
645 |
return false;
|
|
|
646 |
},
|
|
|
647 |
invalidHandler: function(form, validator) {
|
|
|
648 |
|
|
|
649 |
}
|
|
|
650 |
});
|
|
|
651 |
|
|
|
652 |
|
|
|
653 |
|
|
|
654 |
var validatorLanguages = $('#form-language').validate({
|
|
|
655 |
debug: true,
|
|
|
656 |
onclick: false,
|
|
|
657 |
onkeyup: false,
|
|
|
658 |
onfocusout: false,
|
|
|
659 |
ignore: [],
|
|
|
660 |
rules: {
|
|
|
661 |
'languages[]': {
|
|
|
662 |
required: true,
|
|
|
663 |
}
|
|
|
664 |
},
|
|
|
665 |
submitHandler: function(form)
|
|
|
666 |
{
|
|
|
667 |
NProgress.start();
|
|
|
668 |
$.ajax({
|
|
|
669 |
'dataType' : 'json',
|
|
|
670 |
'accept' : 'application/json',
|
|
|
671 |
'method' : 'post',
|
|
|
672 |
'url' : route_languages,
|
|
|
673 |
'data' : {
|
|
|
674 |
'languages[]' : $('#form-language #languages').val()
|
|
|
675 |
},
|
|
|
676 |
}).done(function(response) {
|
|
|
677 |
if(response['success']) {
|
|
|
678 |
|
|
|
679 |
$('#list-languages').empty();
|
|
|
680 |
$.each(response['data'], function(index, item) {
|
|
|
681 |
$('#list-languages').append('<li><a href="#" title="">' + item.label + '</a></li>');
|
|
|
682 |
});
|
|
|
683 |
|
|
|
684 |
$("#languages-box").modal('hide');
|
|
|
685 |
} else {
|
|
|
686 |
validatorLanguages.resetForm();
|
|
|
687 |
if(jQuery.type(response['data']) == 'string') {
|
|
|
688 |
$.fn.showError(response['data']);
|
|
|
689 |
} else {
|
|
|
690 |
$.each(response['data'], function( fieldname, errors ) {
|
|
|
691 |
$.fn.showFormErrorValidator('#form-language #' + fieldname, errors);
|
|
|
692 |
});
|
|
|
693 |
}
|
|
|
694 |
}
|
|
|
695 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
696 |
$.fn.showError(textStatus);
|
|
|
697 |
}).always(function() {
|
|
|
698 |
NProgress.done();
|
|
|
699 |
});
|
|
|
700 |
return false;
|
|
|
701 |
},
|
|
|
702 |
invalidHandler: function(form, validator) {
|
|
|
703 |
|
|
|
704 |
}
|
|
|
705 |
});
|
|
|
706 |
|
7774 |
stevensc |
707 |
$('.btn-languages-edit').on("click", function(e){
|
|
|
708 |
e.preventDefault();
|
1 |
www |
709 |
|
|
|
710 |
NProgress.start();
|
|
|
711 |
$.ajax({
|
|
|
712 |
'dataType' : 'json',
|
|
|
713 |
'accept' : 'application/json',
|
|
|
714 |
'method' : 'get',
|
|
|
715 |
'url' : route_languages,
|
|
|
716 |
}).done(function(response) {
|
|
|
717 |
if(response['success']) {
|
|
|
718 |
$('#form-language #languages').val(response['data']).trigger('change');
|
|
|
719 |
validatorLanguages.resetForm();
|
|
|
720 |
|
|
|
721 |
$("#languages-box").modal('show');
|
|
|
722 |
} else {
|
|
|
723 |
$.fn.showError(response['data']);
|
|
|
724 |
}
|
|
|
725 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
726 |
$.fn.showError(textStatus);
|
|
|
727 |
}).always(function() {
|
|
|
728 |
NProgress.done();
|
|
|
729 |
});
|
|
|
730 |
return false;
|
|
|
731 |
|
|
|
732 |
});
|
|
|
733 |
|
|
|
734 |
$('.btn-languages-close').on("click", function(e){
|
|
|
735 |
e.preventDefault();
|
|
|
736 |
|
|
|
737 |
$("#languages-box").modal('hide');
|
|
|
738 |
return false;
|
|
|
739 |
});
|
|
|
740 |
|
|
|
741 |
|
|
|
742 |
var validatorDegrees = $('#form-degree').validate({
|
|
|
743 |
debug: true,
|
|
|
744 |
onclick: false,
|
|
|
745 |
onkeyup: false,
|
|
|
746 |
onfocusout: false,
|
|
|
747 |
ignore: [],
|
|
|
748 |
rules: {
|
|
|
749 |
'degrees[]': {
|
|
|
750 |
required: true,
|
|
|
751 |
}
|
|
|
752 |
},
|
|
|
753 |
submitHandler: function(form)
|
|
|
754 |
{
|
|
|
755 |
NProgress.start();
|
|
|
756 |
$.ajax({
|
|
|
757 |
'dataType' : 'json',
|
|
|
758 |
'accept' : 'application/json',
|
|
|
759 |
'method' : 'post',
|
|
|
760 |
'url' : route_degrees,
|
|
|
761 |
'data' : {
|
|
|
762 |
'degrees[]' : $('#form-degree #degrees').val()
|
|
|
763 |
},
|
|
|
764 |
}).done(function(response) {
|
|
|
765 |
if(response['success']) {
|
|
|
766 |
|
|
|
767 |
$('#list-degrees').empty();
|
|
|
768 |
$.each(response['data'], function(index, item) {
|
|
|
769 |
$('#list-degrees').append('<li><a href="#" title="">' + item.label + '</a></li>');
|
|
|
770 |
});
|
|
|
771 |
|
|
|
772 |
$("#degrees-box").modal('hide');
|
|
|
773 |
} else {
|
|
|
774 |
validatorDegrees.resetForm();
|
|
|
775 |
if(jQuery.type(response['data']) == 'string') {
|
|
|
776 |
$.fn.showError(response['data']);
|
|
|
777 |
} else {
|
|
|
778 |
$.each(response['data'], function( fieldname, errors ) {
|
|
|
779 |
$.fn.showFormErrorValidator('#form-degree #' + fieldname, errors);
|
|
|
780 |
});
|
|
|
781 |
}
|
|
|
782 |
}
|
|
|
783 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
784 |
$.fn.showError(textStatus);
|
|
|
785 |
}).always(function() {
|
|
|
786 |
NProgress.done();
|
|
|
787 |
});
|
|
|
788 |
return false;
|
|
|
789 |
},
|
|
|
790 |
invalidHandler: function(form, validator) {
|
|
|
791 |
|
|
|
792 |
}
|
|
|
793 |
});
|
|
|
794 |
|
|
|
795 |
$('.btn-degrees-edit').on("click", function(e){
|
|
|
796 |
e.preventDefault();
|
|
|
797 |
|
|
|
798 |
NProgress.start();
|
|
|
799 |
$.ajax({
|
|
|
800 |
'dataType' : 'json',
|
|
|
801 |
'accept' : 'application/json',
|
|
|
802 |
'method' : 'get',
|
|
|
803 |
'url' : route_degrees,
|
|
|
804 |
}).done(function(response) {
|
|
|
805 |
if(response['success']) {
|
|
|
806 |
$('#form-degree #degrees').val(response['data']).trigger('change');
|
|
|
807 |
validatorDegrees.resetForm();
|
|
|
808 |
|
|
|
809 |
$("#degrees-box").modal('show');
|
|
|
810 |
} else {
|
|
|
811 |
$.fn.showError(response['data']);
|
|
|
812 |
}
|
|
|
813 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
814 |
$.fn.showError(textStatus);
|
|
|
815 |
}).always(function() {
|
|
|
816 |
NProgress.done();
|
|
|
817 |
});
|
|
|
818 |
return false;
|
|
|
819 |
|
|
|
820 |
});
|
|
|
821 |
|
|
|
822 |
$('.btn-degrees-close').on("click", function(e){
|
|
|
823 |
e.preventDefault();
|
|
|
824 |
|
|
|
825 |
$("#degrees-box").modal('hide');
|
|
|
826 |
return false;
|
|
|
827 |
});
|
|
|
828 |
|
|
|
829 |
|
|
|
830 |
$('#form-degree #degrees').select2({
|
|
|
831 |
theme: 'bootstrap4',
|
|
|
832 |
width: '100%',
|
|
|
833 |
placeholder: 'LABEL_SELECT_DEGREE'
|
|
|
834 |
});
|
|
|
835 |
|
|
|
836 |
$('#form-skill #skills').select2({
|
|
|
837 |
theme: 'bootstrap4',
|
|
|
838 |
width: '100%',
|
|
|
839 |
placeholder: 'LABEL_SELECT_ONE_SKILLS'
|
|
|
840 |
});
|
|
|
841 |
|
|
|
842 |
$('#form-language #languages').select2({
|
|
|
843 |
theme: 'bootstrap4',
|
|
|
844 |
width: '100%',
|
|
|
845 |
placeholder: 'LABEL_SELECT_ONE_LANGUAGE'
|
|
|
846 |
});
|
|
|
847 |
|
|
|
848 |
|
|
|
849 |
|
|
|
850 |
$('#form-last-date-of-application #last_date_of_application').datetimepicker({
|
|
|
851 |
locale: 'es',
|
|
|
852 |
format: 'DD/MM/YYYY'
|
|
|
853 |
});
|
|
|
854 |
|
|
|
855 |
$('#form-salary #salary_visible').bootstrapToggle({'on' : 'LABEL_SHOW', 'off' : 'LABEL_NO_SHOW', 'width' : '160px', 'height' : '40px'});
|
|
|
856 |
$('#form-salary #salary_min').inputNumberFormat({ 'decimal': 2 });
|
|
|
857 |
$('#form-salary #salary_max').inputNumberFormat({ 'decimal': 2 });
|
|
|
858 |
|
|
|
859 |
$('#form-salary #salary_visible').change(function(e) {
|
|
|
860 |
e.preventDefault();
|
|
|
861 |
|
|
|
862 |
if($(this).prop('checked')) {
|
|
|
863 |
$('#form-salary #salary_min').prop('readonly', false);
|
|
|
864 |
$('#form-salary #salary_max').prop('readonly', false);
|
|
|
865 |
$('#form-salary #salary_currency').prop('disabled', false);
|
|
|
866 |
} else {
|
|
|
867 |
$('#form-salary #salary_min').val('1');
|
|
|
868 |
$('#form-salary #salary_max').val('99');
|
|
|
869 |
$('#form-salary #salary_min').prop('readonly', true);
|
|
|
870 |
$('#form-salary #salary_max').prop('readonly', true);
|
|
|
871 |
$('#form-salary #salary_currency').prop('disabled', true);
|
|
|
872 |
}
|
|
|
873 |
});
|
|
|
874 |
|
|
|
875 |
$('#form-experience #experience_visible').bootstrapToggle({'on' : 'LABEL_SHOW', 'off' : 'LABEL_NO_SHOW', 'width' : '160px', 'height' : '40px'});
|
|
|
876 |
$('#form-experience #experience_min').inputNumberFormat({ 'decimal': 0 });
|
|
|
877 |
$('#form-experience #experience_max').inputNumberFormat({ 'decimal': 0 });
|
|
|
878 |
|
|
|
879 |
$('#form-experience #experience_visible').change(function(e) {
|
|
|
880 |
e.preventDefault();
|
|
|
881 |
|
|
|
882 |
if($(this).prop('checked')) {
|
|
|
883 |
$('#form-experience #experience_min').prop('readonly', false);
|
|
|
884 |
$('#form-experience #experience_max').prop('readonly', false);
|
|
|
885 |
} else {
|
|
|
886 |
$('#form-experience #experience_min').val('1');
|
|
|
887 |
$('#form-experience #experience_max').val('5');
|
|
|
888 |
$('#form-experience #experience_min').prop('readonly', true);
|
|
|
889 |
$('#form-experience #experience_max').prop('readonly', true);
|
|
|
890 |
}
|
|
|
891 |
});
|
|
|
892 |
|
|
|
893 |
|
|
|
894 |
});
|
|
|
895 |
JS;
|
|
|
896 |
$this->inlineScript()->captureEnd();
|
6628 |
stevensc |
897 |
|
|
|
898 |
$js = <<<JS
|
6629 |
stevensc |
899 |
const linksVars = {
|
6680 |
stevensc |
900 |
link_add:"$routeAdd",
|
|
|
901 |
link_table: "$routeDatatable",
|
|
|
902 |
allowAdd: "$allowAdd",
|
|
|
903 |
allowDelete: "$allowDelete",
|
|
|
904 |
allowEdit: "$allowEdit",
|
7768 |
stevensc |
905 |
allowUsersWhoApplied: "$allowUsersWhoApplied",
|
|
|
906 |
googleApi: "$google_map_key"
|
6628 |
stevensc |
907 |
}
|
|
|
908 |
JS;
|
|
|
909 |
|
|
|
910 |
$this->inlineScript()->appendScript($js);
|
7124 |
stevensc |
911 |
$this->headLink()->appendStylesheet('/react-bundles/jobs/main.css');
|
6628 |
stevensc |
912 |
$this->inlineScript()->appendFile('/react-bundles/jobs/jobsBundle.js');
|
1 |
www |
913 |
?>
|
3766 |
stevensc |
914 |
|
1 |
www |
915 |
<!-- Content Header (Page header) -->
|
6628 |
stevensc |
916 |
<div id="jobs"></div>
|
1 |
www |
917 |
|
3766 |
stevensc |
918 |
|
|
|
919 |
|
1 |
www |
920 |
<div class="modal" tabindex="-1" role="dialog" id="add-job-box">
|
3766 |
stevensc |
921 |
<div class="modal-dialog" role="document">
|
|
|
922 |
<?php
|
|
|
923 |
$form = $this->formAdd;
|
|
|
924 |
$form->setAttributes([
|
|
|
925 |
'method' => 'post',
|
|
|
926 |
'name' => 'form-add',
|
|
|
927 |
'id' => 'form-add'
|
|
|
928 |
]);
|
|
|
929 |
$form->prepare();
|
|
|
930 |
echo $this->form()->openTag($form);
|
|
|
931 |
|
|
|
932 |
$fieldnames = [
|
|
|
933 |
'formatted_address',
|
|
|
934 |
'address1',
|
|
|
935 |
'address2',
|
|
|
936 |
'country',
|
|
|
937 |
'state',
|
|
|
938 |
'city1',
|
|
|
939 |
'city2',
|
|
|
940 |
'postal_code',
|
|
|
941 |
'latitude',
|
|
|
942 |
'longitude',
|
|
|
943 |
];
|
|
|
944 |
|
|
|
945 |
foreach ($fieldnames as $fieldname) {
|
|
|
946 |
|
|
|
947 |
$element = $form->get($fieldname);
|
|
|
948 |
echo $this->formHidden($element);
|
|
|
949 |
}
|
|
|
950 |
?>
|
|
|
951 |
<div class="modal-content">
|
|
|
952 |
<div class="modal-header">
|
|
|
953 |
<h3 class="modal-title">LABEL_NEW_JOB</h3>
|
|
|
954 |
</div>
|
|
|
955 |
<div class="modal-body">
|
|
|
956 |
<div class="form-group">
|
|
|
957 |
<?php
|
|
|
958 |
$element = $form->get('title');
|
|
|
959 |
$element->setOptions(['label' => 'LABEL_TITLE']);
|
|
|
960 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
961 |
echo $this->formLabel($element);
|
|
|
962 |
echo $this->formText($element);
|
1 |
www |
963 |
?>
|
3766 |
stevensc |
964 |
</div>
|
|
|
965 |
<div class="form-group">
|
|
|
966 |
<?php
|
|
|
967 |
$element = $form->get('employment_type');
|
|
|
968 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
969 |
$element->setOptions(['empty_option' => 'LABEL_SELECT_EMPLOYMENT_TYPE', 'label' => 'LABEL_EMPLOYMENT_TYPE']);
|
|
|
970 |
echo $this->formLabel($element);
|
|
|
971 |
echo $this->formSelect($element);
|
1 |
www |
972 |
?>
|
3766 |
stevensc |
973 |
</div>
|
|
|
974 |
<div class="form-group">
|
|
|
975 |
<?php
|
|
|
976 |
$element = $form->get('last_date_of_application');
|
|
|
977 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
978 |
$element->setOptions(['label' => 'LABEL_LAST_DATE_OF_APPLICATION']);
|
|
|
979 |
echo $this->formLabel($element);
|
|
|
980 |
echo $this->formText($element);
|
1 |
www |
981 |
?>
|
3766 |
stevensc |
982 |
</div>
|
|
|
983 |
|
|
|
984 |
<div class="form-group">
|
|
|
985 |
<?php
|
|
|
986 |
$element = $form->get('job_category_id');
|
|
|
987 |
$element->setOptions(['empty_option' => 'LABEL_SELECT_JOB_CATEGORY', 'label' => 'LABEL_JOB_CATEGORY']);
|
|
|
988 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
989 |
echo $this->formLabel($element);
|
|
|
990 |
echo $this->formSelect($element);
|
1 |
www |
991 |
?>
|
3766 |
stevensc |
992 |
</div>
|
|
|
993 |
<div class="form-group">
|
|
|
994 |
<?php
|
|
|
995 |
$element = $form->get('location_search');
|
|
|
996 |
$element->setAttributes(['name' => 'add_location_search', 'id' => 'add_location_search', 'class' => 'form-control']);
|
|
|
997 |
$element->setOptions(['label' => 'LABEL_LOCATION']);
|
|
|
998 |
echo $this->formLabel($element);
|
|
|
999 |
echo $this->formText($element);
|
1 |
www |
1000 |
?>
|
3766 |
stevensc |
1001 |
</div>
|
|
|
1002 |
</div>
|
|
|
1003 |
|
|
|
1004 |
<div class="modal-footer">
|
|
|
1005 |
<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
|
|
|
1006 |
<button type="button" class="btn btn-default btn-add-job-cancel">LABEL_CANCEL</button>
|
|
|
1007 |
</div>
|
|
|
1008 |
<?php echo $this->form()->closeTag($form); ?>
|
|
|
1009 |
</div>
|
|
|
1010 |
</div>
|
1 |
www |
1011 |
</div>
|
3766 |
stevensc |
1012 |
|
|
|
1013 |
|
1 |
www |
1014 |
<!-- The Modal -->
|
|
|
1015 |
<div class="modal" id="modalUsersWhoApplied">
|
3766 |
stevensc |
1016 |
<div class="modal-dialog modal-xl">
|
|
|
1017 |
<div class="modal-content">
|
1 |
www |
1018 |
|
|
|
1019 |
<!-- Modal Header -->
|
3766 |
stevensc |
1020 |
<div class="modal-header">
|
|
|
1021 |
<h4 class="modal-title">LABEL_USERS_WHO_APPLIED</h4>
|
|
|
1022 |
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
|
1023 |
</div>
|
1 |
www |
1024 |
|
|
|
1025 |
<!-- Modal body -->
|
3766 |
stevensc |
1026 |
<div class="modal-body">
|
|
|
1027 |
<div style="height: 300px;overflow: scroll;">
|
|
|
1028 |
<table id="gridTableUsersWhoApplied" style="width: 100%" class="table table-bordered table-hover">
|
|
|
1029 |
<thead>
|
|
|
1030 |
<tr>
|
|
|
1031 |
<th>LABEL_FIRST_NAME</th>
|
|
|
1032 |
<th>LABEL_LAST_NAME</th>
|
|
|
1033 |
<th>LABEL_EMAIL</th>
|
|
|
1034 |
<th>LABEL_ACTIONS</th>
|
|
|
1035 |
</tr>
|
|
|
1036 |
</thead>
|
|
|
1037 |
<tbody>
|
|
|
1038 |
</tbody>
|
|
|
1039 |
</table>
|
|
|
1040 |
</div>
|
1 |
www |
1041 |
|
3766 |
stevensc |
1042 |
</div>
|
|
|
1043 |
|
1 |
www |
1044 |
<!-- Modal footer -->
|
3766 |
stevensc |
1045 |
<div class="modal-footer">
|
|
|
1046 |
<button type="button" class="btn btn-danger" data-dismiss="modal">LABEL_CLOSE</button>
|
|
|
1047 |
</div>
|
1 |
www |
1048 |
|
3766 |
stevensc |
1049 |
</div>
|
|
|
1050 |
</div>
|
|
|
1051 |
</div>
|
1 |
www |
1052 |
|
|
|
1053 |
<div class="modal" tabindex="-1" role="dialog" id="job-category-box">
|
3766 |
stevensc |
1054 |
<div class="modal-dialog" role="document">
|
|
|
1055 |
<?php
|
1 |
www |
1056 |
$form = $this->formJobCategory;
|
|
|
1057 |
$form->setAttributes([
|
|
|
1058 |
'method' => 'post',
|
|
|
1059 |
'name' => 'form-job-category',
|
|
|
1060 |
'id' => 'form-job-category'
|
|
|
1061 |
]);
|
|
|
1062 |
$form->prepare();
|
|
|
1063 |
echo $this->form()->openTag($form);
|
3766 |
stevensc |
1064 |
?>
|
|
|
1065 |
<div class="modal-content">
|
|
|
1066 |
<div class="modal-header">
|
|
|
1067 |
<h3 class="modal-title">LABEL_JOB_CATEGORY</h3>
|
|
|
1068 |
</div>
|
|
|
1069 |
<div class="modal-body">
|
1 |
www |
1070 |
<div class="form-group">
|
3766 |
stevensc |
1071 |
<?php
|
|
|
1072 |
$element = $form->get('job_category_id');
|
|
|
1073 |
$element->setOptions(['label' => 'LABEL_JOB_CATEGORY']);
|
|
|
1074 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
1075 |
echo $this->formLabel($element);
|
|
|
1076 |
echo $this->formSelect($element);
|
|
|
1077 |
?>
|
1 |
www |
1078 |
</div>
|
3766 |
stevensc |
1079 |
</div>
|
|
|
1080 |
<div class="modal-footer">
|
|
|
1081 |
<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
|
|
|
1082 |
<button type="button" class="btn btn-default btn-job-category-close">LABEL_CANCEL</button>
|
|
|
1083 |
</div>
|
|
|
1084 |
<?php echo $this->form()->closeTag($form); ?>
|
|
|
1085 |
</div>
|
|
|
1086 |
</div>
|
|
|
1087 |
</div>
|
1 |
www |
1088 |
|
|
|
1089 |
<div class="modal" tabindex="-1" role="dialog" id="salary-box">
|
3766 |
stevensc |
1090 |
<div class="modal-dialog" role="document">
|
|
|
1091 |
<?php
|
1 |
www |
1092 |
$form = $this->formSalary;
|
|
|
1093 |
$form->setAttributes([
|
|
|
1094 |
'method' => 'post',
|
|
|
1095 |
'name' => 'form-salary',
|
|
|
1096 |
'id' => 'form-salary'
|
|
|
1097 |
]);
|
|
|
1098 |
$form->prepare();
|
|
|
1099 |
echo $this->form()->openTag($form);
|
3766 |
stevensc |
1100 |
?>
|
|
|
1101 |
<div class="modal-content">
|
|
|
1102 |
<div class="modal-header">
|
|
|
1103 |
<h3 class="modal-title">LABEL_SALARY</h3>
|
|
|
1104 |
</div>
|
|
|
1105 |
<div class="modal-body">
|
1 |
www |
1106 |
<div class="form-group">
|
3766 |
stevensc |
1107 |
<?php
|
|
|
1108 |
$element = $form->get('salary_visible');
|
|
|
1109 |
echo $this->formCheckbox($element);
|
|
|
1110 |
?>
|
1 |
www |
1111 |
</div>
|
|
|
1112 |
<div class="form-group">
|
3766 |
stevensc |
1113 |
<?php
|
|
|
1114 |
$element = $form->get('salary_currency');
|
|
|
1115 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
1116 |
$element->setOptions(['label' => 'LABEL_CURRENCY']);
|
|
|
1117 |
echo $this->formLabel($element);
|
|
|
1118 |
echo $this->formSelect($element);
|
|
|
1119 |
?>
|
1 |
www |
1120 |
</div>
|
3766 |
stevensc |
1121 |
<div class="form-group">
|
|
|
1122 |
<?php
|
|
|
1123 |
$element = $form->get('salary_min');
|
|
|
1124 |
$element->setOptions(['label' => 'LABEL_MINIMUM']);
|
|
|
1125 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
1126 |
echo $this->formLabel($element);
|
|
|
1127 |
echo $this->formText($element);
|
|
|
1128 |
?>
|
1 |
www |
1129 |
</div>
|
|
|
1130 |
<div class="form-group">
|
3766 |
stevensc |
1131 |
<?php
|
|
|
1132 |
$element = $form->get('salary_max');
|
|
|
1133 |
$element->setOptions(['label' => 'LABEL_MAXIMUM']);
|
|
|
1134 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
1135 |
echo $this->formLabel($element);
|
|
|
1136 |
echo $this->formText($element);
|
|
|
1137 |
?>
|
1 |
www |
1138 |
</div>
|
3766 |
stevensc |
1139 |
</div>
|
|
|
1140 |
<div class="modal-footer">
|
|
|
1141 |
<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
|
|
|
1142 |
<button type="button" class="btn btn-default btn-salary-close">LABEL_CANCEL</button>
|
|
|
1143 |
</div>
|
|
|
1144 |
<?php echo $this->form()->closeTag($form); ?>
|
|
|
1145 |
</div>
|
|
|
1146 |
</div>
|
|
|
1147 |
</div>
|
1 |
www |
1148 |
|
|
|
1149 |
<div class="modal" tabindex="-1" role="dialog" id="experience-box">
|
3766 |
stevensc |
1150 |
<div class="modal-dialog" role="document">
|
|
|
1151 |
<?php
|
1 |
www |
1152 |
$form = $this->formExperience;
|
|
|
1153 |
$form->setAttributes([
|
|
|
1154 |
'method' => 'post',
|
|
|
1155 |
'name' => 'form-experience',
|
|
|
1156 |
'id' => 'form-experience'
|
|
|
1157 |
]);
|
|
|
1158 |
$form->prepare();
|
|
|
1159 |
echo $this->form()->openTag($form);
|
3766 |
stevensc |
1160 |
?>
|
|
|
1161 |
<div class="modal-content">
|
|
|
1162 |
<div class="modal-header">
|
|
|
1163 |
<h3 class="modal-title">LABEL_EXPERIENCE</h3>
|
|
|
1164 |
</div>
|
|
|
1165 |
<div class="modal-body">
|
1 |
www |
1166 |
<div class="form-group">
|
3766 |
stevensc |
1167 |
<?php
|
|
|
1168 |
$element = $form->get('experience_visible');
|
|
|
1169 |
|
|
|
1170 |
echo $this->formCheckbox($element);
|
|
|
1171 |
?>
|
1 |
www |
1172 |
</div>
|
3766 |
stevensc |
1173 |
<div class="form-group">
|
|
|
1174 |
<?php
|
|
|
1175 |
$element = $form->get('experience_min');
|
|
|
1176 |
$element->setOptions(['label' => 'LABEL_MINIMUM']);
|
|
|
1177 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
1178 |
echo $this->formLabel($element);
|
|
|
1179 |
echo $this->formText($element);
|
|
|
1180 |
?>
|
1 |
www |
1181 |
</div>
|
|
|
1182 |
<div class="form-group">
|
3766 |
stevensc |
1183 |
<?php
|
|
|
1184 |
$element = $form->get('experience_max');
|
|
|
1185 |
$element->setOptions(['label' => 'LABEL_MAXIMUM']);
|
|
|
1186 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
1187 |
echo $this->formLabel($element);
|
|
|
1188 |
echo $this->formText($element);
|
|
|
1189 |
?>
|
1 |
www |
1190 |
</div>
|
3766 |
stevensc |
1191 |
</div>
|
|
|
1192 |
<div class="modal-footer">
|
|
|
1193 |
<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
|
|
|
1194 |
<button type="button" class="btn btn-default btn-experience-close">LABEL_CANCEL</button>
|
|
|
1195 |
</div>
|
|
|
1196 |
<?php echo $this->form()->closeTag($form); ?>
|
|
|
1197 |
</div>
|
|
|
1198 |
</div>
|
|
|
1199 |
</div>
|
1 |
www |
1200 |
|
|
|
1201 |
|
|
|
1202 |
<div class="modal" tabindex="-1" role="dialog" id="skills-box">
|
3766 |
stevensc |
1203 |
<div class="modal-dialog" role="document">
|
|
|
1204 |
<?php
|
|
|
1205 |
$form = $this->formSkill;
|
|
|
1206 |
$form->setAttributes([
|
|
|
1207 |
'method' => 'post',
|
|
|
1208 |
'name' => 'form-skill',
|
|
|
1209 |
'id' => 'form-skill'
|
|
|
1210 |
]);
|
|
|
1211 |
$form->prepare();
|
|
|
1212 |
echo $this->form()->openTag($form);
|
|
|
1213 |
?>
|
|
|
1214 |
<div class="modal-content">
|
|
|
1215 |
<div class="modal-header">
|
|
|
1216 |
<h3 class="modal-title">LABEL_SKILLS</h3>
|
|
|
1217 |
</div>
|
|
|
1218 |
<div class="modal-body">
|
1 |
www |
1219 |
<div class="form-group">
|
3766 |
stevensc |
1220 |
<?php
|
1 |
www |
1221 |
$element = $form->get('skills');
|
|
|
1222 |
$element->setOptions(['label' => 'LABEL_SKILLS']);
|
|
|
1223 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
1224 |
echo $this->formLabel($element);
|
|
|
1225 |
echo $this->formSelect($element);
|
3766 |
stevensc |
1226 |
?>
|
1 |
www |
1227 |
</div>
|
3766 |
stevensc |
1228 |
</div>
|
|
|
1229 |
|
|
|
1230 |
|
|
|
1231 |
<div class="modal-footer">
|
|
|
1232 |
<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
|
|
|
1233 |
<button type="button" class="btn btn-default btn-skills-close">LABEL_CANCEL</button>
|
|
|
1234 |
</div>
|
|
|
1235 |
<?php echo $this->form()->closeTag($form); ?>
|
|
|
1236 |
</div>
|
|
|
1237 |
</div>
|
1 |
www |
1238 |
</div>
|
|
|
1239 |
|
|
|
1240 |
<div class="modal" tabindex="-1" role="dialog" id="languages-box">
|
3766 |
stevensc |
1241 |
<div class="modal-dialog" role="document">
|
|
|
1242 |
<?php
|
1 |
www |
1243 |
$form = $this->formLanguage;
|
|
|
1244 |
$form->setAttributes([
|
|
|
1245 |
'method' => 'post',
|
|
|
1246 |
'name' => 'form-language',
|
|
|
1247 |
'id' => 'form-language'
|
|
|
1248 |
]);
|
|
|
1249 |
$form->prepare();
|
|
|
1250 |
echo $this->form()->openTag($form);
|
3766 |
stevensc |
1251 |
?>
|
|
|
1252 |
<div class="modal-content">
|
|
|
1253 |
<div class="modal-header">
|
|
|
1254 |
<h3 class="modal-title">LABEL_LANGUAGES</h3>
|
|
|
1255 |
</div>
|
|
|
1256 |
<div class="modal-body">
|
1 |
www |
1257 |
<div class="form-group">
|
3766 |
stevensc |
1258 |
<?php
|
1 |
www |
1259 |
$element = $form->get('languages');
|
|
|
1260 |
$element->setOptions(['label' => 'LABEL_LANGUAGES']);
|
|
|
1261 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
1262 |
echo $this->formLabel($element);
|
|
|
1263 |
echo $this->formSelect($element);
|
3766 |
stevensc |
1264 |
?>
|
1 |
www |
1265 |
</div>
|
3766 |
stevensc |
1266 |
</div>
|
|
|
1267 |
<div class="modal-footer">
|
|
|
1268 |
<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
|
|
|
1269 |
<button type="button" class="btn btn-default btn-languages-close">LABEL_CANCEL</button>
|
|
|
1270 |
</div>
|
|
|
1271 |
<?php echo $this->form()->closeTag($form); ?>
|
|
|
1272 |
</div>
|
|
|
1273 |
</div>
|
1 |
www |
1274 |
</div>
|
|
|
1275 |
|
|
|
1276 |
<div class="modal" tabindex="-1" role="dialog" id="degrees-box">
|
3766 |
stevensc |
1277 |
<div class="modal-dialog" role="document">
|
|
|
1278 |
<?php
|
1 |
www |
1279 |
$form = $this->formDegree;
|
|
|
1280 |
$form->setAttributes([
|
|
|
1281 |
'method' => 'post',
|
|
|
1282 |
'name' => 'form-degree',
|
|
|
1283 |
'id' => 'form-degree'
|
|
|
1284 |
]);
|
|
|
1285 |
$form->prepare();
|
|
|
1286 |
echo $this->form()->openTag($form);
|
3766 |
stevensc |
1287 |
?>
|
|
|
1288 |
<div class="modal-content">
|
|
|
1289 |
<div class="modal-header">
|
|
|
1290 |
<h3 class="modal-title">LABEL_DEGREES</h3>
|
|
|
1291 |
</div>
|
|
|
1292 |
<div class="modal-body">
|
1 |
www |
1293 |
<div class="form-group">
|
3766 |
stevensc |
1294 |
<?php
|
1 |
www |
1295 |
$element = $form->get('degrees');
|
|
|
1296 |
$element->setOptions(['label' => 'LABEL_DEGREES']);
|
|
|
1297 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
1298 |
echo $this->formLabel($element);
|
|
|
1299 |
echo $this->formSelect($element);
|
3766 |
stevensc |
1300 |
?>
|
1 |
www |
1301 |
</div>
|
3766 |
stevensc |
1302 |
</div>
|
|
|
1303 |
<div class="modal-footer">
|
|
|
1304 |
<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
|
|
|
1305 |
<button type="button" class="btn btn-default btn-degrees-close">LABEL_CANCEL</button>
|
|
|
1306 |
</div>
|
|
|
1307 |
<?php echo $this->form()->closeTag($form); ?>
|
|
|
1308 |
</div>
|
|
|
1309 |
</div>
|
1 |
www |
1310 |
</div>
|