Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 12315 | Rev 15461 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 12315 Rev 15457
Línea 6... Línea 6...
6
 
6
 
7
$routeDashboard = $this->url('dashboard');
7
$routeDashboard = $this->url('dashboard');
8
$routeDatatable = $this->url('recruitment-and-selection/vacancies');
8
$routeDatatable = $this->url('recruitment-and-selection/vacancies');
Línea -... Línea 9...
-
 
9
$routeAdd       = $this->url('recruitment-and-selection/vacancies/add');
9
$routeAdd       = $this->url('recruitment-and-selection/vacancies/add');
10
 
10
 
11
 
11
$allowAdd = $acl->isAllowed($roleName, 'recruitment-and-selection/vacancies/add') ? 1 : 0;
12
$allowAdd = $acl->isAllowed($roleName, 'recruitment-and-selection/vacancies/add') ? 1 : 0;
Línea -... Línea 13...
-
 
13
$allowEdit = $acl->isAllowed($roleName, 'recruitment-and-selection/vacancies/edit') ? 1 : 0;
-
 
14
$allowDelete = $acl->isAllowed($roleName, 'recruitment-and-selection/vacancies/delete') ? 1 : 0;
-
 
15
 
-
 
16
 
-
 
17
$this->inlineScript()->appendFile('https://maps.googleapis.com/maps/api/js?key=' . $google_map_key . '&libraries=places');
-
 
18
 
-
 
19
 
-
 
20
$this->inlineScript()->appendFile($this->basePath('plugins/ckeditor/ckeditor.js'));
-
 
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'));
12
$allowEdit = $acl->isAllowed($roleName, 'recruitment-and-selection/vacancies/edit') ? 1 : 0;
36
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/dataTables.responsive.min.js'));
13
$allowDelete = $acl->isAllowed($roleName, 'recruitment-and-selection/vacancies/delete') ? 1 : 0;
37
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/responsive.bootstrap4.min.js'));
Línea 14... Línea 38...
14
 
38
 
Línea -... Línea 39...
-
 
39
 
-
 
40
$this->headLink()->appendStylesheet($this->basePath('plugins/select2/css/select2.min.css'));
-
 
41
$this->headLink()->appendStylesheet($this->basePath('plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css'));
-
 
42
 
-
 
43
$this->inlineScript()->appendFile($this->basePath('plugins/select2/js/select2.full.min.js'));
15
 
44
 
16
$this->headLink()->appendStylesheet($this->basePath('plugins/select2/css/select2.min.css'));
45
$this->inlineScript()->appendFile($this->basePath('plugins/moment/moment-with-locales.min.js'));
Línea -... Línea 46...
-
 
46
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-datetimepicker/css/bootstrap-datetimepicker.css'));
-
 
47
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js'));
-
 
48
 
-
 
49
 
-
 
50
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap4-toggle/css/bootstrap4-toggle.min.css'));
17
$this->headLink()->appendStylesheet($this->basePath('plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css'));
51
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap4-toggle/js/bootstrap4-toggle.min.js'));
-
 
52
 
-
 
53
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-confirmation/dist/bootstrap-confirmation.js'));
18
 
54
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-checkbox/awesome-bootstrap-checkbox.css'));
-
 
55
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-input-number/input-number-format.jquery.js'));
-
 
56
 
-
 
57
// bootbox Alert //
19
$this->inlineScript()->appendFile($this->basePath('plugins/select2/js/select2.full.min.js'));
58
$this->inlineScript()->appendFile($this->basePath('plugins/bootbox/bootbox.min.js'));
-
 
59
 
-
 
60
// JsRender //
-
 
61
$this->inlineScript()->appendFile($this->basePath('plugins/jsrender/jsrender.min.js'));
-
 
62
 
20
 
63
 
-
 
64
// Page Styles
21
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap4-toggle/css/bootstrap4-toggle.min.css'));
65
$this->headLink()->appendStylesheet($this->basePath('css/pages/self-evaluation.css'));
22
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap4-toggle/js/bootstrap4-toggle.min.js'));
66
 
