Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 1443 | Rev 1455 | Ir a la última revisión | | Comparar con el anterior | Ultima modificación | Ver Log |

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