8780 |
eleazar |
1 |
<?php
|
|
|
2 |
$acl = $this->viewModel()->getRoot()->getVariable('acl');
|
|
|
3 |
$currentUser = $this->currentUserHelper();
|
|
|
4 |
$roleName = $currentUser->getUserTypeId();
|
|
|
5 |
|
|
|
6 |
$params = [
|
8803 |
eleazar |
7 |
'interview_uuid' => $interview_uuid,
|
8780 |
eleazar |
8 |
];
|
|
|
9 |
|
|
|
10 |
$routeAdd = $this->url('recruitment-and-selection/interview/file/add', $params);
|
|
|
11 |
$routeDatatable = $this->url('recruitment-and-selection/interview/file', $params);
|
|
|
12 |
|
|
|
13 |
$allowAdd = $acl->isAllowed($roleName, 'recruitment-and-selection/interview/file/add') ? 1 : 0;
|
|
|
14 |
$allowDelete = $acl->isAllowed($roleName, 'recruitment-and-selection/interview/file/delete') ? 1 : 0;
|
|
|
15 |
$allowEdit = $acl->isAllowed($roleName, 'recruitment-and-selection/interview/file/edit') ? 1 : 0;
|
|
|
16 |
|
16822 |
efrain |
17 |
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/nprogress/nprogress.css'));
|
|
|
18 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/nprogress/nprogress.js'));
|
8780 |
eleazar |
19 |
|
16822 |
efrain |
20 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/ckeditor/ckeditor.js'));
|
8780 |
eleazar |
21 |
|
|
|
22 |
|
|
|
23 |
|
16822 |
efrain |
24 |
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/bootstrap-fileinput/css/fileinput.min.css'));
|
|
|
25 |
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/bootstrap-fileinput/themes/explorer-fas/theme.css'));
|
8780 |
eleazar |
26 |
|
16843 |
efrain |
27 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap-fileinput/js/plugins/piexif.js'));
|
|
|
28 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap-fileinput/js/plugins/sortable.js'));
|
16822 |
efrain |
29 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap-fileinput/js/fileinput.js'));
|
|
|
30 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap-fileinput/js/locales/es.js'));
|
|
|
31 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap-fileinput/themes/fas/theme.js'));
|
|
|
32 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap-fileinput/themes/explorer-fas/theme.js'));
|
8780 |
eleazar |
33 |
|
|
|
34 |
|
16822 |
efrain |
35 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/jquery.validate.js'));
|
|
|
36 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/additional-methods.js'));
|
|
|
37 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/localization/messages_es.js'));
|
8780 |
eleazar |
38 |
|
16822 |
efrain |
39 |
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/datatables.net-bs5/dataTables.bootstrap5.css'));
|
|
|
40 |
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/datatables.net-bs5-responsive/responsive.bootstrap5.css'));
|
8780 |
eleazar |
41 |
|
16822 |
efrain |
42 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net/jquery.dataTables.js'));
|
|
|
43 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net-bs5/dataTables.bootstrap5.js'));
|
|
|
44 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net-bs5-responsive/dataTables.responsive.min.js'));
|
|
|
45 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net-bs5-responsive/responsive.bootstrap5.min.js'));
|
8780 |
eleazar |
46 |
|
|
|
47 |
|
16822 |
efrain |
48 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/jquery.validate.js'));
|
|
|
49 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/additional-methods.js'));
|
|
|
50 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/localization/messages_es.js'));
|
8780 |
eleazar |
51 |
|
|
|
52 |
|
16822 |
efrain |
53 |
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/bootstrap4-toggle/css/bootstrap4-toggle.min.css'));
|
|
|
54 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap4-toggle/js/bootstrap4-toggle.min.js'));
|
8780 |
eleazar |
55 |
|
16822 |
efrain |
56 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/select2/js/select2.js'));
|
|
|
57 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/select2/js/i18n/es.js'));
|
|
|
58 |
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/select2/css/select2.css'));
|
8780 |
eleazar |
59 |
|
16927 |
efrain |
60 |
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/select2-bootstrap5-theme/select2-bootstrap-5-theme.css'));
|
8780 |
eleazar |
61 |
|
|
|
62 |
|
16822 |
efrain |
63 |
|
|
|
64 |
|
|
|
65 |
|
8780 |
eleazar |
66 |
$this->inlineScript()->captureStart();
|
|
|
67 |
echo <<<JS
|
|
|
68 |
$.prototype.fileinput.Constructor.prototype["setUploadUrl"] = function(url) {
|
|
|
69 |
this.uploadUrl = url;
|
|
|
70 |
}
|
|
|
71 |
|
|
|
72 |
|
|
|
73 |
jQuery(document).ready(function ($) {
|
|
|
74 |
|
|
|
75 |
|
|
|
76 |
|
|
|
77 |
var allowAdd = $allowAdd;
|
|
|
78 |
var allowDelete = $allowDelete;
|
|
|
79 |
var allowEdit = $allowEdit;
|
|
|
80 |
|
|
|
81 |
var gridTable = $('#gridTable').dataTable({
|
|
|
82 |
'processing': true,
|
|
|
83 |
'serverSide': true,
|
|
|
84 |
'searching': true,
|
|
|
85 |
'order': [[1, 'asc']],
|
|
|
86 |
'ordering': true,
|
|
|
87 |
'ordenable': true,
|
|
|
88 |
'responsive': true,
|
|
|
89 |
'select': false,
|
|
|
90 |
'paging': true,
|
|
|
91 |
'pagingType': 'simple_numbers',
|
|
|
92 |
'lengthMenu': [[10, 25, 50, -1], [10, 25, 50, 'All']],
|
|
|
93 |
|
|
|
94 |
'ajax': {
|
|
|
95 |
'url': '$routeDatatable',
|
|
|
96 |
'type': 'get',
|
|
|
97 |
'data': function (d) {
|
|
|
98 |
},
|
|
|
99 |
'beforeSend': function (request) {
|
|
|
100 |
NProgress.start();
|
|
|
101 |
},
|
|
|
102 |
'dataFilter': function (response) {
|
|
|
103 |
var response = jQuery.parseJSON(response);
|
|
|
104 |
|
|
|
105 |
var json = {};
|
|
|
106 |
json.recordsTotal = 0;
|
|
|
107 |
json.recordsFiltered = 0;
|
|
|
108 |
json.data = [];
|
|
|
109 |
|
|
|
110 |
if (response.success) {
|
|
|
111 |
json.recordsTotal = response.data.total;
|
|
|
112 |
json.recordsFiltered = response.data.total;
|
|
|
113 |
json.data = response.data.items;
|
14932 |
stevensc |
114 |
$("#user-title").text('LABEL_PSYCOPTECNICH' + ' - ' + response.data.candidate.full_name);
|
8780 |
eleazar |
115 |
} else {
|
|
|
116 |
$.fn.showError(response.data)
|
|
|
117 |
}
|
|
|
118 |
|
|
|
119 |
return JSON.stringify(json);
|
|
|
120 |
}
|
|
|
121 |
},
|
|
|
122 |
'language': {
|
|
|
123 |
'sProcessing': 'LABEL_DATATABLE_SPROCESSING',
|
|
|
124 |
'sLengthMenu': 'LABEL_DATATABLE_SLENGTHMENU',
|
|
|
125 |
'sZeroRecords': 'LABEL_DATATABLE_SZERORECORDS',
|
|
|
126 |
'sEmptyTable': 'LABEL_DATATABLE_SEMPTYTABLE',
|
|
|
127 |
'sInfo': 'LABEL_DATATABLE_SINFO',
|
|
|
128 |
'sInfoEmpty': 'LABEL_DATATABLE_SINFOEMPTY',
|
|
|
129 |
'sInfoFiltered': 'LABEL_DATATABLE_SINFOFILTERED',
|
|
|
130 |
'sInfoPostFix': '',
|
|
|
131 |
'sSearch': 'LABEL_DATATABLE_SSEARCH',
|
|
|
132 |
'sUrl': '',
|
|
|
133 |
'sInfoThousands': ',',
|
|
|
134 |
'sLoadingRecords': 'LABEL_DATATABLE_SLOADINGRECORDS',
|
|
|
135 |
'oPaginate': {
|
|
|
136 |
'sFirst': 'LABEL_DATATABLE_SFIRST',
|
|
|
137 |
'sLast': 'LABEL_DATATABLE_SLAST',
|
|
|
138 |
'sNext': 'LABEL_DATATABLE_SNEXT',
|
|
|
139 |
'sPrevious': 'LABEL_DATATABLE_SPREVIOUS'
|
|
|
140 |
},
|
|
|
141 |
'oAria': {
|
|
|
142 |
'sSortAscending': ': LABEL_DATATABLE_SSORTASCENDING',
|
|
|
143 |
'sSortDescending': ':LABEL_DATATABLE_SSORTDESCENDING'
|
|
|
144 |
},
|
|
|
145 |
},
|
|
|
146 |
'drawCallback': function (settings) {
|
|
|
147 |
NProgress.done();
|
16822 |
efrain |
148 |
|
8780 |
eleazar |
149 |
|
|
|
150 |
$('#form-add #file').fileinput({
|
|
|
151 |
theme: 'fas',
|
|
|
152 |
language: 'es',
|
|
|
153 |
showUpload: false,
|
|
|
154 |
dropZoneEnabled: false,
|
|
|
155 |
maxFileCount: 1,
|
|
|
156 |
allowedFileExtensions: ['pdf', 'docx'],
|
|
|
157 |
});
|
|
|
158 |
|
|
|
159 |
$('#form-edit #file').fileinput({
|
|
|
160 |
theme: 'fas',
|
|
|
161 |
language: 'es',
|
|
|
162 |
showUpload: false,
|
|
|
163 |
initialPreviewAsData: true,
|
|
|
164 |
dropZoneEnabled: false,
|
|
|
165 |
maxFileCount: 1,
|
|
|
166 |
allowedFileExtensions: ['pdf', 'docx'],
|
|
|
167 |
});
|
|
|
168 |
|
|
|
169 |
|
|
|
170 |
$('body').on('click', 'button.btn-add', function (e) {
|
|
|
171 |
e.preventDefault();
|
|
|
172 |
|
|
|
173 |
$('#form-add #title').val('');
|
|
|
174 |
$('#form-add #file').fileinput('reset');
|
|
|
175 |
$('#form-add #file').val('');
|
|
|
176 |
CKEDITOR.instances.coment.setData('');
|
|
|
177 |
validatorAdd.resetForm();
|
|
|
178 |
|
|
|
179 |
$('#add-file-box').modal('show');
|
|
|
180 |
return false;
|
|
|
181 |
});
|
|
|
182 |
|
|
|
183 |
$(".close-box, .btn-add-cancel").on("click", function (e) {
|
|
|
184 |
e.preventDefault();
|
|
|
185 |
|
|
|
186 |
$('#add-file-box').modal('hide');
|
|
|
187 |
$('#edit-file-box').modal('hide');
|
|
|
188 |
return false;
|
|
|
189 |
});
|
|
|
190 |
|
|
|
191 |
var validatorEdit = $('#form-edit').validate({
|
|
|
192 |
debug: true,
|
|
|
193 |
onclick: false,
|
|
|
194 |
onkeyup: false,
|
|
|
195 |
onfocusout: false,
|
|
|
196 |
ignore: [],
|
|
|
197 |
rules: {
|
|
|
198 |
'title': {
|
|
|
199 |
required: false,
|
|
|
200 |
},
|
|
|
201 |
'file': {
|
|
|
202 |
required: false,
|
|
|
203 |
extension: 'pdf|docx',
|
|
|
204 |
accept: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/msword,application/pdf'
|
|
|
205 |
},
|
|
|
206 |
'coment':{
|
|
|
207 |
updateCkeditor:function() {
|
|
|
208 |
CKEDITOR.instances.coment.updateElement();
|
|
|
209 |
},
|
|
|
210 |
},
|
|
|
211 |
},
|
|
|
212 |
submitHandler: function (form) {
|
|
|
213 |
var formdata = false;
|
|
|
214 |
if (window.FormData) {
|
|
|
215 |
formdata = new FormData(form); //form[0]);
|
|
|
216 |
}
|
|
|
217 |
|
15374 |
stevensc |
218 |
$('#edit-file-box .btn-primary').prop('disabled', true);
|
|
|
219 |
|
8780 |
eleazar |
220 |
$.ajax({
|
|
|
221 |
'dataType': 'json',
|
|
|
222 |
'accept': 'application/json',
|
|
|
223 |
'method': 'post',
|
|
|
224 |
'url': $('#form-edit').attr('action'),
|
|
|
225 |
'data': formdata,
|
|
|
226 |
'processData': false,
|
|
|
227 |
'contentType': false,
|
|
|
228 |
}).done(function (response) {
|
|
|
229 |
if (response['success']) {
|
|
|
230 |
$.fn.showSuccess(response['data']);
|
15374 |
stevensc |
231 |
|
8780 |
eleazar |
232 |
$('#edit-file-box').modal('hide');
|
|
|
233 |
gridTable.api().ajax.reload(null, false);
|
|
|
234 |
} else {
|
|
|
235 |
validatorEdit.resetForm();
|
|
|
236 |
if (jQuery.type(response['data']) == 'string') {
|
|
|
237 |
$.fn.showError(response['data']);
|
|
|
238 |
} else {
|
|
|
239 |
$.each(response['data'], function (fieldname, errors) {
|
|
|
240 |
$.fn.showFormErrorValidator('#form-edit #' + fieldname, errors);
|
|
|
241 |
});
|
|
|
242 |
}
|
|
|
243 |
}
|
|
|
244 |
}).fail(function (jqXHR, textStatus, errorThrown) {
|
|
|
245 |
$.fn.showError(textStatus);
|
|
|
246 |
}).always(function () {
|
15374 |
stevensc |
247 |
$('#edit-file-box .btn-primary').prop('disabled', false);
|
8780 |
eleazar |
248 |
NProgress.done();
|
|
|
249 |
});
|
|
|
250 |
return false;
|
|
|
251 |
},
|
|
|
252 |
invalidHandler: function (form, validator) {
|
|
|
253 |
|
|
|
254 |
}
|
|
|
255 |
});
|
|
|
256 |
|
|
|
257 |
$('body').on('click', 'button.btn-edit', function (e) {
|
|
|
258 |
e.preventDefault();
|
|
|
259 |
|
|
|
260 |
var url = $(this).data('href');
|
|
|
261 |
$.ajax({
|
|
|
262 |
'dataType': 'json',
|
|
|
263 |
'accept': 'application/json',
|
|
|
264 |
'method': 'get',
|
|
|
265 |
'url': url,
|
|
|
266 |
}).done(function (response) {
|
|
|
267 |
if (response['success']) {
|
|
|
268 |
$('#form-edit')[0].reset();
|
|
|
269 |
|
|
|
270 |
$('#form-edit').attr('action', url);
|
|
|
271 |
|
|
|
272 |
$('#form-edit #title').val(response['data']['title']);
|
|
|
273 |
$('#form-edit #coment').val(response['data']['coment']);
|
|
|
274 |
$('#form-edit #btn-cv').attr('href', response['data']['file']);
|
|
|
275 |
|
|
|
276 |
|
|
|
277 |
|
|
|
278 |
$('#form-edit #file').fileinput('reset');
|
|
|
279 |
$('#form-edit #file').fileinput('setUploadUrl', response['data']['file'] );
|
|
|
280 |
|
|
|
281 |
|
|
|
282 |
$('#form-edit #status').val(response['data']['status']);
|
|
|
283 |
|
|
|
284 |
$('#edit-file-box').modal('show');
|
|
|
285 |
} else {
|
|
|
286 |
validatorEdit.resetForm();
|
|
|
287 |
if (jQuery.type(response['data']) == 'string') {
|
|
|
288 |
$.fn.showError(response['data']);
|
|
|
289 |
} else {
|
|
|
290 |
$.each(response['data'], function (fieldname, errors) {
|
|
|
291 |
$.fn.showFormErrorValidator('#form-edit #' + fieldname, errors);
|
|
|
292 |
});
|
|
|
293 |
}
|
|
|
294 |
}
|
|
|
295 |
}).fail(function (jqXHR, textStatus, errorThrown) {
|
|
|
296 |
$.fn.showError(textStatus);
|
|
|
297 |
}).always(function () {
|
|
|
298 |
NProgress.done();
|
|
|
299 |
});
|
|
|
300 |
});
|
|
|
301 |
|
|
|
302 |
var validatorAdd = $('#form-add').validate({
|
|
|
303 |
debug: true,
|
|
|
304 |
onclick: false,
|
|
|
305 |
onkeyup: false,
|
|
|
306 |
onfocusout: false,
|
|
|
307 |
ignore: [],
|
|
|
308 |
rules: {
|
|
|
309 |
'title': {
|
|
|
310 |
required: true,
|
8822 |
eleazar |
311 |
maxlength: 64,
|
8780 |
eleazar |
312 |
},
|
|
|
313 |
'file': {
|
|
|
314 |
required: false,
|
|
|
315 |
extension: 'pdf|docx',
|
|
|
316 |
accept: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/msword,application/pdf'
|
|
|
317 |
},
|
|
|
318 |
'coment':{
|
|
|
319 |
updateCkeditor:function() {
|
|
|
320 |
CKEDITOR.instances.coment.updateElement();
|
|
|
321 |
},
|
|
|
322 |
},
|
|
|
323 |
},
|
|
|
324 |
submitHandler: function (form) {
|
|
|
325 |
var formdata = false;
|
|
|
326 |
if (window.FormData) {
|
|
|
327 |
formdata = new FormData(form); //form[0]);
|
|
|
328 |
}
|
|
|
329 |
|
15372 |
stevensc |
330 |
$('#add-file-box .btn-primary').prop('disabled', true);
|
15373 |
stevensc |
331 |
|
8780 |
eleazar |
332 |
$.ajax({
|
|
|
333 |
'dataType': 'json',
|
|
|
334 |
'accept': 'application/json',
|
|
|
335 |
'method': 'post',
|
|
|
336 |
'url': $('#form-add').attr('action'),
|
|
|
337 |
'data': formdata,
|
|
|
338 |
'processData': false,
|
|
|
339 |
'contentType': false,
|
|
|
340 |
}).done(function (response) {
|
|
|
341 |
if (response['success']) {
|
|
|
342 |
$.fn.showSuccess(response['data']);
|
15373 |
stevensc |
343 |
|
8780 |
eleazar |
344 |
$('#add-file-box').modal('hide');
|
|
|
345 |
gridTable.api().ajax.reload(null, false);
|
|
|
346 |
} else {
|
|
|
347 |
validatorAdd.resetForm();
|
|
|
348 |
if (jQuery.type(response['data']) == 'string') {
|
|
|
349 |
$.fn.showError(response['data']);
|
|
|
350 |
} else {
|
|
|
351 |
$.each(response['data'], function (fieldname, errors) {
|
|
|
352 |
$.fn.showFormErrorValidator('#form-add #' + fieldname, errors);
|
|
|
353 |
});
|
|
|
354 |
}
|
|
|
355 |
}
|
|
|
356 |
}).fail(function (jqXHR, textStatus, errorThrown) {
|
|
|
357 |
$.fn.showError(textStatus);
|
|
|
358 |
}).always(function () {
|
15373 |
stevensc |
359 |
$('#add-file-box .btn-primary').prop('disabled', false);
|
8780 |
eleazar |
360 |
NProgress.done();
|
|
|
361 |
});
|
|
|
362 |
return false;
|
|
|
363 |
},
|
|
|
364 |
invalidHandler: function (form, validator) {
|
|
|
365 |
|
|
|
366 |
}
|
|
|
367 |
});
|
|
|
368 |
},
|
|
|
369 |
'aoColumns': [
|
|
|
370 |
{ 'mDataProp': 'title' },
|
8880 |
eleazar |
371 |
{ 'mDataProp': 'coment' },
|
8780 |
eleazar |
372 |
{ 'mDataProp': 'actions' },
|
|
|
373 |
],
|
|
|
374 |
'columnDefs': [
|
|
|
375 |
{
|
|
|
376 |
'targets': -1,
|
|
|
377 |
'orderable': false,
|
|
|
378 |
'render': function (data, type, row) {
|
|
|
379 |
s = '';
|
|
|
380 |
|
|
|
381 |
if (allowEdit && data['link_edit']) {
|
16906 |
efrain |
382 |
s = s + '<button class="btn btn-info btn-sm btn-edit" data-href="' + data['link_edit'] + '" data-toggle="tooltip" title="LABEL_EDIT"><i class="fa fa-pen"></i> LABEL_EDIT </button> ';
|
8780 |
eleazar |
383 |
}
|
|
|
384 |
|
|
|
385 |
if (allowDelete && data['link_delete']) {
|
|
|
386 |
s = s + '<button class="btn btn-danger btn-sm btn-delete" data-href="' + data['link_delete'] + '" data-toggle="tooltip" title="LABEL_DELETE"><i class="fa fa-times"></i> LABEL_DELETE </button> ';
|
|
|
387 |
}
|
|
|
388 |
|
|
|
389 |
return s;
|
|
|
390 |
}
|
|
|
391 |
}
|
|
|
392 |
],
|
|
|
393 |
});
|
|
|
394 |
|
|
|
395 |
|
|
|
396 |
$('body').on('click', 'button.btn-refresh', function (e) {
|
|
|
397 |
e.preventDefault();
|
|
|
398 |
gridTable.api().ajax.reload(null, false);
|
|
|
399 |
});
|
|
|
400 |
|
14922 |
stevensc |
401 |
$('body').on('click', '#go-back', function () {
|
|
|
402 |
history.back();
|
|
|
403 |
});
|
|
|
404 |
|
8780 |
eleazar |
405 |
CKEDITOR.replace('coment', {
|
|
|
406 |
toolbar: [
|
|
|
407 |
{ name: 'editing', items: ['Scayt'] },
|
|
|
408 |
{ name: 'links', items: ['Link', 'Unlink'] },
|
|
|
409 |
{ name: 'paragraph', items: ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote'] },
|
|
|
410 |
{ name: 'basicstyles', items: ['Bold', 'Italic', 'Strike', 'RemoveFormat'] },
|
|
|
411 |
'/',
|
|
|
412 |
{ name: 'insert', items: ['Image', 'Table', 'HorizontalRule', 'SpecialChar'] },
|
|
|
413 |
{ name: 'styles', items: ['Styles', 'Format'] },
|
|
|
414 |
{ name: 'tools', items: ['Maximize'] }
|
|
|
415 |
],
|
|
|
416 |
removePlugins: 'elementspath,Anchor',
|
|
|
417 |
heigth: 100
|
|
|
418 |
});
|
|
|
419 |
});
|
|
|
420 |
JS;
|
14913 |
stevensc |
421 |
$this->inlineScript()->captureEnd();
|
8780 |
eleazar |
422 |
?>
|
|
|
423 |
|
16891 |
efrain |
424 |
<div class="container">
|
|
|
425 |
<div class="card" id="">
|
|
|
426 |
<div class="card-header">
|
|
|
427 |
<h6 class="card-title">LABEL_PSYCOPTECNICH</h6>
|
|
|
428 |
</div>
|
|
|
429 |
<div class="card-body">
|
|
|
430 |
<div class="row">
|
|
|
431 |
<div class="col-12 mt-3">
|
|
|
432 |
|
|
|
433 |
<table id="gridTable" class="table table-bordered">
|
8780 |
eleazar |
434 |
<thead>
|
14919 |
stevensc |
435 |
<tr>
|
|
|
436 |
<th>LABEL_TITLE</th>
|
|
|
437 |
<th>LABEL_COMMENT</th>
|
|
|
438 |
<th>LABEL_ACTIONS</th>
|
|
|
439 |
</tr>
|
8780 |
eleazar |
440 |
</thead>
|
|
|
441 |
<tbody>
|
|
|
442 |
</tbody>
|
|
|
443 |
</table>
|
16891 |
efrain |
444 |
|
|
|
445 |
</div>
|
|
|
446 |
</div>
|
|
|
447 |
</div>
|
|
|
448 |
<div class="card-footer text-right">
|
|
|
449 |
<button type="button" class="btn btn-info btn-refresh"><i class="fa fa-refresh"></i>
|
8780 |
eleazar |
450 |
LABEL_REFRESH
|
|
|
451 |
</button>
|
|
|
452 |
<?php if ($allowAdd) : ?>
|
|
|
453 |
<button type="button" class="btn btn-primary btn-add"><i class="fa fa-plus"></i>
|
|
|
454 |
LABEL_ADD
|
|
|
455 |
</button>
|
|
|
456 |
<?php endif; ?>
|
16891 |
efrain |
457 |
</div>
|
|
|
458 |
</div>
|
|
|
459 |
</div>
|
8780 |
eleazar |
460 |
|
|
|
461 |
<!-- The Add Modal -->
|
|
|
462 |
<div class="modal" tabindex="-1" role="dialog" id="add-file-box">
|
|
|
463 |
<div class="modal-dialog" role="document">
|
|
|
464 |
<?php
|
|
|
465 |
//$form = $this->formAdd;
|
|
|
466 |
$form->setAttributes([
|
|
|
467 |
'method' => 'post',
|
|
|
468 |
'name' => 'form-add',
|
|
|
469 |
'action' => $routeAdd,
|
|
|
470 |
'id' => 'form-add'
|
|
|
471 |
]);
|
|
|
472 |
$form->prepare();
|
|
|
473 |
echo $this->form()->openTag($form);
|
|
|
474 |
?>
|
|
|
475 |
<div class="modal-content">
|
|
|
476 |
<div class="modal-header">
|
8881 |
eleazar |
477 |
<h3 class="modal-title">LABEL_NEW_EVALUATION</h3>
|
8780 |
eleazar |
478 |
</div>
|
8825 |
eleazar |
479 |
<div class="modal-body">
|
16891 |
efrain |
480 |
<div class="row">
|
|
|
481 |
<div class="col-12 mt-3">
|
8825 |
eleazar |
482 |
<?php
|
|
|
483 |
$element = $form->get('title');
|
|
|
484 |
$element->setOptions(['label' => 'LABEL_TITLE']);
|
|
|
485 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
486 |
echo $this->formLabel($element);
|
|
|
487 |
echo $this->formText($element);
|
|
|
488 |
?>
|
16891 |
efrain |
489 |
</div>
|
8825 |
eleazar |
490 |
</div>
|
16891 |
efrain |
491 |
<div class="row">
|
|
|
492 |
<div class="col-12 mt-3">
|
14919 |
stevensc |
493 |
<?php
|
|
|
494 |
$element = $form->get('coment');
|
|
|
495 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
496 |
$element->setOptions(['label' => 'LABEL_COMMENT']);
|
|
|
497 |
echo $this->formLabel($element);
|
|
|
498 |
echo $this->formTextArea($element);
|
8780 |
eleazar |
499 |
?>
|
16891 |
efrain |
500 |
</div>
|
14919 |
stevensc |
501 |
</div>
|
16891 |
efrain |
502 |
<div class="row">
|
|
|
503 |
<div class="col-12 mt-3">
|
8780 |
eleazar |
504 |
<?php
|
|
|
505 |
$element = $form->get('file');
|
14927 |
stevensc |
506 |
$element->setAttributes(['class' => 'form-control', 'accept' => 'pdf/docx']);
|
8893 |
eleazar |
507 |
$element->setOptions(['label' => 'LABEL_FILE']);
|
8780 |
eleazar |
508 |
echo $this->formLabel($element);
|
|
|
509 |
?>
|
|
|
510 |
<div class="file-loading">
|
|
|
511 |
<?php echo $this->formFile($element); ?>
|
|
|
512 |
</div>
|
16891 |
efrain |
513 |
</div>
|
8780 |
eleazar |
514 |
</div>
|
|
|
515 |
</div>
|
16891 |
efrain |
516 |
<div class="modal-footer text-right">
|
8827 |
eleazar |
517 |
<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
|
|
|
518 |
<button type="button" class="btn btn-default btn-add-cancel">LABEL_CANCEL</button>
|
|
|
519 |
</div>
|
8780 |
eleazar |
520 |
<?php echo $this->form()->closeTag($form); ?>
|
|
|
521 |
</div>
|
|
|
522 |
</div>
|
|
|
523 |
</div>
|
|
|
524 |
|
|
|
525 |
<!-- The Edit Modal -->
|
8821 |
eleazar |
526 |
<div class="modal" tabindex="-1" role="dialog" id="edit-file-box">
|
8780 |
eleazar |
527 |
<div class="modal-dialog" role="document">
|
|
|
528 |
<?php
|
|
|
529 |
$form->setAttributes([
|
|
|
530 |
'method' => 'post',
|
|
|
531 |
'name' => 'form-edit',
|
|
|
532 |
'id' => 'form-edit'
|
|
|
533 |
]);
|
|
|
534 |
$form->prepare();
|
|
|
535 |
echo $this->form()->openTag($form);
|
|
|
536 |
?>
|
|
|
537 |
<div class="modal-content">
|
|
|
538 |
<div class="modal-header">
|
|
|
539 |
<h3 class="modal-title">LABEL_NEW_EVALUATION</h3>
|
|
|
540 |
</div>
|
14919 |
stevensc |
541 |
<div class="modal-body">
|
16891 |
efrain |
542 |
<div class="row">
|
|
|
543 |
<div class="col-12 mt-3">
|
14919 |
stevensc |
544 |
<?php
|
|
|
545 |
$element = $form->get('title');
|
|
|
546 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
547 |
$element->setOptions(['label' => 'LABEL_TITLE']);
|
|
|
548 |
echo $this->formLabel($element);
|
|
|
549 |
echo $this->formText($element);
|
8780 |
eleazar |
550 |
?>
|
16891 |
efrain |
551 |
</div>
|
14919 |
stevensc |
552 |
</div>
|
16891 |
efrain |
553 |
<div class="row">
|
|
|
554 |
<div class="col-12 mt-3">
|
8780 |
eleazar |
555 |
<?php
|
|
|
556 |
$element = $form->get('file');
|
|
|
557 |
$element->setAttributes(['class' => 'form-control', 'accept' => 'pdf/docx']);
|
8892 |
eleazar |
558 |
$element->setOptions(['label' => 'LABEL_FILE']);
|
8780 |
eleazar |
559 |
echo $this->formLabel($element);
|
|
|
560 |
?>
|
|
|
561 |
<div class="file-loading">
|
|
|
562 |
<?php echo $this->formFile($element); ?>
|
|
|
563 |
</div>
|
8878 |
eleazar |
564 |
|
|
|
565 |
<div class="mt-2" id="current-file">
|
14919 |
stevensc |
566 |
<a href="" class="btn btn-primary" id="btn-cv" target="_blank">Evaluacion actual</a>
|
8878 |
eleazar |
567 |
</div>
|
16891 |
efrain |
568 |
</div>
|
8780 |
eleazar |
569 |
</div>
|
16891 |
efrain |
570 |
<div class="row">
|
|
|
571 |
<div class="col-12 mt-3">
|
8780 |
eleazar |
572 |
<?php
|
|
|
573 |
$element = $form->get('coment');
|
|
|
574 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
575 |
$element->setOptions(['label' => 'LABEL_COMMENT']);
|
|
|
576 |
echo $this->formLabel($element);
|
|
|
577 |
echo $this->formTextArea($element);
|
16891 |
efrain |
578 |
|
8780 |
eleazar |
579 |
?>
|
16891 |
efrain |
580 |
</div>
|
8780 |
eleazar |
581 |
</div>
|
16891 |
efrain |
582 |
<div class="modal-footer text-right">
|
8780 |
eleazar |
583 |
<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
|
|
|
584 |
<button type="button" class="btn btn-default btn-add-cancel">LABEL_CANCEL</button>
|
|
|
585 |
</div>
|
|
|
586 |
</div>
|
|
|
587 |
<?php echo $this->form()->closeTag($form); ?>
|
|
|
588 |
</div>
|
|
|
589 |
</div>
|
14919 |
stevensc |
590 |
</div>
|