23
 
67
 
-
 
68
$status_active = \LeadersLinked\Model\RecruitmentSelectionVacancy::STATUS_ACTIVE;
-
 
69
$status_inactive = \LeadersLinked\Model\RecruitmentSelectionVacancy::STATUS_INACTIVE;
-
 
70
 
-
 
71
$this->inlineScript()->captureStart();
-
 
72
echo <<<JS
-
 
73
jQuery(document).ready(function($) {
-
 
74
    var allowEdit = $allowEdit;
-
 
75
    var allowDelete = $allowDelete;
-
 
76
 
24
$jsonJobCategories = json_encode($jobCategories);
77
    var gridTable = $('#gridTable').dataTable({
-
 
78
        'processing': true,
-
 
79
        'serverSide': true,
-
 
80
        'searching': true,
-
 
81
        'order': [
-
 
82
            [0, 'asc']
-
 
83
        ],
25
$jsonIndustries = json_encode($industries);
84
        'ordering': true,
26
$jsonJobDescritions = json_encode($jobDescritions);
85
        'ordenable': true,
-
 
86
        'responsive': true,
-
 
87
        'select': false,
-
 
88
        'paging': true,
27
 
89
        'pagingType': 'simple_numbers',
-
 
90
        'ajax': {
-
 
91
            'url': '$routeDatatable',
-
 
92
            'type': 'get',
-
 
93
            'beforeSend': function(request) {
-
 
94
                NProgress.start();
-
 
95
            },
-
 
96
            'dataFilter': function(response) {
-
 
97
                var response = jQuery.parseJSON(response);
-
 
98
                var json = {};
-
 
99
                json.recordsTotal = 0;
-
 
100
                json.recordsFiltered = 0;
-
 
101
                json.data = [];
-
 
102
                if (response.success) {
-
 
103
                    json.recordsTotal = response.data.total;
-
 
104
                    json.recordsFiltered = response.data.total;
-
 
105
                    json.data = response.data.items;
-
 
106
                } else {
-
 
107
                    $.fn.showError(response.data)
-
 
108
                }
-
 
109
                return JSON.stringify(json);
-
 
110
            }
-
 
111
        },
-
 
112
        'language': {
-
 
113
            'sProcessing': 'LABEL_DATATABLE_SPROCESSING',
-
 
114
            'sLengthMenu': 'LABEL_DATATABLE_SLENGTHMENU',
-
 
115
            'sZeroRecords': 'LABEL_DATATABLE_SZERORECORDS',
-
 
116
            'sEmptyTable': 'LABEL_DATATABLE_SEMPTYTABLE',
-
 
117
            'sInfo': 'LABEL_DATATABLE_SINFO',
-
 
118
            'sInfoEmpty': 'LABEL_DATATABLE_SINFOEMPTY',
-
 
119
            'sInfoFiltered': 'LABEL_DATATABLE_SINFOFILTERED',
-
 
120
            'sInfoPostFix': '',
-
 
121
            'sSearch': 'LABEL_DATATABLE_SSEARCH',
-
 
122
            'sUrl': '',
-
 
123
            'sInfoThousands': ',',
-
 
124
            'sLoadingRecords': 'LABEL_DATATABLE_SLOADINGRECORDS',
-
 
125
            'oPaginate': {
-
 
126
                'sFirst': 'LABEL_DATATABLE_SFIRST',
-
 
127
                'sLast': 'LABEL_DATATABLE_SLAST',
-
 
128
                'sNext': 'LABEL_DATATABLE_SNEXT',
-
 
129
                'sPrevious': 'LABEL_DATATABLE_SPREVIOUS'
-
 
130
            },
-
 
131
            'oAria': {
-
 
132
                'sSortAscending': ': LABEL_DATATABLE_SSORTASCENDING',
-
 
133
                'sSortDescending': ':LABEL_DATATABLE_SSORTDESCENDING'
28
$js = <<<JS
134
            },
-
 
135
        },
-
 
136
        'drawCallback': function(settings) {
-
 
137
            NProgress.done();
-
 
138
            $('button.btn-delete').confirmation({
-
 
139
                rootSelector: 'button.btn-delete',
-
 
140
                title: 'LABEL_ARE_YOU_SURE',
-
 
141
                singleton: true,
-
 
142
                btnOkLabel: 'LABEL_YES',
-
 
143
                btnCancelLabel: 'LABEL_NO',
-
 
144
                onConfirm: function(value) {
-
 
145
                    action = $(this).data('href');
-
 
146
                    NProgress.start();
-
 
147
                    $.ajax({
-
 
148
                        'dataType': 'json',
-
 
149
                        'accept': 'application/json',
-
 
150
                        'method': 'post',
-
 
151
                        'url': action,
-
 
152
                    }).done(function(response) {
-
 
153
                        if (response['success']) {
-
 
154
                            $.fn.showSuccess(response['data']);
-
 
155
                            gridTable.api().ajax.reload(null, false);
-
 
156
                        } else {
-
 
157
                            $.fn.showError(response['data']);
-
 
158
                        }
-
 
159
                    }).fail(function(jqXHR, textStatus, errorThrown) {
-
 
160
                        $.fn.showError(textStatus);
-
 
161
                    }).always(function() {
29
	const backendVariables= {
162
                        NProgress.done();
-
 
163
                    });
-
 
164
                },
-
 
165
            });
-
 
166
        },
30
		dashboard_link: "$routeDashboard",
167
         'aoColumns': [
-
 
168
                { 'mDataProp': 'name' },
-
 
169
                { 'mDataProp': 'job_description' },
-
 
170
                { 'mDataProp': 'last_date' },
-
 
171
                { 'mDataProp': 'status' },
-
 
172
                { 'mDataProp': 'actions' },
-
 
173
            ],
-
 
174
        'columnDefs': [
-
 
175
            {
-
 
176
                'targets': 0,
-
 
177
                'className': 'text-vertical-middle',
-
 
178
            },
-
 
179
            {
-
 
180
                'targets': 1,
-
 
181
                'className': 'text-vertical-middle',
-
 
182
            },
-
 
183
            {
-
 
184
                'targets': 2,
-
 
185
                'className': 'text-vertical-middle',
31
        add_link: "$routeAdd",
186
            },
-
 
187
             {
-
 
188
                'targets': 3,
32
        table_link: "$routeDatatable",
189
                'className': 'text-vertical-middle',
-
 
190
            },
-
 
191
            {
33
        googleApiKey: "$google_map_key",
192
                'targets': -1,
-
 
193
                'orderable': false,
-
 
194
                'render': function(data, type, row) {
-
 
195
                    s = '';
-
 
196
                    if (allowEdit) {
-
 
197
                        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>&nbsp;';
-
 
198
                    }
-
 
199
                    if (allowDelete) {
-
 
200
                        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>&nbsp;';
-
 
201
                    }
-
 
202
                    return s;
-
 
203
                }
-
 
204
            }
-
 
205
        ],
-
 
206
    });
-
 
207
 
-
 
208
 
-
 
209
    $('body').on('click', 'button.btn-edit', function(e) {
-
 
210
        e.preventDefault();
-
 
211
        form_id = $(this).data('id')
-
 
212
        var action = $(this).data('href');
-
 
213
        $.ajax({
-
 
214
            'dataType': 'json',
-
 
215
            'accept': 'application/json',
-
 
216
            'method': 'get',
-
 
217
            'url': action,
-
 
218
        }).done(function(response) {
-
 
219
            if (response['success']) {
-
 
220
                const lastDate = new Date(Date.parse(response['data']['last_date'] + " 00:00:00"));
-
 
221
 
-
 
222
                $("#rows").html('');
-
 
223
                sections = [];
-
 
224
                $('#form-main').attr('action', action);
-
 
225
                $('#form-main #name').val(response['data']['name']);
-
 
226
                $('#form-main #job_description_id').val(response['data']['job_description_id']).trigger('change');
-
 
227
                $('#form-main #location_search').val(response['data']['location_search']);
-
 
228
                $('#form-main #formatted_address').val(response['data']['formatted_address']);
-
 
229
                $('#form-main #address1').val(response['data']['address1']);
-
 
230
                $('#form-main #address2').val(response['data']['address2']);
-
 
231
                $('#form-main #city1').val(response['data']['city1']);
-
 
232
                $('#form-main #city2').val(response['data']['city2']);
-
 
233
                $('#form-main #state').val(response['data']['state']);
-
 
234
                $('#form-main #country').val(response['data']['country']);
-
 
235
                $('#form-main #postal_code').val(response['data']['postal_code']);
-
 
236
                $('#form-main #latitude').val(response['data']['latitude']);
-
 
237
                $('#form-main #longitude').val(response['data']['longitude']);
-
 
238
                $('#form-main #job_category_id').val(response['data']['job_category_id']).trigger('change');
-
 
239
                $('#form-main #industry_id').val(response['data']['industry_id']).trigger('change');
-
 
240
                $('#form-main #last_date').val(
-
 
241
                    lastDate.getDate() + "/" + String(lastDate.getMonth() + 1).padStart(2, '0') + "/" + lastDate.getFullYear()
-
 
242
                ).trigger('change');
-
 
243
                $('#form-main #status').val(response['data']['status']);
-
 
244
                CKEDITOR.instances['description'].setData(response['data']['description']);
-
 
245
                $('#row-list').hide();
-
 
246
                $('#row-form').show();
-
 
247
                
-
 
248
            } else {
-
 
249
                $.fn.showError(response['message']);
-
 
250
            }
-
 
251
        }).fail(function(jqXHR, textStatus, errorThrown) {
-
 
252
            $.fn.showError(textStatus);
-
 
253
        });
-
 
254
    });
-
 
255
  
-
 
256
    $('#form-main #last_date').datetimepicker({
-
 
257
        locale: 'es',
-
 
258
        format: 'DD/MM/YYYY'
-
 
259
    });
-
 
260
 
-
 
261
    $('button.btn-add').click(function(e) {
-
 
262
 
-
 
263
        $('#form-main').attr('action', '$routeAdd');
-
 
264
        $('#form-main #name').val('');
-
 
265
        $('#form-main #job_description_id').val('').trigger('change');
-
 
266
        $('#form-main #location_search').val('');
-
 
267
        $('#form-main #job_category_id').val('').trigger('change');
-
 
268
        $('#form-main #industry_id').val('').trigger('change');
-
 
269
        $('#form-main #last_date').val('');
-
 
270
        $('#form-main #status').val('$status_active');
-
 
271
 
-
 
272
        CKEDITOR.instances['description'].setData('');
-
 
273
       
-
 
274
        $('#row-list').hide();
-
 
275
        $('#row-form').show();
-
 
276
        $('#form-main #name').focus();
-
 
277
        return;
-
 
278
    });
-
 
279
 
-
 
280
 
-
 
281
    $.validator.addMethod('checkLocation', function (value, element, param) {
-
 
282
        var otherElement = $(param);
-
 
283
 
-
 
284
        return $.trim(otherElement.val()).length > 0;
-
 
285
    }, 'ERROR_PLACED_AUTOCOMPLETE_DOES_NOT_CONTAIN_GEOMETRY');
-
 
286
 
-
 
287
    var autocompleteLocation = new google.maps.places.Autocomplete(
-
 
288
        (document.getElementById('location_search')),
-
 
289
        {types: ['(cities)']}
-
 
290
    );
-
 
291
 
-
 
292
    $.fn.fillInAddressLocation = function() {
-
 
293
        var place = autocompleteLocation.getPlace();
-
 
294
        if (!place.geometry) {
-
 
295
            $.fn.showError('ERROR_PLACED_AUTOCOMPLETE_DOES_NOT_CONTAIN_GEOMETRY')
-
 
296
            return;
-
 
297
        } else {
-
 
298
            address1 = '';
-
 
299
            address2 = '';
-
 
300
            city1 = '';
-
 
301
            city2 = '';
-
 
302
            state = '';
-
 
303
            country = '';
-
 
304
            postal_code = '';
-
 
305
            
-
 
306
            formatted_address = place.formatted_address;
-
 
307
            latitude = place.geometry.location.lat();
-
 
308
            longitude = place.geometry.location.lng();
-
 
309
            var arrAddress = place.address_components;
-
 
310
            
-
 
311
            $.each(arrAddress, function(i, address_component) {
-
 
312
                if (address_component.types[0] == "route") {
-
 
313
                    address1 = address_component.long_name;
-
 
314
                }
-
 
315
                if (address_component.types[0] == "sublocality") {
-
 
316
                    address2 = address_component.long_name;
-
 
317
                }
-
 
318
                if (address_component.types[0] == "locality") {
-
 
319
                    city1 = address_component.long_name;
-
 
320
                }
-
 
321
                if (address_component.types[0] == "administrative_area_level_2") {
-
 
322
                    city2 = address_component.long_name;
-
 
323
                }
-
 
324
                if (address_component.types[0] == "administrative_area_level_1") {
-
 
325
                    state = address_component.long_name;
-
 
326
                }
-
 
327
                if (address_component.types[0] == "country") {
-
 
328
                    country = address_component.long_name;
-
 
329
                }
-
 
330
                if (address_component.types[0] == "postal_code") {
-
 
331
                    postal_code = address_component.long_name;
-
 
332
                }
-
 
333
            });
-
 
334
            
-
 
335
            $('#form-main #formatted_address').val(formatted_address);
-
 
336
            $('#form-main #address1').val(address1);
-
 
337
            $('#form-main #address2').val(address2);
34
        jobCategories: $jsonJobCategories,
338
            $('#form-main #city1').val(city1);
-
 
339
            $('#form-main #city2').val(city2);
-
 
340
            $('#form-main #state').val(state);
-
 
341
            $('#form-main #country').val(country);
-
 
342
            $('#form-main #postal_code').val(postal_code);
-
 
343
            $('#form-main #latitude').val(latitude);
-
 
344
            $('#form-main #longitude').val(longitude);
-
 
345
        }
-
 
346
    }
-
 
347
 
-
 
348
    
-
 
349
    $('button.btn-edit-cancel').click(function(e) {
-
 
350
        $('#row-form').hide();
-
 
351
        $('#row-list').show();
-
 
352
        return;
-
 
353
    });
-
 
354
 
-
 
355
    $('body').on('click', 'button.btn-refresh', function (e) {
-
 
356
        e.preventDefault();
-
 
357
        gridTable.api().ajax.reload(null, false);
-
 
358
 
-
 
359
    });
-
 
360
 
-
 
361
    $('#job_description_id').select2({
-
 
362
        theme: 'bootstrap4',
-
 
363
        width: '100%',
-
 
364
    });
-
 
365
    
-
 
366
 
-
 
367
    $('#job_category_id').select2({
-
 
368
        theme: 'bootstrap4',
-
 
369
        width: '100%',
-
 
370
    });
-
 
371
 
-
 
372
 
-
 
373
    $('#industry_id').select2({
-
 
374
        theme: 'bootstrap4',
-
 
375
        width: '100%',
-
 
376
    });
-
 
377
 
-
 
378
 
-
 
379
    $('#status').bootstrapToggle({
-
 
380
        'on': 'LABEL_ACTIVE',
-
 
381
        'off': 'LABEL_INACTIVE',
-
 
382
        'width': '160px',
-
 
383
        'height': '40px'
-
 
384
    });
-
 
385
   
-
 
386
 
-
 
387
    var validatorLocation = $('#location_search').validate({
-
 
388
        debug: true,
-
 
389
        onclick: false,
-
 
390
        onkeyup: false,
-
 
391
        onfocusout: false,
-
 
392
        ignore: [],
-
 
393
        rules: {
-
 
394
            'location_search': {
-
 
395
                required: true,
-
 
396
                checkLocation: '#location_search #latitude'
-
 
397
            }
-
 
398
        },
-
 
399
        submitHandler: function(form)
-
 
400
        {
-
 
401
            NProgress.start();
-
 
402
            $.ajax({
-
 
403
                'dataType'  : 'json',
-
 
404
                'accept'    : 'application/json',
-
 
405
                'method'    : 'post',
-
 
406
                'url'       :  route_location,
-
 
407
                'data'      :  $('#location_search').serialize(),
-
 
408
            }).done(function(response) {
-
 
409
 
-
 
410
 
-
 
411
 
-
 
412
                if(response['success']) {
-
 
413
                    $('#overview-location').html(response.data);
-
 
414
                    $("#location-box").modal('hide');
-
 
415
                } else {
-
 
416
                    validatorLocation.resetForm();
-
 
417
                    $.fn.showError(response['data']);
-
 
418
                }
-
 
419
            }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
420
                $.fn.showError(textStatus);
-
 
421
            }).always(function() {
-
 
422
                NProgress.done();
-
 
423
            });
-
 
424
            return false;
-
 
425
        },
-
 
426
        invalidHandler: function(form, validator) {
-
 
427
        
-
 
428
        }
-
 
429
    });
-
 
430
 
-
 
431
    $('body').on('click', 'a.btn-location-edit', function(e) {
-
 
432
        e.preventDefault();
-
 
433
        
-
 
434
        $('#form-main #location_search').val('');
-
 
435
        $('#form-main #formatted_address').val('');
-
 
436
        $('#form-main #address1').val('');
-
 
437
        $('#form-main #address2').val('');
-
 
438
        $('#form-main #country').val('');
-
 
439
        $('#form-main #state').val('');
-
 
440
        $('#form-main #city1').val('');
-
 
441
        $('#form-main #city2').val('');
-
 
442
        $('#form-main #postal_code').val('');
-
 
443
        $('#form-main #latitude').val('');
-
 
444
        $('#form-main #longitude').val('');
-
 
445
        validatorLocation.resetForm();
-
 
446
        
-
 
447
        $("#location-box").modal('show');
-
 
448
    });
-
 
449
    
-
 
450
    $('.btn-location-close').on("click", function(e){
-
 
451
        e.preventDefault();
35
        industries: $jsonIndustries,
452
        
-
 
453
        $("#location-box").modal('hide');
-
 
454
        return false;
-
 
455
    });
-
 
456
 
-
 
457
    autocompleteLocation.addListener('place_changed', $.fn.fillInAddressLocation);
-
 
458
 
-
 
459
 
-
 
460
    CKEDITOR.replace('description', {
-
 
461
        toolbar: [
-
 
462
                    { name: 'editing', items: ['Scayt'] },
-
 
463
                    { name: 'links', items: ['Link', 'Unlink'] },
-
 
464
                    { name: 'paragraph', items: ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote'] },
-
 
465
                    { name: 'basicstyles', items: ['Bold', 'Italic', 'Strike', 'RemoveFormat'] },
-
 
466
                    '/',
-
 
467
                    { name: 'insert', items: ['Image', 'Table', 'HorizontalRule', 'SpecialChar'] },
36
        jobDescritions: $jsonJobDescritions, 
468
                    { name: 'styles', items: ['Styles', 'Format'] },
Línea 37... Línea 469...
37
        permisions: {
469
                    { name: 'tools', items: ['Maximize'] }
38
            allowAdd: $allowAdd,
-
 
39
            allowEdit: $allowEdit,
-
 
Línea 40... Línea 470...
40
            allowDelete: $allowDelete
470
                ],
41
        }
471
                removePlugins: 'elementspath,Anchor',
Línea 42... Línea 472...
42
	}	
472
                heigth: 100
43
JS;
-
 
44
 
473
    });
-
 
474
  });
