1 |
www |
1 |
<?php
|
|
|
2 |
$acl = $this->viewModel()->getRoot()->getVariable('acl');
|
|
|
3 |
$currentUser = $this->currentUserHelper();
|
|
|
4 |
|
|
|
5 |
$roleName = $currentUser->getUserTypeId();
|
|
|
6 |
|
|
|
7 |
|
|
|
8 |
$routeAdd = $this->url('settings/competencies/add');
|
|
|
9 |
$routeDatatable = $this->url('settings/competencies');
|
28 |
efrain |
10 |
$routeImport = $this->url('settings/competencies/import');
|
1 |
www |
11 |
|
28 |
efrain |
12 |
$allowAdd = $acl->isAllowed($roleName, 'settings/competencies/add') ? 1 : 0;
|
|
|
13 |
$allowEdit = $acl->isAllowed($roleName, 'settings/competencies/edit') ? 1 : 0;
|
|
|
14 |
$allowDelete = $acl->isAllowed($roleName, 'settings/competencies/delete') ? 1 : 0;
|
|
|
15 |
$allowImport = $acl->isAllowed($roleName, 'settings/competencies/import') ? 1 : 0;
|
1 |
www |
16 |
|
|
|
17 |
|
|
|
18 |
|
|
|
19 |
$this->headLink()->appendStylesheet($this->basePath('plugins/nprogress/nprogress.css'));
|
|
|
20 |
$this->inlineScript()->appendFile($this->basePath('plugins/nprogress/nprogress.js'));
|
|
|
21 |
|
|
|
22 |
$this->inlineScript()->appendFile($this->basePath('plugins/ckeditor/ckeditor.js'));
|
|
|
23 |
|
|
|
24 |
|
|
|
25 |
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/jquery.validate.js'));
|
|
|
26 |
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/additional-methods.js'));
|
|
|
27 |
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/localization/messages_es.js'));
|
|
|
28 |
|
|
|
29 |
$this->headLink()->appendStylesheet($this->basePath('plugins/datatables-bs4/css/dataTables.bootstrap4.min.css'));
|
|
|
30 |
$this->headLink()->appendStylesheet($this->basePath('plugins/datatables-responsive/css/responsive.bootstrap4.min.css'));
|
|
|
31 |
|
|
|
32 |
$this->inlineScript()->appendFile($this->basePath('plugins/datatables/jquery.dataTables.min.js'));
|
|
|
33 |
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-bs4/js/dataTables.bootstrap4.min.js'));
|
|
|
34 |
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/dataTables.responsive.min.js'));
|
|
|
35 |
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/responsive.bootstrap4.min.js'));
|
|
|
36 |
|
|
|
37 |
|
|
|
38 |
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap4-toggle/css/bootstrap4-toggle.min.css'));
|
|
|
39 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap4-toggle/js/bootstrap4-toggle.min.js'));
|
|
|
40 |
|
|
|
41 |
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-confirmation/dist/bootstrap-confirmation.js'));
|
|
|
42 |
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-checkbox/awesome-bootstrap-checkbox.css'));
|
|
|
43 |
|
|
|
44 |
$this->inlineScript()->appendFile($this->basePath('plugins/select2/js/select2.js'));
|
|
|
45 |
$this->inlineScript()->appendFile($this->basePath('plugins/select2/js/i18n/es.js'));
|
|
|
46 |
$this->headLink()->appendStylesheet($this->basePath('plugins/select2/css/select2.css'));
|
|
|
47 |
|
|
|
48 |
$this->headLink()->appendStylesheet($this->basePath('plugins/select2-bootstrap4-theme/select2-bootstrap4.css'));
|
|
|
49 |
|
|
|
50 |
|
|
|
51 |
|
|
|
52 |
$status_active = \LeadersLinked\Model\Competency::STATUS_ACTIVE;
|
|
|
53 |
|
|
|
54 |
$this->inlineScript()->captureStart();
|
|
|
55 |
echo <<<JS
|
|
|
56 |
jQuery( document ).ready(function( $ ) {
|
|
|
57 |
|
|
|
58 |
$.validator.setDefaults({
|
|
|
59 |
debug: true,
|
|
|
60 |
highlight: function(element) {
|
|
|
61 |
$(element).addClass('is-invalid');
|
|
|
62 |
},
|
|
|
63 |
unhighlight: function(element) {
|
|
|
64 |
$(element).removeClass('is-invalid');
|
|
|
65 |
},
|
|
|
66 |
errorElement: 'span',
|
|
|
67 |
errorClass: 'error invalid-feedback',
|
|
|
68 |
errorPlacement: function(error, element) {
|
54 |
steven |
69 |
const child = element.children(':first-child');
|
61 |
steven |
70 |
if(element[0].localName == 'input'){
|
64 |
steven |
71 |
let _error = error
|
|
|
72 |
_error[0].style.display = 'block'
|
63 |
steven |
73 |
_error.insertBefore(element);
|
61 |
steven |
74 |
}
|
|
|
75 |
else if(element.parent('.form-group').length) {
|
1 |
www |
76 |
error.insertAfter(element);
|
|
|
77 |
} else if(element.parent('.toggle').length) {
|
|
|
78 |
error.insertAfter(element.parent().parent());
|
|
|
79 |
} else {
|
|
|
80 |
error.insertAfter(element.parent());
|
|
|
81 |
}
|
|
|
82 |
}
|
|
|
83 |
});
|
|
|
84 |
|
|
|
85 |
|
|
|
86 |
$.fn.showFormErrorValidator = function(fieldname, errors) {
|
|
|
87 |
var field = $(fieldname);
|
|
|
88 |
if(field) {
|
|
|
89 |
$(field).addClass('is-invalid');
|
|
|
90 |
var error = $('<span id="' + fieldname +'-error" class="error invalid-feedback">' + errors + '</div>');
|
|
|
91 |
if(field.parent('.form-group').length) {
|
|
|
92 |
error.insertAfter(field);
|
|
|
93 |
} else if(field.parent('.toggle').length) {
|
|
|
94 |
error.insertAfter(field.parent().parent());
|
|
|
95 |
} else {
|
|
|
96 |
error.insertAfter(field.parent());
|
|
|
97 |
}
|
|
|
98 |
}
|
|
|
99 |
};
|
|
|
100 |
|
|
|
101 |
|
|
|
102 |
|
|
|
103 |
|
|
|
104 |
var allowEdit = $allowEdit;
|
|
|
105 |
var allowDelete = $allowDelete;
|
|
|
106 |
|
|
|
107 |
var gridTable = $('#gridTable').dataTable( {
|
|
|
108 |
'processing': true,
|
|
|
109 |
'serverSide': true,
|
|
|
110 |
'searching': true,
|
|
|
111 |
'order': [[ 0, 'asc' ]],
|
|
|
112 |
'ordering': true,
|
|
|
113 |
'ordenable' : true,
|
|
|
114 |
'responsive': true,
|
|
|
115 |
'select' : false,
|
|
|
116 |
'paging': true,
|
|
|
117 |
'pagingType': 'simple_numbers',
|
|
|
118 |
'ajax': {
|
|
|
119 |
'url' : '$routeDatatable',
|
|
|
120 |
'type' : 'get',
|
|
|
121 |
'beforeSend': function (request) {
|
|
|
122 |
NProgress.start();
|
|
|
123 |
},
|
|
|
124 |
'dataFilter': function(response) {
|
|
|
125 |
var response = jQuery.parseJSON( response );
|
|
|
126 |
|
|
|
127 |
var json = {};
|
|
|
128 |
json.recordsTotal = 0;
|
|
|
129 |
json.recordsFiltered = 0;
|
|
|
130 |
json.data = [];
|
|
|
131 |
|
|
|
132 |
|
|
|
133 |
if(response.success) {
|
|
|
134 |
json.recordsTotal = response.data.total;
|
|
|
135 |
json.recordsFiltered = response.data.total;
|
|
|
136 |
json.data = response.data.items;
|
|
|
137 |
} else {
|
|
|
138 |
$.fn.showError(response.data)
|
|
|
139 |
}
|
|
|
140 |
|
|
|
141 |
return JSON.stringify( json );
|
|
|
142 |
}
|
|
|
143 |
},
|
|
|
144 |
'language' : {
|
|
|
145 |
'sProcessing': 'LABEL_DATATABLE_SPROCESSING',
|
|
|
146 |
'sLengthMenu': 'LABEL_DATATABLE_SLENGTHMENU',
|
|
|
147 |
'sZeroRecords': 'LABEL_DATATABLE_SZERORECORDS',
|
|
|
148 |
'sEmptyTable': 'LABEL_DATATABLE_SEMPTYTABLE',
|
|
|
149 |
'sInfo': 'LABEL_DATATABLE_SINFO',
|
|
|
150 |
'sInfoEmpty': 'LABEL_DATATABLE_SINFOEMPTY',
|
|
|
151 |
'sInfoFiltered': 'LABEL_DATATABLE_SINFOFILTERED',
|
|
|
152 |
'sInfoPostFix': '',
|
|
|
153 |
'sSearch': 'LABEL_DATATABLE_SSEARCH',
|
|
|
154 |
'sUrl': '',
|
|
|
155 |
'sInfoThousands': ',',
|
|
|
156 |
'sLoadingRecords': 'LABEL_DATATABLE_SLOADINGRECORDS',
|
|
|
157 |
'oPaginate': {
|
|
|
158 |
'sFirst': 'LABEL_DATATABLE_SFIRST',
|
|
|
159 |
'sLast': 'LABEL_DATATABLE_SLAST',
|
|
|
160 |
'sNext': 'LABEL_DATATABLE_SNEXT',
|
|
|
161 |
'sPrevious': 'LABEL_DATATABLE_SPREVIOUS'
|
|
|
162 |
},
|
|
|
163 |
'oAria': {
|
|
|
164 |
'sSortAscending': ': LABEL_DATATABLE_SSORTASCENDING',
|
|
|
165 |
'sSortDescending': ':LABEL_DATATABLE_SSORTDESCENDING'
|
|
|
166 |
},
|
|
|
167 |
},
|
|
|
168 |
'drawCallback': function( settings ) {
|
|
|
169 |
NProgress.done();
|
|
|
170 |
$('button.btn-delete').confirmation({
|
|
|
171 |
rootSelector: 'button.btn-delete',
|
|
|
172 |
title : 'LABEL_ARE_YOU_SURE',
|
|
|
173 |
singleton : true,
|
|
|
174 |
btnOkLabel: 'LABEL_YES',
|
|
|
175 |
btnCancelLabel: 'LABEL_NO',
|
|
|
176 |
onConfirm: function(value) {
|
|
|
177 |
action = $(this).data('href');
|
|
|
178 |
NProgress.start();
|
|
|
179 |
$.ajax({
|
|
|
180 |
'dataType' : 'json',
|
|
|
181 |
'accept' : 'application/json',
|
|
|
182 |
'method' : 'post',
|
|
|
183 |
'url' : action,
|
|
|
184 |
}).done(function(response) {
|
|
|
185 |
if(response['success']) {
|
|
|
186 |
$.fn.showSuccess(response['data']);
|
|
|
187 |
gridTable.api().ajax.reload(null, false);
|
|
|
188 |
} else {
|
|
|
189 |
$.fn.showError(response['data']);
|
|
|
190 |
}
|
|
|
191 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
192 |
$.fn.showError(textStatus);
|
|
|
193 |
}).always(function() {
|
|
|
194 |
NProgress.done();
|
|
|
195 |
});
|
|
|
196 |
},
|
|
|
197 |
});
|
|
|
198 |
},
|
|
|
199 |
'aoColumns': [
|
|
|
200 |
{ 'mDataProp': 'type' },
|
|
|
201 |
{ 'mDataProp': 'name' },
|
|
|
202 |
{ 'mDataProp': 'status' },
|
|
|
203 |
{ 'mDataProp': 'actions' },
|
|
|
204 |
],
|
|
|
205 |
'columnDefs': [
|
|
|
206 |
{
|
|
|
207 |
'targets': 0,
|
|
|
208 |
'className' : 'text-vertical-middle',
|
|
|
209 |
},
|
|
|
210 |
{
|
|
|
211 |
'targets': 1,
|
|
|
212 |
'className' : 'text-vertical-middle',
|
|
|
213 |
},
|
|
|
214 |
{
|
|
|
215 |
'targets': -2,
|
|
|
216 |
'orderable': false,
|
|
|
217 |
'className' : 'text-center',
|
|
|
218 |
'render' : function ( data, type, row ) {
|
|
|
219 |
|
|
|
220 |
checked = data == 'a' ? ' checked="checked" ' : '';
|
|
|
221 |
return '<div class="checkbox checkbox-success">' +
|
|
|
222 |
'<input class="styled" type="checkbox" ' + checked + ' disabled="disabled">' +
|
|
|
223 |
'<label ></label></div>';
|
|
|
224 |
}
|
|
|
225 |
},
|
|
|
226 |
{
|
|
|
227 |
'targets': -1,
|
|
|
228 |
'orderable': false,
|
|
|
229 |
'render' : function ( data, type, row ) {
|
|
|
230 |
s = '';
|
|
|
231 |
|
|
|
232 |
if(allowEdit) {
|
|
|
233 |
s = s + '<button class="btn btn-primary btn-edit" data-href="' + data['link_edit']+ '" data-toggle="tooltip" title="LABEL_EDIT"><i class="fa fa-pencil"></i> LABEL_EDIT </button> ';
|
|
|
234 |
}
|
|
|
235 |
if(allowDelete) {
|
|
|
236 |
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> ';
|
|
|
237 |
}
|
|
|
238 |
return s;
|
|
|
239 |
}
|
|
|
240 |
}
|
|
|
241 |
],
|
|
|
242 |
});
|
|
|
243 |
|
|
|
244 |
|
|
|
245 |
var validator = $('#form').validate({
|
|
|
246 |
debug: true,
|
|
|
247 |
onclick: false,
|
|
|
248 |
onkeyup: false,
|
|
|
249 |
ignore: [],
|
|
|
250 |
rules: {
|
|
|
251 |
'competency_type_id': {
|
|
|
252 |
required: true,
|
|
|
253 |
},
|
|
|
254 |
'name': {
|
|
|
255 |
required: true,
|
|
|
256 |
maxlength:128,
|
|
|
257 |
},
|
|
|
258 |
'description': {
|
|
|
259 |
updateCkeditor:function() {
|
|
|
260 |
CKEDITOR.instances.description.updateElement();
|
|
|
261 |
},
|
|
|
262 |
required: true,
|
|
|
263 |
},
|
28 |
efrain |
264 |
|
1 |
www |
265 |
'status': {
|
|
|
266 |
required: false,
|
|
|
267 |
|
|
|
268 |
},
|
|
|
269 |
},
|
|
|
270 |
submitHandler: function(form)
|
|
|
271 |
{
|
|
|
272 |
$.ajax({
|
|
|
273 |
'dataType' : 'json',
|
|
|
274 |
'accept' : 'application/json',
|
|
|
275 |
'method' : 'post',
|
|
|
276 |
'url' : $('#form').attr('action'),
|
|
|
277 |
'data' : $('#form').serialize()
|
|
|
278 |
}).done(function(response) {
|
|
|
279 |
NProgress.start();
|
|
|
280 |
if(response['success']) {
|
|
|
281 |
$.fn.showSuccess(response['data']);
|
|
|
282 |
|
|
|
283 |
$('#modal').modal('hide');
|
|
|
284 |
|
|
|
285 |
|
|
|
286 |
gridTable.api().ajax.reload(null, false);
|
|
|
287 |
} else {
|
|
|
288 |
validator.resetForm();
|
|
|
289 |
if(jQuery.type(response['data']) == 'string') {
|
|
|
290 |
$.fn.showError(response['data']);
|
|
|
291 |
} else {
|
|
|
292 |
$.each(response['data'], function( fieldname, errors ) {
|
|
|
293 |
$.fn.showFormErrorValidator('#form #' + fieldname, errors);
|
|
|
294 |
});
|
|
|
295 |
}
|
|
|
296 |
}
|
|
|
297 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
298 |
$.fn.showError(textStatus);
|
|
|
299 |
}).always(function() {
|
|
|
300 |
NProgress.done();
|
|
|
301 |
});
|
|
|
302 |
return false;
|
|
|
303 |
},
|
|
|
304 |
invalidHandler: function(form, validator) {
|
|
|
305 |
|
|
|
306 |
}
|
|
|
307 |
});
|
|
|
308 |
|
|
|
309 |
$('body').on('click', 'button.btn-add', function(e) {
|
|
|
310 |
e.preventDefault();
|
|
|
311 |
|
|
|
312 |
$('span[id="form-title"]').html('LABEL_ADD');
|
|
|
313 |
$('#form').attr('action', '$routeAdd');
|
|
|
314 |
$('#form #name').val('');
|
|
|
315 |
$('#form #competency_type_id').val('').trigger('change');
|
|
|
316 |
$('#form #status').bootstrapToggle('on');
|
|
|
317 |
CKEDITOR.instances.description.setData('');
|
|
|
318 |
|
|
|
319 |
validator.resetForm();
|
|
|
320 |
$('#modal').modal('show');
|
28 |
efrain |
321 |
|
|
|
322 |
return false;
|
1 |
www |
323 |
});
|
|
|
324 |
|
|
|
325 |
$('body').on('click', 'button.btn-edit', function(e) {
|
|
|
326 |
e.preventDefault();
|
|
|
327 |
NProgress.start();
|
|
|
328 |
var action = $(this).data('href');
|
|
|
329 |
|
|
|
330 |
$.ajax({
|
|
|
331 |
'dataType' : 'json',
|
|
|
332 |
'method' : 'get',
|
|
|
333 |
'url' : action,
|
|
|
334 |
}).done(function(response) {
|
|
|
335 |
if(response['success']) {
|
|
|
336 |
|
|
|
337 |
$('span[id="form-title"]').html('LABEL_EDIT');
|
|
|
338 |
$('#form').attr('action', action);
|
|
|
339 |
$('#form #name').val(response['data']['name']);
|
|
|
340 |
$('#form #competency_type_id').val(response['data']['competency_type_id']).trigger('change');
|
|
|
341 |
$('#form #status').bootstrapToggle(response['data']['status'] == '$status_active' ? 'on' : 'off')
|
|
|
342 |
CKEDITOR.instances.description.setData(response['data']['description']);
|
|
|
343 |
validator.resetForm();
|
|
|
344 |
|
|
|
345 |
$('#modal').modal('show');
|
|
|
346 |
|
|
|
347 |
} else {
|
|
|
348 |
$.fn.showError(response['data']);
|
|
|
349 |
}
|
|
|
350 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
351 |
$.fn.showError(textStatus);
|
|
|
352 |
}).always(function() {
|
|
|
353 |
NProgress.done();
|
|
|
354 |
});
|
28 |
efrain |
355 |
|
|
|
356 |
return false;
|
1 |
www |
357 |
});
|
|
|
358 |
|
|
|
359 |
$('body').on('click', 'button.btn-refresh', function(e) {
|
|
|
360 |
e.preventDefault();
|
|
|
361 |
gridTable.api().ajax.reload(null, false);
|
28 |
efrain |
362 |
|
|
|
363 |
return false;
|
1 |
www |
364 |
});
|
28 |
efrain |
365 |
|
|
|
366 |
$('body').on('click', 'button.btn-import', function(e) {
|
|
|
367 |
e.preventDefault();
|
|
|
368 |
|
|
|
369 |
NProgress.start();
|
|
|
370 |
|
|
|
371 |
|
|
|
372 |
$.ajax({
|
|
|
373 |
'dataType' : 'json',
|
|
|
374 |
'method' : 'post',
|
|
|
375 |
'url' : '$routeImport',
|
|
|
376 |
}).done(function(response) {
|
|
|
377 |
if(response['success']) {
|
|
|
378 |
$.fn.showSuccess(response['data']);
|
|
|
379 |
gridTable.api().ajax.reload(null, false);
|
|
|
380 |
} else {
|
|
|
381 |
$.fn.showError(response['data']);
|
|
|
382 |
}
|
|
|
383 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
384 |
$.fn.showError(textStatus);
|
|
|
385 |
}).always(function() {
|
|
|
386 |
NProgress.done();
|
|
|
387 |
});
|
|
|
388 |
|
|
|
389 |
return false;
|
|
|
390 |
});
|
1 |
www |
391 |
|
|
|
392 |
|
|
|
393 |
$('body').on('click', 'button.btn-cancel', function(e) {
|
|
|
394 |
e.preventDefault();
|
|
|
395 |
$('#modal').modal('hide');
|
|
|
396 |
});
|
|
|
397 |
|
|
|
398 |
$('#form #competency_type_id').select2({
|
|
|
399 |
theme: 'bootstrap4',
|
|
|
400 |
width: '100%',
|
|
|
401 |
});
|
|
|
402 |
|
|
|
403 |
|
|
|
404 |
|
|
|
405 |
$('#form #status').bootstrapToggle({'on' : 'LABEL_ACTIVE', 'off' : 'LABEL_INACTIVE', 'width' : '160px', 'height' : '40px'});
|
28 |
efrain |
406 |
CKEDITOR.replace( 'description' );
|
1 |
www |
407 |
});
|
|
|
408 |
JS;
|
|
|
409 |
$this->inlineScript()->captureEnd();
|
|
|
410 |
?>
|
|
|
411 |
|
|
|
412 |
|
|
|
413 |
|
|
|
414 |
|
|
|
415 |
|
|
|
416 |
<!-- Content Header (Page header) -->
|
|
|
417 |
<section class="content-header">
|
|
|
418 |
<div class="container-fluid">
|
|
|
419 |
<div class="row mb-2">
|
|
|
420 |
<div class="col-sm-12">
|
|
|
421 |
<h1>LABEL_COMPETENCIES</h1>
|
|
|
422 |
</div>
|
|
|
423 |
</div>
|
|
|
424 |
</div><!-- /.container-fluid -->
|
|
|
425 |
</section>
|
|
|
426 |
|
|
|
427 |
<section class="content">
|
|
|
428 |
<div class="container-fluid">
|
|
|
429 |
<div class="row">
|
|
|
430 |
<div class="col-12">
|
|
|
431 |
<div class="card">
|
|
|
432 |
<div class="card-body">
|
20 |
steven |
433 |
<table id="gridTable" class="table table-hover">
|
1 |
www |
434 |
<thead>
|
|
|
435 |
<tr>
|
|
|
436 |
<th>LABEL_TYPE</th>
|
|
|
437 |
<th>LABEL_NAME</th>
|
|
|
438 |
<th>LABEL_ACTIVE</th>
|
|
|
439 |
<th>LABEL_ACTIONS</th>
|
|
|
440 |
</tr>
|
|
|
441 |
</thead>
|
|
|
442 |
<tbody>
|
|
|
443 |
</tbody>
|
|
|
444 |
</table>
|
|
|
445 |
</div>
|
|
|
446 |
<div class="card-footer clearfix">
|
|
|
447 |
<div style="float:right;">
|
|
|
448 |
<button type="button" class="btn btn-info btn-refresh"><i class="fa fa-refresh"></i> LABEL_REFRESH </button>
|
28 |
efrain |
449 |
<?php if($allowImport) : ?>
|
|
|
450 |
<button type="button" class="btn btn-primary btn-import"><i class="fa fa-upload"></i> LABEL_IMPORT </button>
|
|
|
451 |
<?php endif; ?>
|
1 |
www |
452 |
<?php if($allowAdd) : ?>
|
|
|
453 |
<button type="button" class="btn btn-primary btn-add"><i class="fa fa-plus"></i> LABEL_ADD </button>
|
|
|
454 |
<?php endif; ?>
|
|
|
455 |
</div>
|
|
|
456 |
</div>
|
|
|
457 |
</div>
|
|
|
458 |
</div>
|
|
|
459 |
</div>
|
|
|
460 |
</div>
|
|
|
461 |
</section>
|
|
|
462 |
|
|
|
463 |
<!-- The Modal -->
|
|
|
464 |
<div class="modal" id="modal">
|
|
|
465 |
<div class="modal-dialog modal-xl">
|
|
|
466 |
<div class="modal-content">
|
|
|
467 |
|
|
|
468 |
<!-- Modal Header -->
|
|
|
469 |
<div class="modal-header">
|
|
|
470 |
<h4 class="modal-title">LABEL_COMPETENCIES - <span id="form-title"></span></h4>
|
|
|
471 |
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
|
472 |
</div>
|
|
|
473 |
|
|
|
474 |
<!-- Modal body -->
|
|
|
475 |
<div class="modal-body">
|
|
|
476 |
<?php
|
|
|
477 |
$form = $this->form;
|
|
|
478 |
$form->setAttributes([
|
|
|
479 |
'method' => 'post',
|
|
|
480 |
'name' => 'form',
|
|
|
481 |
'id' => 'form'
|
|
|
482 |
]);
|
|
|
483 |
|
|
|
484 |
$form->prepare();
|
|
|
485 |
echo $this->form()->openTag($form);
|
47 |
steven |
486 |
?>
|
|
|
487 |
<div
|
|
|
488 |
class="row"
|
|
|
489 |
>
|
58 |
steven |
490 |
<div class="col-md-4 col-sm-12 col-12">
|
49 |
steven |
491 |
<div class="form-group m-0">
|
47 |
steven |
492 |
<?php
|
49 |
steven |
493 |
$element = $form->get('competency_type_id');
|
|
|
494 |
$element->setOptions(['label' => 'LABEL_TYPE']);
|
|
|
495 |
|
|
|
496 |
echo $this->formLabel($element);
|
|
|
497 |
echo $this->formSelect($element);
|
47 |
steven |
498 |
?>
|
|
|
499 |
</div>
|
|
|
500 |
</div>
|
58 |
steven |
501 |
<div class="col-md-6 col-sm-12 col-12">
|
49 |
steven |
502 |
<div class="form-group m-0">
|
47 |
steven |
503 |
<?php
|
49 |
steven |
504 |
$element = $form->get('name');
|
|
|
505 |
$element->setOptions(['label' => 'LABEL_NAME']);
|
|
|
506 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
507 |
|
|
|
508 |
echo $this->formLabel($element);
|
|
|
509 |
echo $this->formText($element);
|
47 |
steven |
510 |
?>
|
|
|
511 |
</div>
|
|
|
512 |
</div>
|
|
|
513 |
<div
|
|
|
514 |
class="col-md col-sm-12 col-12 d-flex align-items-center justify-content-center"
|
|
|
515 |
>
|
|
|
516 |
<div class="form-group m-0">
|
|
|
517 |
<label>LABEL_STATUS</label>
|
|
|
518 |
<br />
|
|
|
519 |
<?php
|
|
|
520 |
$element = $form->get('status');
|
|
|
521 |
$element->setOptions(['label' => 'LABEL_STATUS']);
|
|
|
522 |
// echo $this->formLabel($element);
|
|
|
523 |
echo $this->formCheckbox($element);
|
|
|
524 |
?>
|
|
|
525 |
</div>
|
|
|
526 |
</div>
|
48 |
steven |
527 |
</div>
|
|
|
528 |
<div
|
|
|
529 |
class="row"
|
|
|
530 |
>
|
|
|
531 |
<div class="col-md col-sm-12 col-12">
|
|
|
532 |
<div class="form-group">
|
|
|
533 |
<?php
|
|
|
534 |
$element = $form->get('description');
|
|
|
535 |
$element->setOptions(['label' => 'LABEL_DESCRIPTION']);
|
|
|
536 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
537 |
|
|
|
538 |
echo $this->formLabel($element);
|
|
|
539 |
echo $this->formTextArea($element);
|
|
|
540 |
?>
|
|
|
541 |
</div>
|
|
|
542 |
</div>
|
858 |
geraldo |
543 |
|
48 |
steven |
544 |
</div>
|
|
|
545 |
<?php echo $this->form()->closeTag($form); ?>
|
861 |
geraldo |
546 |
<br/>
|
860 |
geraldo |
547 |
<div class="row">
|
|
|
548 |
<div class="col-xs-12 col-md-12 text-right">
|
861 |
geraldo |
549 |
<button class="btn btn-primary" id="btn-add-section" data-toggle="tooltip" title="LABEL_ADD LABEL_CONDUCT"><i class="fa fa-plus" aria-hidden="true"></i> LABEL_ADD LABEL_CONDUCT</button>
|
860 |
geraldo |
550 |
</div>
|
|
|
551 |
</div>
|
|
|
552 |
<br />
|
|
|
553 |
<div class="row">
|
|
|
554 |
<div class="col-xs-12 col-md-12">
|
|
|
555 |
<div class="panel-group" id="rows"></div>
|
|
|
556 |
</div>
|
|
|
557 |
</div>
|
861 |
geraldo |
558 |
</div>
|
|
|
559 |
|
48 |
steven |
560 |
|
1 |
www |
561 |
<!-- Modal footer -->
|
48 |
steven |
562 |
<div class="modal-footer">
|
|
|
563 |
<button type="submit" form="form" class="btn btn-primary">LABEL_SAVE</button>
|
1 |
www |
564 |
<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
|
|
|
565 |
</div>
|
|
|
566 |
|
|
|
567 |
</div>
|
|
|
568 |
</div>
|
|
|
569 |
</div>
|
|
|
570 |
|
|
|
571 |
|
861 |
geraldo |
572 |
<div id="modal-conduct" class="modal" tabindex="-1" role="dialog">
|
|
|
573 |
<div class="modal-dialog modal-lg" role="document">
|
|
|
574 |
<form action="#" name="form-conduct" id="form-conduct">
|
|
|
575 |
<input type="hidden" name="conduct-slug" id="conduct-slug" value="" />
|
|
|
576 |
<div class="modal-content">
|
|
|
577 |
<div class="modal-header">
|
|
|
578 |
<h4 class="modal-title">LABEL_ADD LABEL_CONDUCT</h4>
|
|
|
579 |
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
580 |
<span aria-hidden="true">×</span>
|
|
|
581 |
</button>
|
|
|
582 |
</div>
|
|
|
583 |
<div class="modal-body">
|
|
|
584 |
<div class="form-group">
|
|
|
585 |
<label for="conduct-name">LABEL_DESCRIPTION</label>
|
|
|
586 |
<input type="text" name="conduct-name" id="conduct-name" class="form-control" maxlength="50" value="" />
|
|
|
587 |
</div>
|
|
|
588 |
<div class="form-group">
|
|
|
589 |
<label for="conduct-value">LABEL_NIVEL</label>
|
|
|
590 |
<select class="form-control">
|
|
|
591 |
<option value="0">No aplica</option>
|
|
|
592 |
<option value="1" selected="">Uno</option>
|
|
|
593 |
<option value="2">Dos</option>
|
|
|
594 |
<option value="3">Tres</option>
|
|
|
595 |
<option value="4">Cuatro</option>
|
|
|
596 |
</select>
|
|
|
597 |
</div>
|
|
|
598 |
</div>
|
|
|
599 |
<div class="modal-footer">
|
|
|
600 |
<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
|
|
|
601 |
<button type="button" class="btn btn-secondary" data-dismiss="modal">LABEL_CLOSE</button>
|
|
|
602 |
</div>
|
|
|
603 |
</div>
|
|
|
604 |
</form>
|
|
|
605 |
</div>
|
|
|
606 |
</div>
|
|
|
607 |
|
1 |
www |
608 |
|