15461 |
efrain |
1 |
<?php
|
|
|
2 |
$acl = $this->viewModel()->getRoot()->getVariable('acl');
|
|
|
3 |
$currentUser = $this->currentUserHelper();
|
|
|
4 |
|
|
|
5 |
$roleName = $currentUser->getUserTypeId();
|
|
|
6 |
|
|
|
7 |
$routeDatatable = $this->url('recruitment-and-selection/applications');
|
|
|
8 |
$routeUserByEmail = $this->url('recruitment-and-selection/applications/user-by-email');
|
|
|
9 |
|
|
|
10 |
$allowAdd = $acl->isAllowed($roleName, 'recruitment-and-selection/applications/add') ? 1 : 0;
|
|
|
11 |
$allowDelete = $acl->isAllowed($roleName, 'recruitment-and-selection/applications/delete') ? 1 : 0;
|
|
|
12 |
$allowView = $acl->isAllowed($roleName, 'recruitment-and-selection/applications/view') ? 1 : 0;
|
|
|
13 |
$allowUserByEmail = $acl->isAllowed($roleName, 'recruitment-and-selection/applications/user-by-email') ? 1 : 0;
|
|
|
14 |
$allowLevel = $acl->isAllowed($roleName, 'recruitment-and-selection/applications/level') ? 1 : 0;
|
|
|
15 |
$allowStatus = $acl->isAllowed($roleName, 'recruitment-and-selection/applications/status') ? 1 : 0;
|
|
|
16 |
$allowComment = $acl->isAllowed($roleName, 'recruitment-and-selection/applications/comment') ? 1 : 0;
|
|
|
17 |
|
|
|
18 |
$allowFileAdd = $acl->isAllowed($roleName, 'recruitment-and-selection/applications/files/add') ? 1 : 0;
|
|
|
19 |
$allowInterviewAdd = $acl->isAllowed($roleName, 'recruitment-and-selection/applications/interviews/add') ? 1 : 0;
|
|
|
20 |
|
|
|
21 |
|
|
|
22 |
|
|
|
23 |
$this->headLink()->appendStylesheet($this->basePath('plugins/nprogress/nprogress.css'));
|
|
|
24 |
$this->inlineScript()->appendFile($this->basePath('plugins/nprogress/nprogress.js'));
|
|
|
25 |
|
|
|
26 |
|
|
|
27 |
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/jquery.validate.js'));
|
|
|
28 |
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/additional-methods.js'));
|
|
|
29 |
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/localization/messages_es.js'));
|
|
|
30 |
|
|
|
31 |
$this->headLink()->appendStylesheet($this->basePath('plugins/datatables-bs4/css/dataTables.bootstrap4.min.css'));
|
|
|
32 |
$this->headLink()->appendStylesheet($this->basePath('plugins/datatables-responsive/css/responsive.bootstrap4.min.css'));
|
|
|
33 |
|
|
|
34 |
$this->inlineScript()->appendFile($this->basePath('plugins/datatables/jquery.dataTables.min.js'));
|
|
|
35 |
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-bs4/js/dataTables.bootstrap4.min.js'));
|
|
|
36 |
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/dataTables.responsive.min.js'));
|
|
|
37 |
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/responsive.bootstrap4.min.js'));
|
|
|
38 |
|
|
|
39 |
|
|
|
40 |
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-fileinput/css/fileinput.min.css'));
|
|
|
41 |
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-fileinput/themes/explorer-fa/theme.css'));
|
|
|
42 |
|
|
|
43 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/plugins/piexif.js'));
|
|
|
44 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/plugins/sortable.js'));
|
|
|
45 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/fileinput.js'));
|
|
|
46 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/locales/es.js'));
|
|
|
47 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/themes/fa/theme.js'));
|
|
|
48 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/themes/explorer-fa/theme.js'));
|
|
|
49 |
|
|
|
50 |
|
|
|
51 |
$this->headLink()->appendStylesheet($this->basePath('plugins/select2/css/select2.min.css'));
|
|
|
52 |
$this->headLink()->appendStylesheet($this->basePath('plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css'));
|
|
|
53 |
|
|
|
54 |
$this->inlineScript()->appendFile($this->basePath('plugins/select2/js/select2.full.min.js'));
|
|
|
55 |
|
|
|
56 |
$this->inlineScript()->appendFile($this->basePath('plugins/moment/moment-with-locales.min.js'));
|
|
|
57 |
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-datetimepicker/css/bootstrap-datetimepicker.css'));
|
|
|
58 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js'));
|
|
|
59 |
|
|
|
60 |
|
|
|
61 |
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap4-toggle/css/bootstrap4-toggle.min.css'));
|
|
|
62 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap4-toggle/js/bootstrap4-toggle.min.js'));
|
|
|
63 |
|
|
|
64 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-confirmation/dist/bootstrap-confirmation.js'));
|
|
|
65 |
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-checkbox/awesome-bootstrap-checkbox.css'));
|
|
|
66 |
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-input-number/input-number-format.jquery.js'));
|
|
|
67 |
|
|
|
68 |
// bootbox Alert //
|
|
|
69 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootbox/bootbox.min.js'));
|
|
|
70 |
|
|
|
71 |
// JsRender //
|
|
|
72 |
$this->inlineScript()->appendFile($this->basePath('plugins/jsrender/jsrender.min.js'));
|
|
|
73 |
|
|
|
74 |
|
|
|
75 |
$this->inlineScript()->captureStart();
|
|
|
76 |
echo <<<JS
|
|
|
77 |
jQuery(document).ready(function($) {
|
|
|
78 |
|
|
|
79 |
var allowDelete = $allowDelete ;
|
|
|
80 |
var allowView = $allowView ;
|
|
|
81 |
|
|
|
82 |
$.validator.setDefaults({
|
|
|
83 |
debug: true,
|
|
|
84 |
highlight: function(element) {
|
|
|
85 |
$(element).addClass('is-invalid');
|
|
|
86 |
},
|
|
|
87 |
unhighlight: function(element) {
|
|
|
88 |
$(element).removeClass('is-invalid');
|
|
|
89 |
},
|
|
|
90 |
errorElement: 'span',
|
|
|
91 |
errorClass: 'error invalid-feedback',
|
|
|
92 |
errorPlacement: function(error, element) {
|
|
|
93 |
if(element.parent('.form-group').length) {
|
|
|
94 |
error.insertAfter(element);
|
|
|
95 |
} else if(element.parent('.toggle').length) {
|
|
|
96 |
error.insertAfter(element.parent().parent());
|
|
|
97 |
} else {
|
|
|
98 |
error.insertAfter(element.parent());
|
|
|
99 |
}
|
|
|
100 |
}
|
|
|
101 |
});
|
|
|
102 |
|
|
|
103 |
|
|
|
104 |
$.fn.showFormErrorValidator = function(fieldname, errors) {
|
|
|
105 |
var field = $(fieldname);
|
|
|
106 |
if(field) {
|
|
|
107 |
$(field).addClass('is-invalid');
|
|
|
108 |
|
|
|
109 |
|
|
|
110 |
var error = $('<span id="' + fieldname +'-error" class="error invalid-feedback">' + errors + '</div>');
|
|
|
111 |
if(field.parent('.form-group').length) {
|
|
|
112 |
error.insertAfter(field);
|
|
|
113 |
} else if(field.parent('.toggle').length) {
|
|
|
114 |
error.insertAfter(field.parent().parent());
|
|
|
115 |
} else {
|
|
|
116 |
error.insertAfter(field.parent());
|
|
|
117 |
}
|
|
|
118 |
}
|
|
|
119 |
};
|
|
|
120 |
|
|
|
121 |
|
|
|
122 |
|
|
|
123 |
|
|
|
124 |
var gridTable = $('#gridTable').dataTable({
|
|
|
125 |
'processing': true,
|
|
|
126 |
'serverSide': true,
|
|
|
127 |
'searching': true,
|
|
|
128 |
'order': [
|
|
|
129 |
[0, 'asc']
|
|
|
130 |
],
|
|
|
131 |
'ordering': true,
|
|
|
132 |
'ordenable': true,
|
|
|
133 |
'responsive': true,
|
|
|
134 |
'select': false,
|
|
|
135 |
'paging': true,
|
|
|
136 |
'pagingType': 'simple_numbers',
|
|
|
137 |
'ajax': {
|
|
|
138 |
'url': '$routeDatatable',
|
|
|
139 |
'type': 'get',
|
|
|
140 |
'data': function(d) {
|
|
|
141 |
d.vacancy_id = $('#form-filter #vacancy_id').val();
|
|
|
142 |
},
|
|
|
143 |
'beforeSend': function(request) {
|
|
|
144 |
NProgress.start();
|
|
|
145 |
},
|
|
|
146 |
'dataFilter': function(response) {
|
|
|
147 |
var response = jQuery.parseJSON(response);
|
|
|
148 |
var json = {};
|
|
|
149 |
json.recordsTotal = 0;
|
|
|
150 |
json.recordsFiltered = 0;
|
|
|
151 |
json.data = [];
|
|
|
152 |
if (response.success) {
|
|
|
153 |
|
|
|
154 |
|
|
|
155 |
$('#form-add').attr('action', response.data.link_add);
|
|
|
156 |
if(response.data.link_add.length == 0) {
|
|
|
157 |
$('btn.btn-add').hide();
|
|
|
158 |
} else {
|
|
|
159 |
$('btn.btn-add').show();
|
|
|
160 |
}
|
|
|
161 |
|
|
|
162 |
|
|
|
163 |
json.recordsTotal = response.data.total;
|
|
|
164 |
json.recordsFiltered = response.data.total;
|
|
|
165 |
json.data = response.data.items;
|
|
|
166 |
} else {
|
|
|
167 |
$('btn.btn-add').hide();
|
|
|
168 |
$.fn.showError(response.data)
|
|
|
169 |
}
|
|
|
170 |
return JSON.stringify(json);
|
|
|
171 |
}
|
|
|
172 |
},
|
|
|
173 |
'language': {
|
|
|
174 |
'sProcessing': 'LABEL_DATATABLE_SPROCESSING',
|
|
|
175 |
'sLengthMenu': 'LABEL_DATATABLE_SLENGTHMENU',
|
|
|
176 |
'sZeroRecords': 'LABEL_DATATABLE_SZERORECORDS',
|
|
|
177 |
'sEmptyTable': 'LABEL_DATATABLE_SEMPTYTABLE',
|
|
|
178 |
'sInfo': 'LABEL_DATATABLE_SINFO',
|
|
|
179 |
'sInfoEmpty': 'LABEL_DATATABLE_SINFOEMPTY',
|
|
|
180 |
'sInfoFiltered': 'LABEL_DATATABLE_SINFOFILTERED',
|
|
|
181 |
'sInfoPostFix': '',
|
|
|
182 |
'sSearch': 'LABEL_DATATABLE_SSEARCH',
|
|
|
183 |
'sUrl': '',
|
|
|
184 |
'sInfoThousands': ',',
|
|
|
185 |
'sLoadingRecords': 'LABEL_DATATABLE_SLOADINGRECORDS',
|
|
|
186 |
'oPaginate': {
|
|
|
187 |
'sFirst': 'LABEL_DATATABLE_SFIRST',
|
|
|
188 |
'sLast': 'LABEL_DATATABLE_SLAST',
|
|
|
189 |
'sNext': 'LABEL_DATATABLE_SNEXT',
|
|
|
190 |
'sPrevious': 'LABEL_DATATABLE_SPREVIOUS'
|
|
|
191 |
},
|
|
|
192 |
'oAria': {
|
|
|
193 |
'sSortAscending': ': LABEL_DATATABLE_SSORTASCENDING',
|
|
|
194 |
'sSortDescending': ':LABEL_DATATABLE_SSORTDESCENDING'
|
|
|
195 |
},
|
|
|
196 |
},
|
|
|
197 |
'drawCallback': function(settings) {
|
|
|
198 |
NProgress.done();
|
|
|
199 |
$('button.btn-delete').confirmation({
|
|
|
200 |
rootSelector: 'button.btn-delete',
|
|
|
201 |
title: 'LABEL_ARE_YOU_SURE',
|
|
|
202 |
singleton: true,
|
|
|
203 |
btnOkLabel: 'LABEL_YES',
|
|
|
204 |
btnCancelLabel: 'LABEL_NO',
|
|
|
205 |
onConfirm: function(value) {
|
|
|
206 |
action = $(this).data('href');
|
|
|
207 |
NProgress.start();
|
|
|
208 |
$.ajax({
|
|
|
209 |
'dataType': 'json',
|
|
|
210 |
'accept': 'application/json',
|
|
|
211 |
'method': 'post',
|
|
|
212 |
'url': action,
|
|
|
213 |
}).done(function(response) {
|
|
|
214 |
if (response['success']) {
|
|
|
215 |
$.fn.showSuccess(response['data']);
|
|
|
216 |
gridTable.api().ajax.reload(null, false);
|
|
|
217 |
} else {
|
|
|
218 |
$.fn.showError(response['data']);
|
|
|
219 |
}
|
|
|
220 |
}).fail(function(jqXHR, textStatus, errorThrown) {
|
|
|
221 |
$.fn.showError(textStatus);
|
|
|
222 |
}).always(function() {
|
|
|
223 |
NProgress.done();
|
|
|
224 |
});
|
|
|
225 |
},
|
|
|
226 |
});
|
|
|
227 |
},
|
|
|
228 |
'aoColumns': [
|
|
|
229 |
{ 'mDataProp': 'first_name' },
|
|
|
230 |
{ 'mDataProp': 'last_name' },
|
|
|
231 |
{ 'mDataProp': 'email' },
|
|
|
232 |
{ 'mDataProp': 'status' },
|
|
|
233 |
{ 'mDataProp': 'level' },
|
|
|
234 |
{ 'mDataProp': 'actions' },
|
|
|
235 |
],
|
|
|
236 |
'columnDefs': [
|
|
|
237 |
{
|
|
|
238 |
'targets': -1,
|
|
|
239 |
'orderable': false,
|
|
|
240 |
'render': function(data, type, row) {
|
|
|
241 |
s = '';
|
|
|
242 |
if (allowView) {
|
|
|
243 |
s = s + '<button class="btn btn-default btn-view" data-href="' + data['link_view'] + '" data-toggle="tooltip" title="LABEL_VIEW"><i class="fa fa-external-link"></i> LABEL_VIEW </button> ';
|
|
|
244 |
}
|
|
|
245 |
if (allowDelete) {
|
|
|
246 |
s = s + '<button class="btn btn-danger btn-delete" data-href="' + data['link_delete'] + '" data-toggle="tooltip" title="LABEL_DELETE"><i class="fa fa-trash"></i> LABEL_DELETE </button> ';
|
|
|
247 |
}
|
|
|
248 |
|
|
|
249 |
return s;
|
|
|
250 |
}
|
|
|
251 |
}
|
|
|
252 |
],
|
|
|
253 |
});
|
|
|
254 |
|
|
|
255 |
var validatorAdd = $('#form-add').validate({
|
|
|
256 |
debug: true,
|
|
|
257 |
onclick: false,
|
|
|
258 |
onkeyup: false,
|
|
|
259 |
ignore: [],
|
|
|
260 |
rules: {
|
|
|
261 |
'email': {
|
|
|
262 |
required: true,
|
|
|
263 |
maxlength: 250,
|
|
|
264 |
email: true,
|
|
|
265 |
},
|
|
|
266 |
'first_name': {
|
|
|
267 |
required: true,
|
|
|
268 |
maxlength: 128,
|
|
|
269 |
},
|
|
|
270 |
'last_name': {
|
|
|
271 |
required: true,
|
|
|
272 |
maxlength: 128,
|
|
|
273 |
},
|
|
|
274 |
},
|
|
|
275 |
submitHandler: function(form)
|
|
|
276 |
{
|
|
|
277 |
$.ajax({
|
|
|
278 |
'dataType' : 'json',
|
|
|
279 |
'accept' : 'application/json',
|
|
|
280 |
'method' : 'post',
|
|
|
281 |
'url' : $('#form-add').attr('action'),
|
|
|
282 |
'data' : $('#form-add').serialize()
|
|
|
283 |
}).done(function(response) {
|
|
|
284 |
NProgress.start();
|
|
|
285 |
if(response['success']) {
|
|
|
286 |
$.fn.showSuccess(response['data']);
|
|
|
287 |
|
|
|
288 |
$('#modal-add-application').modal('hide');
|
|
|
289 |
|
|
|
290 |
|
|
|
291 |
gridTable.api().ajax.reload(null, false);
|
|
|
292 |
} else {
|
|
|
293 |
validatorAdd.resetForm();
|
|
|
294 |
if(jQuery.type(response['data']) == 'string') {
|
|
|
295 |
$.fn.showError(response['data']);
|
|
|
296 |
} else {
|
|
|
297 |
$.each(response['data'], function( fieldname, errors ) {
|
|
|
298 |
$.fn.showFormErrorValidator('#form-add #' + fieldname, errors);
|
|
|
299 |
});
|
|
|
300 |
}
|
|
|
301 |
}
|
|
|
302 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
303 |
$.fn.showError(textStatus);
|
|
|
304 |
}).always(function() {
|
|
|
305 |
NProgress.done();
|
|
|
306 |
|
|
|
307 |
});
|
|
|
308 |
return false;
|
|
|
309 |
|
|
|
310 |
},
|
|
|
311 |
invalidHandler: function(form, validator) {
|
|
|
312 |
|
|
|
313 |
return false;
|
|
|
314 |
}
|
|
|
315 |
});
|
|
|
316 |
|
|
|
317 |
|
|
|
318 |
|
|
|
319 |
|
|
|
320 |
var validatorFile = $('#form-file').validate({
|
|
|
321 |
debug: true,
|
|
|
322 |
onclick: false,
|
|
|
323 |
onkeyup: false,
|
|
|
324 |
ignore: [],
|
|
|
325 |
rules: {
|
|
|
326 |
|
|
|
327 |
'name': {
|
|
|
328 |
required: true,
|
|
|
329 |
maxlength: 128,
|
|
|
330 |
},
|
|
|
331 |
'file': {
|
|
|
332 |
required: true,
|
|
|
333 |
extension: 'pdf|doc|docx',
|
|
|
334 |
|
|
|
335 |
},
|
|
|
336 |
},
|
|
|
337 |
submitHandler: function(form)
|
|
|
338 |
{
|
|
|
339 |
var formdata = false;
|
|
|
340 |
if (window.FormData){
|
|
|
341 |
formdata = new FormData(form); //form[0]);
|
|
|
342 |
}
|
|
|
343 |
|
|
|
344 |
|
|
|
345 |
$.ajax({
|
|
|
346 |
'dataType' : 'json',
|
|
|
347 |
'accept' : 'application/json',
|
|
|
348 |
'method' : 'post',
|
|
|
349 |
'url' : $('#form-file').attr('action'),
|
|
|
350 |
'data' : formdata ? formdata : $('#form-file').serialize(),
|
|
|
351 |
'processData' : false,
|
|
|
352 |
'contentType' : false,
|
|
|
353 |
}).done(function(response) {
|
|
|
354 |
NProgress.start();
|
|
|
355 |
if(response['success']) {
|
|
|
356 |
$.fn.showSuccess(response['data']['message']);
|
|
|
357 |
$('#fileTable tbody').html(
|
|
|
358 |
$('#fileTemplate').render( response['data']['files'] )
|
|
|
359 |
);
|
|
|
360 |
|
|
|
361 |
$('#modal-add-file').modal('hide');
|
|
|
362 |
|
|
|
363 |
|
|
|
364 |
} else {
|
|
|
365 |
validatorFile.resetForm();
|
|
|
366 |
if(jQuery.type(response['data']) == 'string') {
|
|
|
367 |
$.fn.showError(response['data']);
|
|
|
368 |
} else {
|
|
|
369 |
$.each(response['data'], function( fieldname, errors ) {
|
|
|
370 |
$.fn.showFormErrorValidator('#form-file #' + fieldname, errors);
|
|
|
371 |
});
|
|
|
372 |
}
|
|
|
373 |
}
|
|
|
374 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
375 |
$.fn.showError(textStatus);
|
|
|
376 |
}).always(function() {
|
|
|
377 |
NProgress.done();
|
|
|
378 |
|
|
|
379 |
});
|
|
|
380 |
return false;
|
|
|
381 |
|
|
|
382 |
},
|
|
|
383 |
invalidHandler: function(form, validator) {
|
|
|
384 |
|
|
|
385 |
return false;
|
|
|
386 |
}
|
|
|
387 |
});
|
|
|
388 |
|
|
|
389 |
var validatorStatus = $('#form-status').validate({
|
|
|
390 |
debug: true,
|
|
|
391 |
onclick: false,
|
|
|
392 |
onkeyup: false,
|
|
|
393 |
ignore: [],
|
|
|
394 |
rules: {
|
|
|
395 |
'status': {
|
|
|
396 |
required: true,
|
|
|
397 |
},
|
|
|
398 |
},
|
|
|
399 |
submitHandler: function(form)
|
|
|
400 |
{
|
|
|
401 |
|
|
|
402 |
$.ajax({
|
|
|
403 |
'dataType' : 'json',
|
|
|
404 |
'accept' : 'application/json',
|
|
|
405 |
'method' : 'post',
|
|
|
406 |
'url' : $('#form-status').attr('action'),
|
|
|
407 |
'data' : $('#form-status').serialize(),
|
|
|
408 |
|
|
|
409 |
}).done(function(response) {
|
|
|
410 |
NProgress.start();
|
|
|
411 |
if(response['success']) {
|
|
|
412 |
$.fn.showSuccess(response['data']['message']);
|
|
|
413 |
|
|
|
414 |
$('#view_application_status').html(response['data']['status']);
|
|
|
415 |
$('#modal-status').modal('hide');
|
|
|
416 |
|
|
|
417 |
|
|
|
418 |
} else {
|
|
|
419 |
validatorFile.resetForm();
|
|
|
420 |
if(jQuery.type(response['data']) == 'string') {
|
|
|
421 |
$.fn.showError(response['data']);
|
|
|
422 |
} else {
|
|
|
423 |
$.each(response['data'], function( fieldname, errors ) {
|
|
|
424 |
$.fn.showFormErrorValidator('#form-status #' + fieldname, errors);
|
|
|
425 |
});
|
|
|
426 |
}
|
|
|
427 |
}
|
|
|
428 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
429 |
$.fn.showError(textStatus);
|
|
|
430 |
}).always(function() {
|
|
|
431 |
NProgress.done();
|
|
|
432 |
|
|
|
433 |
});
|
|
|
434 |
return false;
|
|
|
435 |
|
|
|
436 |
},
|
|
|
437 |
invalidHandler: function(form, validator) {
|
|
|
438 |
|
|
|
439 |
return false;
|
|
|
440 |
}
|
|
|
441 |
});
|
|
|
442 |
|
|
|
443 |
var validatorLevel = $('#form-level').validate({
|
|
|
444 |
debug: true,
|
|
|
445 |
onclick: false,
|
|
|
446 |
onkeyup: false,
|
|
|
447 |
ignore: [],
|
|
|
448 |
rules: {
|
|
|
449 |
'level': {
|
|
|
450 |
required: true,
|
|
|
451 |
},
|
|
|
452 |
},
|
|
|
453 |
submitHandler: function(form)
|
|
|
454 |
{
|
|
|
455 |
|
|
|
456 |
$.ajax({
|
|
|
457 |
'dataType' : 'json',
|
|
|
458 |
'accept' : 'application/json',
|
|
|
459 |
'method' : 'post',
|
|
|
460 |
'url' : $('#form-level').attr('action'),
|
|
|
461 |
'data' : $('#form-level').serialize(),
|
|
|
462 |
|
|
|
463 |
}).done(function(response) {
|
|
|
464 |
NProgress.start();
|
|
|
465 |
if(response['success']) {
|
|
|
466 |
$.fn.showSuccess(response['data']['message']);
|
|
|
467 |
|
|
|
468 |
$('#view_application_level').html(response['data']['level']);
|
|
|
469 |
$('#modal-level').modal('hide');
|
|
|
470 |
|
|
|
471 |
|
|
|
472 |
} else {
|
|
|
473 |
validatorFile.resetForm();
|
|
|
474 |
if(jQuery.type(response['data']) == 'string') {
|
|
|
475 |
$.fn.showError(response['data']);
|
|
|
476 |
} else {
|
|
|
477 |
$.each(response['data'], function( fieldname, errors ) {
|
|
|
478 |
$.fn.showFormErrorValidator('#form-level #' + fieldname, errors);
|
|
|
479 |
});
|
|
|
480 |
}
|
|
|
481 |
}
|
|
|
482 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
483 |
$.fn.showError(textStatus);
|
|
|
484 |
}).always(function() {
|
|
|
485 |
NProgress.done();
|
|
|
486 |
|
|
|
487 |
});
|
|
|
488 |
return false;
|
|
|
489 |
|
|
|
490 |
},
|
|
|
491 |
invalidHandler: function(form, validator) {
|
|
|
492 |
|
|
|
493 |
return false;
|
|
|
494 |
}
|
|
|
495 |
});
|
|
|
496 |
|
|
|
497 |
var validatorComment = $('#form-comment').validate({
|
|
|
498 |
debug: true,
|
|
|
499 |
onclick: false,
|
|
|
500 |
onkeyup: false,
|
|
|
501 |
ignore: [],
|
|
|
502 |
rules: {
|
|
|
503 |
'points': {
|
|
|
504 |
required: true,
|
|
|
505 |
min: 0,
|
|
|
506 |
max: 100,
|
|
|
507 |
},
|
|
|
508 |
'comment': {
|
|
|
509 |
updateCkeditor:function() {
|
|
|
510 |
CKEDITOR.instances.comment.updateElement();
|
|
|
511 |
},
|
|
|
512 |
required: false,
|
|
|
513 |
},
|
|
|
514 |
|
|
|
515 |
},
|
|
|
516 |
submitHandler: function(form)
|
|
|
517 |
{
|
|
|
518 |
|
|
|
519 |
$.ajax({
|
|
|
520 |
'dataType' : 'json',
|
|
|
521 |
'accept' : 'application/json',
|
|
|
522 |
'method' : 'post',
|
|
|
523 |
'url' : $('#form-comment').attr('action'),
|
|
|
524 |
'data' : $('#form-comment').serialize(),
|
|
|
525 |
|
|
|
526 |
}).done(function(response) {
|
|
|
527 |
NProgress.start();
|
|
|
528 |
if(response['success']) {
|
|
|
529 |
$.fn.showSuccess(response['data']['message']);
|
|
|
530 |
|
|
|
531 |
|
|
|
532 |
$('#view_application_points').html(response['data']['points']);
|
|
|
533 |
$('#view_application_comment').html(response['data']['comment']);
|
|
|
534 |
|
|
|
535 |
$('#modal-comment').modal('hide');
|
|
|
536 |
|
|
|
537 |
|
|
|
538 |
} else {
|
|
|
539 |
validatorFile.resetForm();
|
|
|
540 |
if(jQuery.type(response['data']) == 'string') {
|
|
|
541 |
$.fn.showError(response['data']);
|
|
|
542 |
} else {
|
|
|
543 |
$.each(response['data'], function( fieldname, errors ) {
|
|
|
544 |
$.fn.showFormErrorValidator('#form-comment #' + fieldname, errors);
|
|
|
545 |
});
|
|
|
546 |
}
|
|
|
547 |
}
|
|
|
548 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
549 |
$.fn.showError(textStatus);
|
|
|
550 |
}).always(function() {
|
|
|
551 |
NProgress.done();
|
|
|
552 |
|
|
|
553 |
});
|
|
|
554 |
return false;
|
|
|
555 |
|
|
|
556 |
},
|
|
|
557 |
invalidHandler: function(form, validator) {
|
|
|
558 |
|
|
|
559 |
return false;
|
|
|
560 |
}
|
|
|
561 |
});
|
|
|
562 |
|
|
|
563 |
var validatorInterview = $('#form-interview').validate({
|
|
|
564 |
debug: true,
|
|
|
565 |
onclick: false,
|
|
|
566 |
onkeyup: false,
|
|
|
567 |
ignore: [],
|
|
|
568 |
rules: {
|
|
|
569 |
'user_id': {
|
|
|
570 |
required: true,
|
|
|
571 |
},
|
|
|
572 |
'type': {
|
|
|
573 |
required: true,
|
|
|
574 |
},
|
|
|
575 |
'last_date': {
|
|
|
576 |
required: true,
|
|
|
577 |
},
|
|
|
578 |
|
|
|
579 |
|
|
|
580 |
},
|
|
|
581 |
submitHandler: function(form)
|
|
|
582 |
{
|
|
|
583 |
|
|
|
584 |
$.ajax({
|
|
|
585 |
'dataType' : 'json',
|
|
|
586 |
'accept' : 'application/json',
|
|
|
587 |
'method' : 'post',
|
|
|
588 |
'url' : $('#form-interview').attr('action'),
|
|
|
589 |
'data' : $('#form-interview').serialize(),
|
|
|
590 |
|
|
|
591 |
}).done(function(response) {
|
|
|
592 |
NProgress.start();
|
|
|
593 |
if(response['success']) {
|
|
|
594 |
$.fn.showSuccess(response['data']['message']);
|
|
|
595 |
|
|
|
596 |
$('#interviewTable tbody').html(
|
|
|
597 |
$('#interviewTemplate').render( response['data']['interviews'] )
|
|
|
598 |
);
|
|
|
599 |
|
|
|
600 |
|
|
|
601 |
$('#modal-interview').modal('hide');
|
|
|
602 |
|
|
|
603 |
|
|
|
604 |
} else {
|
|
|
605 |
validatorInterview.resetForm();
|
|
|
606 |
if(jQuery.type(response['data']) == 'string') {
|
|
|
607 |
$.fn.showError(response['data']);
|
|
|
608 |
} else {
|
|
|
609 |
$.each(response['data'], function( fieldname, errors ) {
|
|
|
610 |
$.fn.showFormErrorValidator('#form-interview #' + fieldname, errors);
|
|
|
611 |
});
|
|
|
612 |
}
|
|
|
613 |
}
|
|
|
614 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
615 |
$.fn.showError(textStatus);
|
|
|
616 |
}).always(function() {
|
|
|
617 |
NProgress.done();
|
|
|
618 |
|
|
|
619 |
});
|
|
|
620 |
return false;
|
|
|
621 |
|
|
|
622 |
},
|
|
|
623 |
invalidHandler: function(form, validator) {
|
|
|
624 |
|
|
|
625 |
return false;
|
|
|
626 |
}
|
|
|
627 |
});
|
|
|
628 |
|
|
|
629 |
|
|
|
630 |
|
|
|
631 |
$('body').on('click', 'button.btn-refresh', function (e) {
|
|
|
632 |
e.preventDefault();
|
|
|
633 |
gridTable.api().ajax.reload(null, false);
|
|
|
634 |
|
|
|
635 |
});
|
|
|
636 |
|
|
|
637 |
|
|
|
638 |
|
|
|
639 |
|
|
|
640 |
|
|
|
641 |
$('body').on('click', 'button.btn-search-email', function(e) {
|
|
|
642 |
e.preventDefault();
|
|
|
643 |
NProgress.start();
|
|
|
644 |
|
|
|
645 |
|
|
|
646 |
$.ajax({
|
|
|
647 |
'dataType' : 'json',
|
|
|
648 |
'accept' : 'application/json',
|
|
|
649 |
'method' : 'get',
|
|
|
650 |
'url' : '$routeUserByEmail',
|
|
|
651 |
'data' : {
|
|
|
652 |
email: $('#form-add #email').val()
|
|
|
653 |
}
|
|
|
654 |
}).done(function(response) {
|
|
|
655 |
|
|
|
656 |
NProgress.done();
|
|
|
657 |
if(response['success']) {
|
|
|
658 |
|
|
|
659 |
$('#form-add #user_id').val(response['data']['uuid']);
|
|
|
660 |
$('#form-add #first_name').val(response['data']['first_name']);
|
|
|
661 |
$('#form-add #last_name').val(response['data']['last_name']);
|
|
|
662 |
|
|
|
663 |
|
|
|
664 |
} else {
|
|
|
665 |
$('#form-add #user_id').val('');
|
|
|
666 |
$('#form-add #first_name').val('');
|
|
|
667 |
$('#form-add #last_name').val('');
|
|
|
668 |
|
|
|
669 |
$.fn.showError(response['data']);
|
|
|
670 |
}
|
|
|
671 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
672 |
$.fn.showError(textStatus);
|
|
|
673 |
}).always(function() {
|
|
|
674 |
NProgress.done();
|
|
|
675 |
});
|
|
|
676 |
return false;
|
|
|
677 |
});
|
|
|
678 |
|
|
|
679 |
|
|
|
680 |
|
|
|
681 |
|
|
|
682 |
|
|
|
683 |
|
|
|
684 |
|
|
|
685 |
$('body').on('click', 'button.btn-add', function (e) {
|
|
|
686 |
e.preventDefault();
|
|
|
687 |
|
|
|
688 |
$('#form-add #user_id').val('');
|
|
|
689 |
$('#form-add #email').val('');
|
|
|
690 |
$('#form-add #first_name').val('');
|
|
|
691 |
$('#form-add #last_name').val('');
|
|
|
692 |
validatorAdd.resetForm();
|
|
|
693 |
|
|
|
694 |
$('#modal-add-application').modal('show');
|
|
|
695 |
|
|
|
696 |
|
|
|
697 |
|
|
|
698 |
|
|
|
699 |
|
|
|
700 |
});
|
|
|
701 |
|
|
|
702 |
$('body').on('click', 'button.btn-cancel-modal-interview', function(e) {
|
|
|
703 |
e.preventDefault();
|
|
|
704 |
|
|
|
705 |
|
|
|
706 |
$('#modal-interview').modal('hide');
|
|
|
707 |
|
|
|
708 |
});
|
|
|
709 |
|
|
|
710 |
|
|
|
711 |
$('body').on('click', 'button.btn-cancel-modal-application', function(e) {
|
|
|
712 |
e.preventDefault();
|
|
|
713 |
|
|
|
714 |
|
|
|
715 |
$('#modal-add-application').modal('hide');
|
|
|
716 |
|
|
|
717 |
});
|
|
|
718 |
|
|
|
719 |
|
|
|
720 |
$('body').on('click', 'button.btn-close-application', function(e) {
|
|
|
721 |
e.preventDefault();
|
|
|
722 |
|
|
|
723 |
$('#row-view').hide();
|
|
|
724 |
$('#row-list').show();
|
|
|
725 |
});
|
|
|
726 |
|
|
|
727 |
$('body').on('click', 'button.btn-view', function(e) {
|
|
|
728 |
e.preventDefault();
|
|
|
729 |
NProgress.start();
|
|
|
730 |
|
|
|
731 |
|
|
|
732 |
$.ajax({
|
|
|
733 |
'dataType' : 'json',
|
|
|
734 |
'accept' : 'application/json',
|
|
|
735 |
'method' : 'get',
|
|
|
736 |
'url' : $(this).data('href'),
|
|
|
737 |
}).done(function(response) {
|
|
|
738 |
NProgress.done();
|
|
|
739 |
|
|
|
740 |
$('#row-list').hide();
|
|
|
741 |
|
|
|
742 |
$('#view_title_name').html(response['data']['vacancy']['name']);
|
|
|
743 |
$('#view_title_last_date').html(response['data']['vacancy']['last_date']);
|
|
|
744 |
|
|
|
745 |
|
|
|
746 |
$('#view_vacancy_name').html(response['data']['vacancy']['name']);
|
|
|
747 |
$('#view_vacancy_last_date').html(response['data']['vacancy']['last_date']);
|
|
|
748 |
$('#view_vacancy_job_description').html(response['data']['vacancy']['job_description']);
|
|
|
749 |
$('#view_vacancy_industry').html(response['data']['vacancy']['industry']);
|
|
|
750 |
$('#view_vacancy_job_category').html(response['data']['vacancy']['job_category']);
|
|
|
751 |
|
|
|
752 |
$('#view_candidate_first_name').html(response['data']['application']['first_name']);
|
|
|
753 |
$('#view_candidate_last_name').html(response['data']['application']['last_name']);
|
|
|
754 |
$('#view_vacancy_email').html(response['data']['application']['email']);
|
|
|
755 |
|
|
|
756 |
$('#view_application_level').html(response['data']['application']['level']);
|
|
|
757 |
$('#view_application_status').html(response['data']['application']['status']);
|
|
|
758 |
$('#view_application_points').html(response['data']['application']['points']);
|
|
|
759 |
$('#view_application_comment').html(response['data']['application']['comment']);
|
|
|
760 |
|
|
|
761 |
|
|
|
762 |
$('#form-level').attr('action', response['data']['link_level']);
|
|
|
763 |
$('#form-status').attr('action', response['data']['link_status']);
|
|
|
764 |
$('#form-comment').attr('action', response['data']['link_comment']);
|
|
|
765 |
|
|
|
766 |
|
|
|
767 |
$('#form-file').attr('action', response['data']['link_files_add']);
|
|
|
768 |
$('#fileTable').data('route', response['data']['link_files']);
|
|
|
769 |
|
|
|
770 |
|
|
|
771 |
$('#form-interview').attr('action', response['data']['link_interviews_add']);
|
|
|
772 |
$('#interviewTable').data('route', response['data']['link_interviews']);
|
|
|
773 |
|
|
|
774 |
|
|
|
775 |
$('#fileTable tbody').html(
|
|
|
776 |
$('#fileTemplate').render( response['data']['files'] )
|
|
|
777 |
);
|
|
|
778 |
|
|
|
779 |
$('#interviewTable tbody').html(
|
|
|
780 |
$('#interviewTemplate').render( response['data']['interviews'] )
|
|
|
781 |
);
|
|
|
782 |
|
|
|
783 |
|
|
|
784 |
|
|
|
785 |
$('#row-view').show();
|
|
|
786 |
|
|
|
787 |
|
|
|
788 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
789 |
$.fn.showError(textStatus);
|
|
|
790 |
}).always(function() {
|
|
|
791 |
NProgress.done();
|
|
|
792 |
});
|
|
|
793 |
return false;
|
|
|
794 |
});
|
|
|
795 |
|
|
|
796 |
$('body').on('click', 'button.btn-delete-file', function(e) {
|
|
|
797 |
e.preventDefault();
|
|
|
798 |
var action = $(this).data('href');
|
|
|
799 |
|
|
|
800 |
$.ajax({
|
|
|
801 |
'dataType': 'json',
|
|
|
802 |
'accept': 'application/json',
|
|
|
803 |
'method': 'post',
|
|
|
804 |
'url': action,
|
|
|
805 |
}).done(function(response) {
|
|
|
806 |
if (response['success']) {
|
|
|
807 |
$.fn.showSuccess(response['data']['message']);
|
|
|
808 |
$('#fileTable tbody').html(
|
|
|
809 |
$('#fileTemplate').render( response['data']['files'] )
|
|
|
810 |
);
|
|
|
811 |
} else {
|
|
|
812 |
$.fn.showError(response['data']);
|
|
|
813 |
}
|
|
|
814 |
}).fail(function(jqXHR, textStatus, errorThrown) {
|
|
|
815 |
$.fn.showError(textStatus);
|
|
|
816 |
}).always(function() {
|
|
|
817 |
NProgress.done();
|
|
|
818 |
});
|
|
|
819 |
|
|
|
820 |
});
|
|
|
821 |
|
|
|
822 |
|
|
|
823 |
$('body').on('click', 'button.btn-delete-interview', function(e) {
|
|
|
824 |
e.preventDefault();
|
|
|
825 |
var action = $(this).data('href');
|
|
|
826 |
|
|
|
827 |
$.ajax({
|
|
|
828 |
'dataType': 'json',
|
|
|
829 |
'accept': 'application/json',
|
|
|
830 |
'method': 'post',
|
|
|
831 |
'url': action,
|
|
|
832 |
}).done(function(response) {
|
|
|
833 |
if (response['success']) {
|
|
|
834 |
$.fn.showSuccess(response['data']['message']);
|
|
|
835 |
$('#interviewTable tbody').html(
|
15462 |
efrain |
836 |
$('#interviewTemplate').render( response['data']['interviews'] )
|
15461 |
efrain |
837 |
);
|
|
|
838 |
} else {
|
|
|
839 |
$.fn.showError(response['data']);
|
|
|
840 |
}
|
|
|
841 |
}).fail(function(jqXHR, textStatus, errorThrown) {
|
|
|
842 |
$.fn.showError(textStatus);
|
|
|
843 |
}).always(function() {
|
|
|
844 |
NProgress.done();
|
|
|
845 |
});
|
|
|
846 |
|
|
|
847 |
});
|
|
|
848 |
|
|
|
849 |
$('body').on('click', 'button.btn-edit-interview', function(e) {
|
|
|
850 |
e.preventDefault();
|
|
|
851 |
var action = $(this).data('href');
|
|
|
852 |
|
|
|
853 |
$.ajax({
|
|
|
854 |
'dataType': 'json',
|
|
|
855 |
'accept': 'application/json',
|
|
|
856 |
'method': 'get',
|
|
|
857 |
'url': action,
|
|
|
858 |
}).done(function(response) {
|
|
|
859 |
if (response['success']) {
|
|
|
860 |
|
|
|
861 |
$('#form-interview').attr('action',action);
|
|
|
862 |
$('#form-interview #user_id').val(response['data']['user_id']).trigger('change');
|
|
|
863 |
$('#form-interview #type').val(response['data']['type']).trigger('change');
|
|
|
864 |
$('#form-interview #last_date').val(response['data']['last_date']);
|
|
|
865 |
|
|
|
866 |
$('#modal-interview').modal('show');
|
|
|
867 |
|
|
|
868 |
|
|
|
869 |
} else {
|
|
|
870 |
$.fn.showError(response['data']);
|
|
|
871 |
}
|
|
|
872 |
}).fail(function(jqXHR, textStatus, errorThrown) {
|
|
|
873 |
$.fn.showError(textStatus);
|
|
|
874 |
}).always(function() {
|
|
|
875 |
NProgress.done();
|
|
|
876 |
});
|
|
|
877 |
|
|
|
878 |
});
|
|
|
879 |
|
|
|
880 |
|
|
|
881 |
$('body').on('click', 'button.btn-add-interview', function(e) {
|
|
|
882 |
e.preventDefault();
|
|
|
883 |
var action = $(this).data('href');
|
|
|
884 |
|
|
|
885 |
$('#form-interview').attr('action',action);
|
|
|
886 |
$('#form-interview #user_id').val('').trigger('change');
|
|
|
887 |
$('#form-interview #type').val('').trigger('change');
|
|
|
888 |
$('#form-interview #last_date').val('');
|
|
|
889 |
$('#modal-interview').modal('show');
|
|
|
890 |
|
|
|
891 |
|
|
|
892 |
});
|
|
|
893 |
|
|
|
894 |
|
|
|
895 |
|
|
|
896 |
$('body').on('click', 'button.btn-change-level', function(e) {
|
|
|
897 |
e.preventDefault();
|
|
|
898 |
var action = $('#form-level').attr('action');
|
|
|
899 |
|
|
|
900 |
$.ajax({
|
|
|
901 |
'dataType': 'json',
|
|
|
902 |
'accept': 'application/json',
|
|
|
903 |
'method': 'get',
|
|
|
904 |
'url': action,
|
|
|
905 |
}).done(function(response) {
|
|
|
906 |
if (response['success']) {
|
|
|
907 |
|
|
|
908 |
$('#form-level #level').val(response['data']['level']).trigger('change');
|
|
|
909 |
$('#modal-level').modal('show');
|
|
|
910 |
|
|
|
911 |
|
|
|
912 |
} else {
|
|
|
913 |
$.fn.showError(response['data']);
|
|
|
914 |
}
|
|
|
915 |
}).fail(function(jqXHR, textStatus, errorThrown) {
|
|
|
916 |
$.fn.showError(textStatus);
|
|
|
917 |
}).always(function() {
|
|
|
918 |
NProgress.done();
|
|
|
919 |
});
|
|
|
920 |
|
|
|
921 |
});
|
|
|
922 |
|
|
|
923 |
|
|
|
924 |
$('body').on('click', 'button.btn-change-status', function(e) {
|
|
|
925 |
e.preventDefault();
|
|
|
926 |
var action = $('#form-status').attr('action');
|
|
|
927 |
|
|
|
928 |
$.ajax({
|
|
|
929 |
'dataType': 'json',
|
|
|
930 |
'accept': 'application/json',
|
|
|
931 |
'method': 'get',
|
|
|
932 |
'url': action,
|
|
|
933 |
}).done(function(response) {
|
|
|
934 |
if (response['success']) {
|
|
|
935 |
|
|
|
936 |
$('#form-status #status').val(response['data']['status']).trigger('change');
|
|
|
937 |
$('#modal-status').modal('show');
|
|
|
938 |
|
|
|
939 |
|
|
|
940 |
} else {
|
|
|
941 |
$.fn.showError(response['data']);
|
|
|
942 |
}
|
|
|
943 |
}).fail(function(jqXHR, textStatus, errorThrown) {
|
|
|
944 |
$.fn.showError(textStatus);
|
|
|
945 |
}).always(function() {
|
|
|
946 |
NProgress.done();
|
|
|
947 |
});
|
|
|
948 |
|
|
|
949 |
});
|
|
|
950 |
|
|
|
951 |
|
|
|
952 |
$('body').on('click', 'button.btn-change-comment', function(e) {
|
|
|
953 |
e.preventDefault();
|
|
|
954 |
var action = $('#form-comment').attr('action');
|
|
|
955 |
|
|
|
956 |
$.ajax({
|
|
|
957 |
'dataType': 'json',
|
|
|
958 |
'accept': 'application/json',
|
|
|
959 |
'method': 'get',
|
|
|
960 |
'url': action,
|
|
|
961 |
}).done(function(response) {
|
|
|
962 |
if (response['success']) {
|
|
|
963 |
|
|
|
964 |
|
|
|
965 |
CKEDITOR.instances.comment.setData(response['data']['comment']);
|
|
|
966 |
$('#form-comment #points').val(response['data']['points']);
|
|
|
967 |
$('#modal-comment').modal('show');
|
|
|
968 |
|
|
|
969 |
|
|
|
970 |
} else {
|
|
|
971 |
$.fn.showError(response['data']);
|
|
|
972 |
}
|
|
|
973 |
}).fail(function(jqXHR, textStatus, errorThrown) {
|
|
|
974 |
$.fn.showError(textStatus);
|
|
|
975 |
}).always(function() {
|
|
|
976 |
NProgress.done();
|
|
|
977 |
});
|
|
|
978 |
|
|
|
979 |
});
|
|
|
980 |
|
|
|
981 |
|
|
|
982 |
$('#form-file #file').fileinput({
|
|
|
983 |
theme: 'fa',
|
|
|
984 |
language: 'es',
|
|
|
985 |
showUpload: false,
|
|
|
986 |
dropZoneEnabled: false,
|
|
|
987 |
maxFileCount: 1,
|
|
|
988 |
allowedFileExtensions: ['pdf','doc','docx'],
|
|
|
989 |
msgPlaceholder: '',
|
|
|
990 |
});
|
|
|
991 |
|
|
|
992 |
|
|
|
993 |
$('body').on('click', 'button.btn-add-file', function(e) {
|
|
|
994 |
e.preventDefault();
|
|
|
995 |
|
|
|
996 |
|
|
|
997 |
$('#form-file #name').val('');
|
|
|
998 |
$('#form-file #file').fileinput('reset');
|
|
|
999 |
$('#form-file #file').val('');
|
|
|
1000 |
|
|
|
1001 |
|
|
|
1002 |
validatorFile.resetForm();
|
|
|
1003 |
$('#modal-add-file').modal('show');
|
|
|
1004 |
});
|
|
|
1005 |
|
|
|
1006 |
$('body').on('click', 'button.btn-cancel-modal-file', function(e) {
|
|
|
1007 |
e.preventDefault();
|
|
|
1008 |
|
|
|
1009 |
|
|
|
1010 |
$('#modal-add-file').modal('hide');
|
|
|
1011 |
});
|
|
|
1012 |
|
|
|
1013 |
$('body').on('click', 'button.btn-cancel-modal-comment', function(e) {
|
|
|
1014 |
e.preventDefault();
|
|
|
1015 |
|
|
|
1016 |
|
|
|
1017 |
$('#modal-comment').modal('hide');
|
|
|
1018 |
});
|
|
|
1019 |
|
|
|
1020 |
$('body').on('click', 'button.btn-cancel-modal-level', function(e) {
|
|
|
1021 |
e.preventDefault();
|
|
|
1022 |
|
|
|
1023 |
|
|
|
1024 |
$('#modal-level').modal('hide');
|
|
|
1025 |
});
|
|
|
1026 |
|
|
|
1027 |
$('body').on('click', 'button.btn-cancel-modal-status', function(e) {
|
|
|
1028 |
e.preventDefault();
|
|
|
1029 |
|
|
|
1030 |
|
|
|
1031 |
$('#modal-status').modal('hide');
|
|
|
1032 |
});
|
|
|
1033 |
|
15464 |
efrain |
1034 |
$('body').on('click', 'button.btn-view-file', function(e) {
|
|
|
1035 |
e.preventDefault();
|
|
|
1036 |
var action = $(this).data('href');
|
15461 |
efrain |
1037 |
|
15464 |
efrain |
1038 |
|
|
|
1039 |
NProgress.start();
|
|
|
1040 |
$.ajax({
|
|
|
1041 |
'dataType' : 'json',
|
|
|
1042 |
'method' : 'get',
|
|
|
1043 |
'url' : action,
|
|
|
1044 |
}).done(function(response) {
|
|
|
1045 |
if(response['success']) {
|
|
|
1046 |
var anchor = window.document.createElement("a");
|
|
|
1047 |
anchor.href = 'data:application/octet-stream;charset=utf-8;base64,' + response['data']['content'] ;
|
|
|
1048 |
anchor.download = response['data']['basename'];
|
|
|
1049 |
document.body.appendChild(anchor);
|
|
|
1050 |
anchor.click(); // IE: "Access is denied"; see: https://connect.microsoft.com/IE/feedback/details/797361/ie-10-treats-blob-url-as-cross-origin-and-denies-access
|
|
|
1051 |
document.body.removeChild(anchor);
|
|
|
1052 |
} else {
|
|
|
1053 |
$.fn.showError(response['data']);
|
|
|
1054 |
}
|
|
|
1055 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
1056 |
$.fn.showError(textStatus);
|
|
|
1057 |
}).always(function() {
|
|
|
1058 |
NProgress.done();
|
|
|
1059 |
});
|
|
|
1060 |
});
|
|
|
1061 |
|
15461 |
efrain |
1062 |
|
|
|
1063 |
$('body').on('click', 'button.btn-report-interview', function(e) {
|
|
|
1064 |
e.preventDefault();
|
|
|
1065 |
var action = $(this).data('href');
|
|
|
1066 |
|
|
|
1067 |
|
|
|
1068 |
NProgress.start();
|
|
|
1069 |
$.ajax({
|
|
|
1070 |
'dataType' : 'json',
|
|
|
1071 |
'method' : 'get',
|
|
|
1072 |
'url' : action,
|
|
|
1073 |
}).done(function(response) {
|
|
|
1074 |
if(response['success']) {
|
|
|
1075 |
var anchor = window.document.createElement("a");
|
|
|
1076 |
anchor.href = 'data:application/octet-stream;charset=utf-8;base64,' + response['data']['content'] ;
|
|
|
1077 |
anchor.download = response['data']['basename'];
|
|
|
1078 |
document.body.appendChild(anchor);
|
|
|
1079 |
anchor.click(); // IE: "Access is denied"; see: https://connect.microsoft.com/IE/feedback/details/797361/ie-10-treats-blob-url-as-cross-origin-and-denies-access
|
|
|
1080 |
document.body.removeChild(anchor);
|
|
|
1081 |
} else {
|
|
|
1082 |
$.fn.showError(response['data']);
|
|
|
1083 |
}
|
|
|
1084 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
1085 |
$.fn.showError(textStatus);
|
|
|
1086 |
}).always(function() {
|
|
|
1087 |
NProgress.done();
|
|
|
1088 |
});
|
|
|
1089 |
});
|
|
|
1090 |
|
|
|
1091 |
$('#form-level #level').select2({
|
|
|
1092 |
theme: 'bootstrap4',
|
|
|
1093 |
width: '100%',
|
|
|
1094 |
});
|
|
|
1095 |
|
|
|
1096 |
$('#form-status #status').select2({
|
|
|
1097 |
theme: 'bootstrap4',
|
|
|
1098 |
width: '100%',
|
|
|
1099 |
});
|
|
|
1100 |
|
|
|
1101 |
|
|
|
1102 |
$('#form-interview #type').select2({
|
|
|
1103 |
theme: 'bootstrap4',
|
|
|
1104 |
width: '100%',
|
|
|
1105 |
});
|
|
|
1106 |
|
|
|
1107 |
|
|
|
1108 |
$('#form-interview #user_id').select2({
|
|
|
1109 |
theme: 'bootstrap4',
|
|
|
1110 |
width: '100%',
|
|
|
1111 |
});
|
|
|
1112 |
|
|
|
1113 |
$('#form-interview #last_date').datetimepicker({
|
|
|
1114 |
locale: 'es',
|
|
|
1115 |
format: 'DD/MM/YYYY'
|
|
|
1116 |
});
|
|
|
1117 |
|
|
|
1118 |
|
|
|
1119 |
|
|
|
1120 |
$('#form-comment #points').inputNumberFormat({decimal: 0});
|
|
|
1121 |
|
|
|
1122 |
|
|
|
1123 |
CKEDITOR.replace('comment');
|
|
|
1124 |
|
|
|
1125 |
|
|
|
1126 |
});
|
|
|
1127 |
JS;
|
|
|
1128 |
|
|
|
1129 |
$this->inlineScript()->captureEnd();
|
|
|
1130 |
|
|
|
1131 |
?>
|
|
|
1132 |
<!-- Content Header (Page header) -->
|
|
|
1133 |
|
|
|
1134 |
|
|
|
1135 |
<section class="content-header">
|
|
|
1136 |
<div class="container-fluid">
|
|
|
1137 |
<div class="row mb-2">
|
|
|
1138 |
<div class="col-sm-12">
|
|
|
1139 |
<h1 id="section-title">LABEL_APPLICATIONS</h1>
|
|
|
1140 |
</div>
|
|
|
1141 |
</div>
|
|
|
1142 |
</div>
|
|
|
1143 |
<!-- /.container-fluid -->
|
|
|
1144 |
</section>
|
|
|
1145 |
<section class="content">
|
|
|
1146 |
<div class="container-fluid">
|
|
|
1147 |
<div class="row" id="row-view" style="display: none">
|
|
|
1148 |
|
|
|
1149 |
<div class="col-12">
|
|
|
1150 |
|
|
|
1151 |
<!-- Main content -->
|
|
|
1152 |
<div class="invoice p-3 mb-3">
|
|
|
1153 |
<!-- title row -->
|
|
|
1154 |
<div class="row">
|
|
|
1155 |
<div class="col-12">
|
|
|
1156 |
<h4>
|
|
|
1157 |
<span id="view_title_name"></span>
|
|
|
1158 |
<small class="float-right">LABEL_LAST_DATE: <span id="view_title_last_date"></span></small>
|
|
|
1159 |
</h4>
|
|
|
1160 |
</div>
|
|
|
1161 |
<!-- /.col -->
|
|
|
1162 |
</div>
|
|
|
1163 |
<!-- info row -->
|
|
|
1164 |
<div class="row invoice-info">
|
|
|
1165 |
<div class="col-sm-6 invoice-col">
|
|
|
1166 |
<strong>LABEL_VACANCY</strong>
|
|
|
1167 |
<address>
|
|
|
1168 |
<span id="view_vacancy_name"></span><br>
|
|
|
1169 |
LABEL_LAST_DATE : <span id="view_vacancy_last_date"></span><br>
|
|
|
1170 |
LABEL_JOB_DESCRIPTION : <span id="view_vacancy_job_description"></span><br>
|
|
|
1171 |
LABEL_INDUSTRY : <span id="view_vacancy_industry"></span><br>
|
|
|
1172 |
LABEL_JOB_CATEGORY : <span id="view_vacancy_job_category"></span>
|
|
|
1173 |
</address>
|
|
|
1174 |
</div>
|
|
|
1175 |
<!-- /.col -->
|
|
|
1176 |
<div class="col-sm-3 invoice-col">
|
|
|
1177 |
<strong>LABEL_CANDIDATE</strong>
|
|
|
1178 |
<address>
|
|
|
1179 |
LABEL_FIRST_NAME : <strong id="view_candidate_first_name"></strong><br>
|
|
|
1180 |
LABEL_LAST_NAME : <strong id="view_candidate_last_name"></strong><br>
|
|
|
1181 |
LABEL_EMAIL : <span id="view_vacancy_email"></span><br>
|
|
|
1182 |
</address>
|
|
|
1183 |
</div>
|
|
|
1184 |
<!-- /.col -->
|
|
|
1185 |
<div class="col-sm-3 invoice-col">
|
|
|
1186 |
<strong> LABEL_APPLICATION</strong><br>
|
|
|
1187 |
<address>
|
|
|
1188 |
LABEL_LEVEL : <span id="view_application_level"></span>
|
|
|
1189 |
<?php if($allowLevel) : ?>
|
|
|
1190 |
<button class="btn btn-default btn-change-level"><i class="fa fa-external-link"></i></button>
|
|
|
1191 |
<?php endif; ?>
|
|
|
1192 |
<br>
|
|
|
1193 |
LABEL_STATUS : <span id="view_application_status"></span>
|
|
|
1194 |
<?php if($allowStatus) : ?>
|
|
|
1195 |
<button class="btn btn-default btn-change-status"><i class="fa fa-external-link"></i></button>
|
|
|
1196 |
<?php endif; ?>
|
|
|
1197 |
<br>
|
|
|
1198 |
LABEL_POINTS : <span id="view_application_points"></span>
|
|
|
1199 |
<?php if($allowComment) : ?>
|
|
|
1200 |
<button class="btn btn-default btn-change-comment"><i class="fa fa-external-link"></i></button>
|
|
|
1201 |
<?php endif; ?>
|
|
|
1202 |
<br>
|
|
|
1203 |
</address>
|
|
|
1204 |
</div>
|
|
|
1205 |
<!-- /.col -->
|
|
|
1206 |
</div>
|
|
|
1207 |
<div class="row invoice-info" >
|
|
|
1208 |
<div class="col-sm-12 invoice-col" >
|
|
|
1209 |
<strong>LABEL_COMMENT</strong><br/>
|
|
|
1210 |
<div id="view_application_comment">
|
|
|
1211 |
</div>
|
|
|
1212 |
</div>
|
|
|
1213 |
</div>
|
|
|
1214 |
<!-- /.row -->
|
|
|
1215 |
|
|
|
1216 |
<!-- Table row -->
|
|
|
1217 |
<div class="row">
|
|
|
1218 |
<div class="col-12 table-responsive">
|
|
|
1219 |
<table class="table table-striped" id="fileTable">
|
|
|
1220 |
<thead>
|
|
|
1221 |
<tr>
|
|
|
1222 |
<th>LABEL_NAME</th>
|
|
|
1223 |
<th>LABEL_FILE</th>
|
|
|
1224 |
<th>LABEL_ACTIONS</th>
|
|
|
1225 |
</tr>
|
|
|
1226 |
</thead>
|
|
|
1227 |
<tbody>
|
|
|
1228 |
|
|
|
1229 |
</tbody>
|
|
|
1230 |
|
|
|
1231 |
<tfoot>
|
|
|
1232 |
<tr>
|
|
|
1233 |
<td colspan="3" class="text-right">
|
|
|
1234 |
<?php if($allowFileAdd) : ?>
|
|
|
1235 |
<button type="button" class="btn btn-primary btn-add-file"><i class="fa fa-plus"></i> LABEL_ADD </button>
|
|
|
1236 |
<?php endif; ?>
|
|
|
1237 |
</td>
|
|
|
1238 |
</tr>
|
|
|
1239 |
</tfoot>
|
|
|
1240 |
|
|
|
1241 |
</table>
|
|
|
1242 |
</div>
|
|
|
1243 |
<!-- /.col -->
|
|
|
1244 |
</div>
|
|
|
1245 |
<!-- /.row -->
|
|
|
1246 |
|
|
|
1247 |
|
|
|
1248 |
<!-- Table row -->
|
|
|
1249 |
<div class="row">
|
|
|
1250 |
<div class="col-12 table-responsive">
|
|
|
1251 |
<table class="table table-striped" id="interviewTable">
|
|
|
1252 |
<thead>
|
|
|
1253 |
<tr>
|
|
|
1254 |
<th>LABEL_TYPE</th>
|
|
|
1255 |
<th>LABEL_LAST_DATE</th>
|
|
|
1256 |
<th>LABEL_INTERVIEWED_BY</th>
|
|
|
1257 |
<th>LABEL_STATUS</th>
|
|
|
1258 |
<th>LABEL_ACTIONS</th>
|
|
|
1259 |
</tr>
|
|
|
1260 |
</thead>
|
|
|
1261 |
<tbody>
|
|
|
1262 |
|
|
|
1263 |
</tbody>
|
|
|
1264 |
|
|
|
1265 |
<tfoot>
|
|
|
1266 |
<tr>
|
|
|
1267 |
<td colspan="5" class="text-right">
|
|
|
1268 |
<?php if($allowInterviewAdd) : ?>
|
|
|
1269 |
<button type="button" class="btn btn-primary btn-add-interview"><i class="fa fa-plus"></i> LABEL_ADD </button>
|
|
|
1270 |
<?php endif; ?>
|
|
|
1271 |
</td>
|
|
|
1272 |
</tr>
|
|
|
1273 |
</tfoot>
|
|
|
1274 |
|
|
|
1275 |
</table>
|
|
|
1276 |
</div>
|
|
|
1277 |
<!-- /.col -->
|
|
|
1278 |
</div>
|
|
|
1279 |
<!-- /.row -->
|
|
|
1280 |
|
|
|
1281 |
|
|
|
1282 |
|
|
|
1283 |
<!-- this row will not appear when printing -->
|
|
|
1284 |
<div class="row no-print">
|
|
|
1285 |
<div class="col-12"">
|
|
|
1286 |
<button type="button" class="btn btn-default btn-close-application"><i class="far fa-time"></i> LABEL_CLOSE </button>
|
|
|
1287 |
</div>
|
|
|
1288 |
</div>
|
|
|
1289 |
</div>
|
|
|
1290 |
<!-- /.invoice -->
|
|
|
1291 |
</div><!-- /.col -->
|
|
|
1292 |
|
|
|
1293 |
|
|
|
1294 |
|
|
|
1295 |
</div>
|
|
|
1296 |
|
|
|
1297 |
|
|
|
1298 |
<div class="row" id="row-list">
|
|
|
1299 |
<div class="col-12">
|
|
|
1300 |
<div class="card">
|
|
|
1301 |
<div class="card-header">
|
|
|
1302 |
<?php
|
|
|
1303 |
$form = $this->formFilter;
|
|
|
1304 |
$form->setAttributes([
|
|
|
1305 |
'method' => 'post',
|
|
|
1306 |
'name' => 'form-filter',
|
|
|
1307 |
'id' => 'form-filter'
|
|
|
1308 |
]);
|
|
|
1309 |
|
|
|
1310 |
$form->prepare();
|
|
|
1311 |
echo $this->form()->openTag($form);
|
|
|
1312 |
|
|
|
1313 |
|
|
|
1314 |
$element = $form->get('vacancy_id');
|
|
|
1315 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
1316 |
$element->setOptions(['label' => 'LABEL_VACANCY']);
|
|
|
1317 |
?>
|
|
|
1318 |
<table class="table">
|
|
|
1319 |
<tbody>
|
|
|
1320 |
<tr>
|
|
|
1321 |
<td>
|
|
|
1322 |
<?php echo $this->formLabel($element); ?>
|
|
|
1323 |
</td>
|
|
|
1324 |
<td>
|
|
|
1325 |
<?php echo $this->formSelect($element); ?>
|
|
|
1326 |
</td>
|
|
|
1327 |
</tr>
|
|
|
1328 |
</tbody>
|
|
|
1329 |
</table>
|
|
|
1330 |
<?php echo $this->form()->closeTag($form); ?>
|
|
|
1331 |
</div>
|
|
|
1332 |
<div class="card-body">
|
|
|
1333 |
<table id="gridTable" class="table table-hover">
|
|
|
1334 |
<thead>
|
|
|
1335 |
<tr>
|
|
|
1336 |
<th>LABEL_FIRST_NAME</th>
|
|
|
1337 |
<th>LABEL_LAST_NAME</th>
|
|
|
1338 |
<th>LABEL_EMAIL</th>
|
|
|
1339 |
<th>LABEL_STATUS</th>
|
|
|
1340 |
<th>LABEL_LEVEL</th>
|
|
|
1341 |
<th>LABEL_ACTIONS</th>
|
|
|
1342 |
</tr>
|
|
|
1343 |
</thead>
|
|
|
1344 |
<tbody>
|
|
|
1345 |
</tbody>
|
|
|
1346 |
</table>
|
|
|
1347 |
</div>
|
|
|
1348 |
<div class="card-footer clearfix">
|
|
|
1349 |
<div style="float:right;">
|
|
|
1350 |
<button type="button" class="btn btn-info btn-refresh"><i class="fa fa-refresh"></i> LABEL_REFRESH </button>
|
|
|
1351 |
<?php if ($allowAdd) : ?>
|
|
|
1352 |
<button type="button" class="btn btn-primary btn-add"><i class="fa fa-plus"></i> LABEL_ADD </button>
|
|
|
1353 |
<?php endif; ?>
|
|
|
1354 |
</div>
|
|
|
1355 |
</div>
|
|
|
1356 |
</div>
|
|
|
1357 |
</div>
|
|
|
1358 |
</div>
|
|
|
1359 |
</div>
|
|
|
1360 |
|
|
|
1361 |
|
|
|
1362 |
|
|
|
1363 |
|
|
|
1364 |
|
|
|
1365 |
|
|
|
1366 |
|
|
|
1367 |
|
|
|
1368 |
|
|
|
1369 |
|
|
|
1370 |
|
|
|
1371 |
<!-- The Modal -->
|
|
|
1372 |
<div class="modal" id="modal-add-application">
|
|
|
1373 |
<div class="modal-dialog modal-xl">
|
|
|
1374 |
<div class="modal-content">
|
|
|
1375 |
|
|
|
1376 |
<!-- Modal Header -->
|
|
|
1377 |
<div class="modal-header">
|
|
|
1378 |
<h4>LABEL_ADD_APPLICATION</h4>
|
|
|
1379 |
</div>
|
|
|
1380 |
|
|
|
1381 |
<!-- Modal body -->
|
|
|
1382 |
<div class="modal-body">
|
|
|
1383 |
<?php
|
|
|
1384 |
$form = $this->formAdd;
|
|
|
1385 |
$form->setAttributes([
|
|
|
1386 |
'method' => 'post',
|
|
|
1387 |
'name' => 'form-add',
|
|
|
1388 |
'id' => 'form-add'
|
|
|
1389 |
]);
|
|
|
1390 |
|
|
|
1391 |
$form->prepare();
|
|
|
1392 |
echo $this->form()->openTag($form);
|
|
|
1393 |
|
|
|
1394 |
$element = $form->get('user_id');
|
|
|
1395 |
echo $this->formHidden($element);
|
|
|
1396 |
|
|
|
1397 |
?>
|
|
|
1398 |
<div class="form-group">
|
|
|
1399 |
|
|
|
1400 |
<?php
|
|
|
1401 |
$element = $form->get('email');
|
|
|
1402 |
$element->setOptions(['label' => 'LABEL_EMAIL']);
|
|
|
1403 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
1404 |
|
|
|
1405 |
echo $this->formLabel($element);
|
|
|
1406 |
?>
|
|
|
1407 |
<?php if($allowUserByEmail) : ?>
|
|
|
1408 |
<div class="input-group-append">
|
|
|
1409 |
<?php endif; ?>
|
|
|
1410 |
<?php
|
|
|
1411 |
echo $this->formText($element);
|
|
|
1412 |
?>
|
|
|
1413 |
<?php if($allowUserByEmail) : ?>
|
|
|
1414 |
<button class="input-group-text btn-search-email" style="margin-left: 5px">
|
|
|
1415 |
<i class="fa fa-search" aria-hidden="true"></i>
|
|
|
1416 |
</button>
|
|
|
1417 |
<?php endif; ?>
|
|
|
1418 |
</div>
|
|
|
1419 |
</div>
|
|
|
1420 |
<div class="form-group">
|
|
|
1421 |
<?php
|
|
|
1422 |
$element = $form->get('first_name');
|
|
|
1423 |
$element->setOptions(['label' => 'LABEL_FIRST_NAME']);
|
|
|
1424 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
1425 |
|
|
|
1426 |
echo $this->formLabel($element);
|
|
|
1427 |
echo $this->formText($element);
|
|
|
1428 |
?>
|
|
|
1429 |
</div>
|
|
|
1430 |
<div class="form-group">
|
|
|
1431 |
<?php
|
|
|
1432 |
$element = $form->get('last_name');
|
|
|
1433 |
$element->setOptions(['label' => 'LABEL_LAST_NAME']);
|
|
|
1434 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
1435 |
|
|
|
1436 |
echo $this->formLabel($element);
|
|
|
1437 |
echo $this->formText($element);
|
|
|
1438 |
?>
|
|
|
1439 |
</div>
|
|
|
1440 |
|
|
|
1441 |
<div class="text-right">
|
|
|
1442 |
<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
|
|
|
1443 |
<button type="button" class="btn btn-light btn-cancel-modal-application">LABEL_CANCEL</button>
|
|
|
1444 |
</div>
|
|
|
1445 |
<?php echo $this->form()->closeTag($form); ?>
|
|
|
1446 |
</div>
|
|
|
1447 |
|
|
|
1448 |
|
|
|
1449 |
</div>
|
|
|
1450 |
</div>
|
|
|
1451 |
</div>
|
|
|
1452 |
|
|
|
1453 |
|
|
|
1454 |
<!-- The Modal -->
|
|
|
1455 |
<div class="modal" id="modal-add-file">
|
|
|
1456 |
<div class="modal-dialog modal-xl">
|
|
|
1457 |
<div class="modal-content">
|
|
|
1458 |
|
|
|
1459 |
<!-- Modal Header -->
|
|
|
1460 |
<div class="modal-header">
|
|
|
1461 |
<h4>LABEL_ADD_FILE</h4>
|
|
|
1462 |
</div>
|
|
|
1463 |
|
|
|
1464 |
<!-- Modal body -->
|
|
|
1465 |
<div class="modal-body">
|
|
|
1466 |
<?php
|
|
|
1467 |
$form = $this->formFile;
|
|
|
1468 |
$form->setAttributes([
|
|
|
1469 |
'method' => 'post',
|
|
|
1470 |
'name' => 'form-file',
|
|
|
1471 |
'id' => 'form-file'
|
|
|
1472 |
]);
|
|
|
1473 |
|
|
|
1474 |
$form->prepare();
|
|
|
1475 |
echo $this->form()->openTag($form);
|
|
|
1476 |
|
|
|
1477 |
|
|
|
1478 |
|
|
|
1479 |
?>
|
|
|
1480 |
|
|
|
1481 |
<div class="form-group">
|
|
|
1482 |
<?php
|
|
|
1483 |
$element = $form->get('name');
|
|
|
1484 |
$element->setOptions(['label' => 'LABEL_NAME']);
|
|
|
1485 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
1486 |
|
|
|
1487 |
echo $this->formLabel($element);
|
|
|
1488 |
echo $this->formText($element);
|
|
|
1489 |
?>
|
|
|
1490 |
</div>
|
|
|
1491 |
<div class="form-group">
|
|
|
1492 |
<?php
|
|
|
1493 |
$element = $form->get('file');
|
|
|
1494 |
$element->setOptions(['label' => 'LABEL_FILE']);
|
|
|
1495 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
1496 |
|
|
|
1497 |
echo $this->formLabel($element);
|
|
|
1498 |
echo $this->formFile($element);
|
|
|
1499 |
?>
|
|
|
1500 |
</div>
|
|
|
1501 |
|
|
|
1502 |
<div class="text-right">
|
|
|
1503 |
<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
|
|
|
1504 |
<button type="button" class="btn btn-light btn-cancel-modal-file">LABEL_CANCEL</button>
|
|
|
1505 |
</div>
|
|
|
1506 |
<?php echo $this->form()->closeTag($form); ?>
|
|
|
1507 |
</div>
|
|
|
1508 |
|
|
|
1509 |
|
|
|
1510 |
</div>
|
|
|
1511 |
</div>
|
|
|
1512 |
</div>
|
|
|
1513 |
|
|
|
1514 |
|
|
|
1515 |
<!-- The Modal -->
|
|
|
1516 |
<div class="modal" id="modal-comment">
|
|
|
1517 |
<div class="modal-dialog modal-xl">
|
|
|
1518 |
<div class="modal-content">
|
|
|
1519 |
|
|
|
1520 |
<!-- Modal Header -->
|
|
|
1521 |
<div class="modal-header">
|
|
|
1522 |
<h4>LABEL_EVALUATION</h4>
|
|
|
1523 |
</div>
|
|
|
1524 |
|
|
|
1525 |
<!-- Modal body -->
|
|
|
1526 |
<div class="modal-body">
|
|
|
1527 |
<?php
|
|
|
1528 |
$form = $this->formComment;
|
|
|
1529 |
$form->setAttributes([
|
|
|
1530 |
'method' => 'post',
|
|
|
1531 |
'name' => 'form-comment',
|
|
|
1532 |
'id' => 'form-comment'
|
|
|
1533 |
]);
|
|
|
1534 |
|
|
|
1535 |
$form->prepare();
|
|
|
1536 |
echo $this->form()->openTag($form);
|
|
|
1537 |
|
|
|
1538 |
|
|
|
1539 |
|
|
|
1540 |
?>
|
|
|
1541 |
|
|
|
1542 |
<div class="form-group">
|
|
|
1543 |
<?php
|
|
|
1544 |
$element = $form->get('points');
|
|
|
1545 |
$element->setOptions(['label' => 'LABEL_POINTS']);
|
|
|
1546 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
1547 |
|
|
|
1548 |
echo $this->formLabel($element);
|
|
|
1549 |
echo $this->formText($element);
|
|
|
1550 |
?>
|
|
|
1551 |
</div>
|
|
|
1552 |
<div class="form-group">
|
|
|
1553 |
<?php
|
|
|
1554 |
$element = $form->get('comment');
|
|
|
1555 |
$element->setOptions(['label' => 'LABEL_COMMENT']);
|
|
|
1556 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
1557 |
|
|
|
1558 |
echo $this->formLabel($element);
|
|
|
1559 |
echo $this->formTextArea($element);
|
|
|
1560 |
?>
|
|
|
1561 |
</div>
|
|
|
1562 |
|
|
|
1563 |
<div class="text-right">
|
|
|
1564 |
<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
|
|
|
1565 |
<button type="button" class="btn btn-light btn-cancel-modal-comment">LABEL_CANCEL</button>
|
|
|
1566 |
</div>
|
|
|
1567 |
<?php echo $this->form()->closeTag($form); ?>
|
|
|
1568 |
</div>
|
|
|
1569 |
|
|
|
1570 |
|
|
|
1571 |
</div>
|
|
|
1572 |
</div>
|
|
|
1573 |
</div>
|
|
|
1574 |
|
|
|
1575 |
|
|
|
1576 |
|
|
|
1577 |
<!-- The Modal -->
|
|
|
1578 |
<div class="modal" id="modal-level">
|
|
|
1579 |
<div class="modal-dialog modal-xl">
|
|
|
1580 |
<div class="modal-content">
|
|
|
1581 |
|
|
|
1582 |
<!-- Modal Header -->
|
|
|
1583 |
<div class="modal-header">
|
|
|
1584 |
<h4>LABEL_LEVEL</h4>
|
|
|
1585 |
</div>
|
|
|
1586 |
|
|
|
1587 |
<!-- Modal body -->
|
|
|
1588 |
<div class="modal-body">
|
|
|
1589 |
<?php
|
|
|
1590 |
$form = $this->formLevel;
|
|
|
1591 |
$form->setAttributes([
|
|
|
1592 |
'method' => 'post',
|
|
|
1593 |
'name' => 'form-level',
|
|
|
1594 |
'id' => 'form-level'
|
|
|
1595 |
]);
|
|
|
1596 |
|
|
|
1597 |
$form->prepare();
|
|
|
1598 |
echo $this->form()->openTag($form);
|
|
|
1599 |
|
|
|
1600 |
|
|
|
1601 |
|
|
|
1602 |
?>
|
|
|
1603 |
|
|
|
1604 |
<div class="form-group">
|
|
|
1605 |
<?php
|
|
|
1606 |
$element = $form->get('level');
|
|
|
1607 |
$element->setOptions(['label' => 'LABEL_LEVEL']);
|
|
|
1608 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
1609 |
|
|
|
1610 |
echo $this->formLabel($element);
|
|
|
1611 |
echo $this->formSelect($element);
|
|
|
1612 |
?>
|
|
|
1613 |
</div>
|
|
|
1614 |
|
|
|
1615 |
|
|
|
1616 |
<div class="text-right">
|
|
|
1617 |
<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
|
|
|
1618 |
<button type="button" class="btn btn-light btn-cancel-modal-level">LABEL_CANCEL</button>
|
|
|
1619 |
</div>
|
|
|
1620 |
<?php echo $this->form()->closeTag($form); ?>
|
|
|
1621 |
</div>
|
|
|
1622 |
|
|
|
1623 |
|
|
|
1624 |
</div>
|
|
|
1625 |
</div>
|
|
|
1626 |
</div>
|
|
|
1627 |
|
|
|
1628 |
|
|
|
1629 |
<!-- The Modal -->
|
|
|
1630 |
<div class="modal" id="modal-status">
|
|
|
1631 |
<div class="modal-dialog modal-xl">
|
|
|
1632 |
<div class="modal-content">
|
|
|
1633 |
|
|
|
1634 |
<!-- Modal Header -->
|
|
|
1635 |
<div class="modal-header">
|
|
|
1636 |
<h4>LABEL_STATUS</h4>
|
|
|
1637 |
</div>
|
|
|
1638 |
|
|
|
1639 |
<!-- Modal body -->
|
|
|
1640 |
<div class="modal-body">
|
|
|
1641 |
<?php
|
|
|
1642 |
$form = $this->formStatus;
|
|
|
1643 |
$form->setAttributes([
|
|
|
1644 |
'method' => 'post',
|
|
|
1645 |
'name' => 'form-status',
|
|
|
1646 |
'id' => 'form-status'
|
|
|
1647 |
]);
|
|
|
1648 |
|
|
|
1649 |
$form->prepare();
|
|
|
1650 |
echo $this->form()->openTag($form);
|
|
|
1651 |
|
|
|
1652 |
|
|
|
1653 |
|
|
|
1654 |
?>
|
|
|
1655 |
|
|
|
1656 |
<div class="form-group">
|
|
|
1657 |
<?php
|
|
|
1658 |
$element = $form->get('status');
|
|
|
1659 |
$element->setOptions(['label' => 'LABEL_STATUS']);
|
|
|
1660 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
1661 |
|
|
|
1662 |
echo $this->formLabel($element);
|
|
|
1663 |
echo $this->formSelect($element);
|
|
|
1664 |
?>
|
|
|
1665 |
</div>
|
|
|
1666 |
|
|
|
1667 |
|
|
|
1668 |
<div class="text-right">
|
|
|
1669 |
<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
|
|
|
1670 |
<button type="button" class="btn btn-light btn-cancel-modal-status">LABEL_CANCEL</button>
|
|
|
1671 |
</div>
|
|
|
1672 |
<?php echo $this->form()->closeTag($form); ?>
|
|
|
1673 |
</div>
|
|
|
1674 |
|
|
|
1675 |
|
|
|
1676 |
</div>
|
|
|
1677 |
</div>
|
|
|
1678 |
</div>
|
|
|
1679 |
|
|
|
1680 |
|
|
|
1681 |
<div class="modal" id="modal-interview">
|
|
|
1682 |
<div class="modal-dialog modal-xl">
|
|
|
1683 |
<div class="modal-content">
|
|
|
1684 |
|
|
|
1685 |
<!-- Modal Header -->
|
|
|
1686 |
<div class="modal-header">
|
|
|
1687 |
<h4>LABEL_INTERVIEW</h4>
|
|
|
1688 |
</div>
|
|
|
1689 |
|
|
|
1690 |
<!-- Modal body -->
|
|
|
1691 |
<div class="modal-body">
|
|
|
1692 |
<?php
|
|
|
1693 |
$form = $this->formInterview;
|
|
|
1694 |
$form->setAttributes([
|
|
|
1695 |
'method' => 'post',
|
|
|
1696 |
'name' => 'form-interview',
|
|
|
1697 |
'id' => 'form-interview'
|
|
|
1698 |
]);
|
|
|
1699 |
|
|
|
1700 |
$form->prepare();
|
|
|
1701 |
echo $this->form()->openTag($form);
|
|
|
1702 |
|
|
|
1703 |
|
|
|
1704 |
|
|
|
1705 |
?>
|
|
|
1706 |
|
|
|
1707 |
<div class="form-group">
|
|
|
1708 |
<?php
|
|
|
1709 |
$element = $form->get('user_id');
|
|
|
1710 |
$element->setOptions(['label' => 'LABEL_INTERVIEWED_BY']);
|
|
|
1711 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
1712 |
|
|
|
1713 |
echo $this->formLabel($element);
|
|
|
1714 |
echo $this->formSelect($element);
|
|
|
1715 |
?>
|
|
|
1716 |
</div>
|
|
|
1717 |
|
|
|
1718 |
<div class="form-group">
|
|
|
1719 |
<?php
|
|
|
1720 |
$element = $form->get('type');
|
|
|
1721 |
$element->setOptions(['label' => 'LABEL_TYPE']);
|
|
|
1722 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
1723 |
|
|
|
1724 |
echo $this->formLabel($element);
|
|
|
1725 |
echo $this->formSelect($element);
|
|
|
1726 |
?>
|
|
|
1727 |
</div>
|
|
|
1728 |
|
|
|
1729 |
<div class="form-group">
|
|
|
1730 |
<?php
|
|
|
1731 |
$element = $form->get('last_date');
|
|
|
1732 |
$element->setOptions(['label' => 'LABEL_LAST_DATE']);
|
|
|
1733 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
1734 |
|
|
|
1735 |
echo $this->formLabel($element);
|
|
|
1736 |
echo $this->formText($element);
|
|
|
1737 |
?>
|
|
|
1738 |
</div>
|
|
|
1739 |
|
|
|
1740 |
|
|
|
1741 |
<div class="text-right">
|
|
|
1742 |
<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
|
|
|
1743 |
<button type="button" class="btn btn-light btn-cancel-modal-interview">LABEL_CANCEL</button>
|
|
|
1744 |
</div>
|
|
|
1745 |
<?php echo $this->form()->closeTag($form); ?>
|
|
|
1746 |
</div>
|
|
|
1747 |
|
|
|
1748 |
|
|
|
1749 |
</div>
|
|
|
1750 |
</div>
|
|
|
1751 |
</div>
|
|
|
1752 |
|
|
|
1753 |
</section>
|
|
|
1754 |
|
|
|
1755 |
|
|
|
1756 |
<script id="fileTemplate" type="text/x-jsrender">
|
|
|
1757 |
<tr>
|
|
|
1758 |
<td>{{>name}}</td>
|
|
|
1759 |
<td>{{>filename}}</td>
|
|
|
1760 |
<td>
|
|
|
1761 |
{{if link_view}}
|
|
|
1762 |
<button class="btn btn-default btn-view-file" data-href="{{>link_view}}" data-toggle="tooltip" title="LABEL_DOWNLOAD"><i class="fa fa-download"></i> LABEL_DOWNLOAD </button>
|
|
|
1763 |
{{/if}}
|
|
|
1764 |
{{if link_delete}}
|
|
|
1765 |
<button class="btn btn-danger btn-delete-file" data-href="{{>link_delete}}" data-toggle="tooltip" title="LABEL_DELETE"><i class="fa fa-trash"></i> LABEL_DELETE </button>
|
|
|
1766 |
{{/if}}
|
|
|
1767 |
</td>
|
|
|
1768 |
</tr>
|
|
|
1769 |
</script>
|
|
|
1770 |
|
|
|
1771 |
|
|
|
1772 |
|
|
|
1773 |
|
|
|
1774 |
|
|
|
1775 |
<script id="interviewTemplate" type="text/x-jsrender">
|
|
|
1776 |
<tr>
|
|
|
1777 |
<td>{{>type}}</td>
|
|
|
1778 |
<td>{{>last_date}}</td>
|
|
|
1779 |
<td>{{>interviewer}}</td>
|
|
|
1780 |
<td>{{>status}}</td>
|
|
|
1781 |
<td>
|
|
|
1782 |
{{if link_report}}
|
|
|
1783 |
<button class="btn btn-default btn-report-interview" data-href="{{>link_report}}" data-toggle="tooltip" title="LABEL_DOWNLOAD"><i class="fa fa-download"></i> LABEL_DOWNLOAD </button>
|
|
|
1784 |
{{/if}}
|
|
|
1785 |
{{if link_edit}}
|
|
|
1786 |
<button class="btn btn-default btn-edit-interview" data-href="{{>link_edit}}" data-toggle="tooltip" title="LABEL_EDIT"><i class="fa fa-pencil"></i> LABEL_EDIT </button>
|
|
|
1787 |
{{/if}}
|
|
|
1788 |
{{if link_delete}}
|
|
|
1789 |
<button class="btn btn-danger btn-delete-interview" data-href="{{>link_delete}}" data-toggle="tooltip" title="LABEL_DELETE"><i class="fa fa-trash"></i> LABEL_DELETE </button>
|
|
|
1790 |
{{/if}}
|
|
|
1791 |
</td>
|
|
|
1792 |
</tr>
|
|
|
1793 |
</script>
|
|
|
1794 |
|