-
 
475
JS;
-
 
476
 
-
 
477
$this->inlineScript()->captureEnd();
-
 
478
 
-
 
479
?>
-
 
480
<!-- Content Header (Page header) -->
-
 
481
 
-
 
482
<div id="recruitment_and_selection-vacancies">
-
 
483
</div>
-
 
484
<section class="content-header">
-
 
485
   <div class="container-fluid">
-
 
486
      <div class="row mb-2">
-
 
487
         <div class="col-sm-12">
-
 
488
            <h1>LABEL_RECRUITMENT_AND_SELECTION</h1>
-
 
489
         </div>
-
 
490
      </div>
-
 
491
   </div>
-
 
492
   <!-- /.container-fluid -->
-
 
493
</section>
-
 
494
<section class="content">
-
 
495
    <div class="container-fluid" id="row-list">
-
 
496
		<div class="row">
-
 
497
        	<div class="col-12">
-
 
498
            	<div class="card">
-
 
499
                	<div class="card-body">
-
 
500
                   		<table id="gridTable" class="table   table-hover">
-
 
501
                      		<thead>
-
 
502
                         		<tr>
-
 
503
                            		<th>LABEL_NAME</th>
-
 
504
                            		<th>LABEL_JOB_DESCRIPTION</th>
-
 
505
                            		<th>LABEL_LAST_DATE</th>
-
 
506
                            		<th>LABEL_STATUS</th>
-
 
507
                            		<th>LABEL_ACTIONS</th>
-
 
508
                         		</tr>
-
 
509
                      		</thead>
-
 
510
                      		<tbody>
-
 
511
                      		</tbody>
-
 
512
                   		</table>
-
 
513
                	</div>
-
 
514
                	<div class="card-footer clearfix">
-
 
515
                   		<div style="float:right;">
-
 
516
                      		<button type="button" class="btn btn-info btn-refresh"><i class="fa fa-refresh"></i> LABEL_REFRESH </button>
-
 
517
                      		<?php if ($allowAdd) : ?>
-
 
518
                      		<button type="button" class="btn btn-primary btn-add"><i class="fa fa-plus"></i> LABEL_ADD </button>
-
 
519
                      		<?php endif; ?>
-
 
520
                   		</div>
-
 
521
                	</div>
-
 
522
             	</div>
-
 
523
			</div>
-
 
524
		</div>
-
 
525
	</div>
-
 
526
    
-
 
527
    
-
 
528
<!-- Create/Edit Form -->
-
 
529
<div class="row" id="row-form" style="display: none; padding: 16px;">
-
 
530
   <div class="col-xs-12 col-md-12">
-
 
531
        <?php 
-
 
532
        $form = $this->form;
-
 
533
        $form->setAttributes([
-
 
534
            'method'    => 'post',
-
 
535
            'name'      => 'form-main',
-
 
536
            'id'        => 'form-main'
-
 
537
        ]);
-
 
538
    
-
 
539
        $form->prepare();
-
 
540
        echo $this->form()->openTag($form);
-
 
541
        
-
 
542
        $fields = ['formatted_address',
-
 
543
        'address1',
-
 
544
        'address2',
-
 
545
        'country',
-
 
546
        'state',
-
 
547
        'city1',
-
 
548
        'city2',
-
 
549
        'postal_code',
-
 
550
        'latitude',
-
 
551
        'longitude',
-
 
552
        ];
-
 
553
        
-
 
554
        foreach($fields as $field) 
-
 
555
        {
-
 
556
            $element = $form->get($field);
-
 
557
            echo $this->formHidden($element);
-
 
558
        }
-
 
559
                    
-
 
560
     ?>
-
 
561
        <div class="form-group">
-
 
562
                 <?php 
-
 
563
             $element = $form->get('name');
-
 
564
             $element->setAttributes(['class' => 'form-control']);    
-
 
565
             $element->setOptions(['label' => 'LABEL_NAME']);
-
 
566
                                                            
-
 
567
             echo $this->formLabel($element);
-
 
568
             echo $this->formText($element);
-
 
569
            ?>
-
 
570
          </div>
-
 
571
                 <div class="form-group">
-
 
572
                 <?php 
-
 
573
             $element = $form->get('job_description_id');
-
 
574
             $element->setAttributes(['class' => 'form-control']);    
-
 
575
             $element->setOptions(['label' => 'LABEL_POSITION_EVALUATED']);
-
 
576
                                                            
-
 
577
             echo $this->formLabel($element);
-
 
578
             echo $this->formSelect($element);
-
 
579
            ?>
-
 
580
          </div>
-
 
581
            <div class="form-group">
-
 
582
                 <?php 
-
 
583
             $element = $form->get('job_category_id');
-
 
584
             $element->setAttributes(['class' => 'form-control']);    
-
 
585
             $element->setOptions(['label' => 'LABEL_JOB_CATEGORY']);
-
 
586
                                                            
-
 
587
             echo $this->formLabel($element);
-
 
588
             echo $this->formSelect($element);
-
 
589
            ?>
-
 
590
          </div>
-
 
591
                 <div class="form-group">
-
 
592
                 <?php 
-
 
593
             $element = $form->get('location_search');
-
 
594
             $element->setAttributes(['class' => 'form-control']);    
-
 
595
             $element->setOptions(['label' => 'LABEL_LOCATION']);
-
 
596
                                                            
-
 
597
             echo $this->formLabel($element);
-
 
598
             echo $this->formText($element);
-
 
599
            ?>
-
 
600
          </div>
-
 
601
                  <div class="form-group">
-
 
602
                 <?php 
-
 
603
             $element = $form->get('industry_id');
-
 
604
             $element->setAttributes(['class' => 'form-control']);    
-
 
605
             $element->setOptions(['label' => 'LABEL_INDUSTRY']);
-
 
606
                                                            
-
 
607
             echo $this->formLabel($element);
-
 
608
             echo $this->formSelect($element);
-
 
609
            ?>
-
 
610
          </div>
-
 
611
                 <div class="form-group">
-
 
612
                 <?php 
-
 
613
             $element = $form->get('last_date');
-
 
614
             $element->setAttributes(['class' => 'form-control']);    
-
 
615
             $element->setOptions(['label' => 'LABEL_LAST_DATE_OF_APPLICATION']);
-
 
616
                                                            
-
 
617
             echo $this->formLabel($element);
-
 
618
             echo $this->formText($element);
-
 
619
            ?>
-
 
620
          </div>
-
 
621
           <div class="form-group">
-
 
622
                 <?php 
-
 
623
             $element = $form->get('description');
-
 
624
             $element->setAttributes(['class' => 'form-control']);    
-
 
625
             $element->setOptions(['label' => 'LABEL_DESCRIPTION']);
-
 
626
                                                            
-
 
627
             echo $this->formLabel($element);
-
 
628
             echo $this->formTextArea($element);
-
 
629
            ?>
-
 
630
          </div>
-
 
631
                  <div class="form-group">
-
 
632
                 <?php 
-
 
633
             $element = $form->get('status');
-
 
634
             $element->setAttributes(['class' => 'form-control']);    
-
 
635
             $element->setOptions(['label' => 'LABEL_STATUS']);
-
 
636
                                                            
-
 
637
             echo $this->formLabel($element);
-
 
638
             echo $this->formCheckbox($element);
-
 
639
            ?>
-
 
640
          </div>
-
 
641
 
-
 
642
 
-
 
643
 
-
 
644
          <div class="form-group">
45
$this->inlineScript()->appendScript($js);
645
              <button type="button" class="btn btn-primary btn-form-save-close">LABEL_SAVE</button>