Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 1424 | Rev 1438 | 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': 'status'
179
            },
180
            {
181
                'mDataProp': 'actions'
182
            },
183
        ],
184
        'columnDefs': [{
185
                'targets': 0,
186
                'className': 'text-vertical-middle',
187
            },
188
            {
189
                'targets': 1,
190
                'className': 'text-vertical-middle',
191
            },
192
            {
193
                'targets': -2,
194
                'orderable': false,
195
                'className': 'text-center',
196
                'render': function(data, type, row) {
197
                    checked = data == 'a' ? ' checked="checked" ' : '';
198
                    return '<div class="checkbox checkbox-success">' +
199
                        '<input class="styled" type="checkbox" ' + checked + ' disabled="disabled">' +
200
                        '<label ></label></div>';
201
                }
202
            },
203
            {
204
                'targets': -1,
205
                'orderable': false,
206
                'render': function(data, type, row) {
207
                    s = '';
208
                    if (allowEdit) {
209
                        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;';
210
                    }
211
                    if (allowDelete) {
212
                        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;';
213
                    }
214
                    return s;
215
                }
216
            }
217
        ],
218
    });
219
 
220
 
221
 
222
    /**
223
     * Clicked on edit form
224
     */
225
    $('body').on('click', 'button.btn-edit-form', function(e) {
226
        e.preventDefault();
227
        form_id = $(this).data('id')
228
        var action = $(this).data('href');
229
        $.ajax({
230
            'dataType': 'json',
231
            'accept': 'application/json',
232
            'method': 'get',
233
            'url': action,
234
        }).done(function(response) {
235
            if (response['success']) {
236
                $("#rows").html('');
237
                sections = [];
238
                $('#form-main').attr('action', action);
239
                $('#form-main #form-name').val(response['data']['name']);
1398 eleazar 240
                $('#form-main #job_description_id').val(response['data']['job_description_id']).trigger('change');
1410 eleazar 241
                $('#form-main #location_search').val(response['data']['location_search']);
1384 efrain 242
                $('#form-main #job_category_id').val(response['data']['job_category_id']).trigger('change');
243
                $('#form-main #industry_id').val(response['data']['industry_id']).trigger('change');
1417 eleazar 244
                $('#form-main #last_date').val(response['data']['last_date']).trigger('change');
1384 efrain 245
                $('#form-main #form-status').val(response['data']['status']);
1416 eleazar 246
                CKEDITOR.instances['description'].setData(response['data']['description']);
1384 efrain 247
 
1389 eleazar 248
 
1384 efrain 249
            } else {
250
                $.fn.showError(response['message'] || 'ERROR_UNKNOWN');
251
            }
252
        }).fail(function(jqXHR, textStatus, errorThrown) {
253
            $.fn.showError(textStatus);
254
        });
255
    });
1389 eleazar 256
 
1417 eleazar 257
    $('#form-main #last_date').datetimepicker({
258
        locale: 'es',
259
        format: 'DD/MM/YYYY'
1418 eleazar 260
    });
1384 efrain 261
    /**
262
     * Clicked new Form
263
     */
264
    $('button.btn-add-form').click(function(e) {
265
        $("#rows").html('');
266
        sections = [];
267
        $('#form-main').attr('action', '$routeAdd');
268
        $('#form-main #form-name').val('');
1398 eleazar 269
        $('#form-main #job_description_id').val('').trigger('change');
1410 eleazar 270
        $('#form-main #location_search').val('');
1384 efrain 271
        $('#form-main #job_category_id').val('').trigger('change');
272
        $('#form-main #industry_id').val('').trigger('change');
1417 eleazar 273
        $('#form-main #last_date').val('');
1384 efrain 274
        $('#form-main #form-status').val('$status_active');
1416 eleazar 275
        CKEDITOR.instances['description'].setData('');
1397 eleazar 276
        $('#row-lists').hide();
277
        $('#row-form').show();
278
        $('#form-main #form-name').focus();
1384 efrain 279
        return;
280
    });
281
 
282
 
283
    $.validator.addMethod('checkLocation', function (value, element, param) {
284
        var otherElement = $(param);
285
 
286
        return $.trim(otherElement.val()).length > 0;
287
    }, 'ERROR_PLACED_AUTOCOMPLETE_DOES_NOT_CONTAIN_GEOMETRY');
288
 
289
    var autocompleteLocation = new google.maps.places.Autocomplete(
290
        (document.getElementById('location_search')),
291
        {types: ['(cities)']}
292
    );
293
 
1403 eleazar 294
    $.fn.fillInAddressLocation = function() {
1410 eleazar 295
        var place = autocompleteLocation.getPlace();
296
        if (!place.geometry) {
297
            $.fn.showError('ERROR_PLACED_AUTOCOMPLETE_DOES_NOT_CONTAIN_GEOMETRY')
298
            return;
299
        } else {
300
            address1 = '';
301
            address2 = '';
302
            city1 = '';
303
            city2 = '';
304
            state = '';
305
            country = '';
306
            postal_code = '';
1403 eleazar 307
 
1410 eleazar 308
            formatted_address = place.formatted_address;
309
            latitude = place.geometry.location.lat();
310
            longitude = place.geometry.location.lng();
311
            var arrAddress = place.address_components;
312
 
313
            $.each(arrAddress, function(i, address_component) {
314
                if (address_component.types[0] == "route") {
315
                    address1 = address_component.long_name;
316
                }
317
                if (address_component.types[0] == "sublocality") {
318
                    address2 = address_component.long_name;
319
                }
320
                if (address_component.types[0] == "locality") {
321
                    city1 = address_component.long_name;
322
                }
323
                if (address_component.types[0] == "administrative_area_level_2") {
324
                    city2 = address_component.long_name;
325
                }
326
                if (address_component.types[0] == "administrative_area_level_1") {
327
                    state = address_component.long_name;
328
                }
329
                if (address_component.types[0] == "country") {
330
                    country = address_component.long_name;
331
                }
332
                if (address_component.types[0] == "postal_code") {
333
                    postal_code = address_component.long_name;
334
                }
335
            });
336
 
337
            $('#form-main #formatted_address').val(formatted_address);
338
            $('#form-main #address1').val(address1);
339
            $('#form-main #address2').val(address2);
340
            $('#form-main #city1').val(city1);
341
            $('#form-main #city2').val(city2);
342
            $('#form-main #state').val(state);
343
            $('#form-main #country').val(country);
344
            $('#form-main #postal_code').val(postal_code);
345
            $('#form-main #latitude').val(latitude);
346
            $('#form-main #longitude').val(longitude);
347
        }
1403 eleazar 348
    }
349
 
1384 efrain 350
    /**
351
     * Clicked cancel new/edit Form
352
     */
353
    $('button.btn-edit-cancel').click(function(e) {
354
        $('#row-form').hide();
355
        $('#row-lists').show();
356
        return;
357
    });
358
    /**
359
     * Clicked save and continue new Form
360
     */
361
    $('button.btn-form-save-continue').click(function(e) {
362
        for (var instanceName in CKEDITOR.instances) {
363
            CKEDITOR.instances[instanceName].updateElement();
364
        }
365
        saveData(1);
366
    });
367
    /**
368
     * Clicked save and close new/edit Form
369
     */
370
    $('button.btn-form-save-close').click(function(e) {
371
        for (var instanceName in CKEDITOR.instances) {
372
            CKEDITOR.instances[instanceName].updateElement();
373
        }
374
        saveData(0);
375
    });
376
    /**
377
     * Save Form Data
378
     */
379
    const saveData = (action) => {
380
        if ($('#form-name').val() == '') {
381
            $.fn.showError('ERROR_ENTER_NAME');
1416 eleazar 382
        } else if ($('#description').val() == '') {
1384 efrain 383
            $.fn.showError('ERROR_ENTER_DESCRIPTION');
384
        } else if ($('#form-category').val() == '') {
385
            $.fn.showError('ERROR_ENTER_CATEGORY');
386
        } else if ($('#form-industry').val() == '') {
387
            $.fn.showError('ERROR_ENTER_INDUSTRY');
388
        } else if ($('#form-text').val() == '') {
389
            $.fn.showError('ERROR_ENTER_TEXT');
390
        } else if ($('#form-status').val() == '') {
391
            $.fn.showError('ERROR_SELECT_STATUS');
392
        } else if ($('#job_description_id').val() == '') {
393
            $.fn.showError('ERROR_SELECT_JOB_DESCRIPTION');
394
        } else {
395
            $.ajax({
396
                'dataType': 'json',
397
                'method': 'post',
398
                'url': $('#form-main').attr('action'),
399
                'data': {
400
                    'name': $('#form-main #form-name').val(),
401
                    'job_description_id': $('#form-main #job_description_id').val(),
1424 eleazar 402
                    'location_search' :$('#form-main #location_search').val(),
1403 eleazar 403
                    'formatted_address': $('#form-main #formatted_address').val(),
404
                    'address1': $('#form-main #address1').val(),
405
                    'address2': $('#form-main #address2').val(),
406
                    'country': $('#form-main #country').val(),
407
                    'state': $('#form-main #state').val(),
408
                    'city1': $('#form-main #city1').val(),
409
                    'city2': $('#form-main #city2').val(),
410
                    'postal_code': $('#form-main #postal_code').val(),
411
                    'latitude': $('#form-main #latitude').val(),
412
                    'longitude': $('#form-main #longitude').val(),
1384 efrain 413
                    'job_category_id' :$('#form-main #job_category_id').val(),
414
                    'industry_id' :$('#form-main #industry_id').val(),
1421 eleazar 415
                    'last_date': $('#form-main #last_date').val(),
1384 efrain 416
                    'status': $('#form-main #form-status').val(),
1414 eleazar 417
                    'description': $('#form-main #description').val(),
1384 efrain 418
                    'content': JSON.stringify(sections)
419
                },
420
            }).done(function(response) {
421
                if (response['success']) {
422
                    $.fn.showSuccess(response['data']);
423
                    if (action == 1) {
424
                        $('#form-main').attr('action', response['action_edit']);
425
                    } else {
426
                        $('#row-form').hide();
427
                        $('#row-lists').show();
428
                        /*---------- Reset Form -------- */
429
                        $('#form-main')[0].reset();
430
                        tableForm.fnDraw();
431
                    }
432
                    return;
433
                } else {
434
                    $.fn.showError(response['message'] || 'ERROR_UNKNOWN');
435
                    return;
436
                }
437
            });
438
        }
439
    }
440
    /**
441
     * Remove Html Tags
442
     */
443
    const removeTags = (str) => str.toString().replace(/(<([^>]+)>)/ig, '')
1389 eleazar 444
 
445
 
1384 efrain 446
    /**
447
     * Remove Option
448
     */
449
    const removeOption = (id_section, id) => {
450
        sections.map((item) => {
451
            if (item.id_section == id_section) {
452
                item.options = item.options.filter((opt) => opt.id_option != id) || []
453
            }
454
        });
455
        return renderData(sections);
456
    }
457
    /**
458
     * Clicked refresh button
459
     */
460
    $('button.btn-refresh').click(function(e) {
461
        tableForm.fnDraw();
462
        return;
463
    });
464
    /**
465
     * Initialize select Jobdescription
466
     */
467
    $('#job_description_id').select2({
468
        theme: 'bootstrap4',
469
        width: '100%',
470
    });
471
 
472
    /**
473
     * Initialize select Jobcategory
474
     */
475
    $('#job_category_id').select2({
476
        theme: 'bootstrap4',
477
        width: '100%',
478
    });
479
 
480
     /**
481
     * Initialize select industry
482
     */
483
    $('#industry_id').select2({
484
        theme: 'bootstrap4',
485
        width: '100%',
486
    });
1400 eleazar 487
 
1384 efrain 488
     /**
489
     * Initialize select Location
490
     */
491
 
1410 eleazar 492
    var validatorLocation = $('#location_search').validate({
1384 efrain 493
        debug: true,
494
        onclick: false,
495
        onkeyup: false,
496
        onfocusout: false,
497
        ignore: [],
498
        rules: {
499
            'location_search': {
500
                required: true,
1410 eleazar 501
                checkLocation: '#location_search #latitude'
1384 efrain 502
            }
503
        },
504
        submitHandler: function(form)
505
        {
506
            NProgress.start();
507
            $.ajax({
508
                'dataType'  : 'json',
509
                'accept'    : 'application/json',
510
                'method'    : 'post',
511
                'url'       :  route_location,
1410 eleazar 512
                'data'      :  $('#location_search').serialize(),
1384 efrain 513
            }).done(function(response) {
514
 
515
 
516
 
517
                if(response['success']) {
518
                    $('#overview-location').html(response.data);
519
                    $("#location-box").modal('hide');
520
                } else {
521
                    validatorLocation.resetForm();
522
                    $.fn.showError(response['data']);
523
                }
524
            }).fail(function( jqXHR, textStatus, errorThrown) {
525
                $.fn.showError(textStatus);
526
            }).always(function() {
527
                NProgress.done();
528
            });
529
            return false;
530
        },
531
        invalidHandler: function(form, validator) {
532
 
533
        }
534
    });
535
 
536
    $('body').on('click', 'a.btn-location-edit', function(e) {
537
        e.preventDefault();
538
 
1410 eleazar 539
        $('#form-main #location_search').val('');
540
        $('#form-main #formatted_address').val('');
541
        $('#form-main #address1').val('');
542
        $('#form-main #address2').val('');
543
        $('#form-main #country').val('');
544
        $('#form-main #state').val('');
545
        $('#form-main #city1').val('');
546
        $('#form-main #city2').val('');
547
        $('#form-main #postal_code').val('');
548
        $('#form-main #latitude').val('');
549
        $('#form-main #longitude').val('');
1384 efrain 550
        validatorLocation.resetForm();
551
 
552
        $("#location-box").modal('show');
553
    });
554
 
555
    $('.btn-location-close').on("click", function(e){
556
        e.preventDefault();
557
 
558
        $("#location-box").modal('hide');
559
        return false;
560
    });
1407 eleazar 561
 
562
    autocompleteLocation.addListener('place_changed', $.fn.fillInAddressLocation);
1435 eleazar 563
  });
1384 efrain 564
JS;
565
 
566
$this->inlineScript()->captureEnd();
567
?>
568
<!-- Content Header (Page header) -->
569
<section class="content-header">
570
   <div class="container-fluid">
571
      <div class="row mb-2">
572
         <div class="col-sm-12">
573
            <h1>LABEL_RECRUITMENT_AND_SELECTION</h1>
574
         </div>
575
      </div>
576
   </div>
577
   <!-- /.container-fluid -->
578
</section>
579
<section class="content">
580
<div class="container-fluid" id="row-lists">
581
   <div class="row">
582
      <div class="col-12">
583
         <div class="card">
584
            <div class="card-body">
585
               <table id="gridTable" class="table   table-hover">
586
                  <thead>
587
                     <tr>
588
                        <th style="width:25%">LABEL_NAME</th>
589
                        <th style="width:20%">LABEL_JOB_DESCRIPTION</th>
590
                        <th style="width:10%">LABEL_ACTIVE</th>
591
                        <th style="width:25%">LABEL_ACTIONS</th>
592
                     </tr>
593
                  </thead>
594
                  <tbody></tbody>
595
               </table>
596
            </div>
597
            <div class="card-footer clearfix">
598
               <div style="float:right;">
599
                  <button type="button" class="btn btn-info btn-refresh"><i class="fa fa-refresh"></i> LABEL_REFRESH </button>
600
                  <?php if ($allowAdd) : ?>
601
                  <button type="button" class="btn btn-primary btn-add-form"><i class="fa fa-plus"></i> LABEL_ADD </button>
602
                  <?php endif; ?>
603
               </div>
604
            </div>
605
         </div>
606
      </div>
607
   </div>
608
</div>
609
<!-- Create/Edit Form -->
610
<div class="row" id="row-form" style="display: none; padding: 16px;">
611
   <div class="col-xs-12 col-md-12">
612
      <form action="#" name="form-main" id="form-main">
1424 eleazar 613
        <input type="hidden" name="formatted_address" id="formatted_address" />
1410 eleazar 614
        <input type="hidden" name="address1" id="address1" />
615
        <input type="hidden" name="address2" id="address2" />
616
        <input type="hidden" name="country" id="country" />
617
        <input type="hidden" name="state" id="state" />
618
        <input type="hidden" name="city1" id="city1" />
619
        <input type="hidden" name="city2" id="city2" />
620
        <input type="hidden" name="postal_code" id="postal_code" />
621
        <input type="hidden" name="latitude" id="latitude" />
622
        <input type="hidden" name="longitude" id="longitude" />
1384 efrain 623
         <div class="form-group">
624
            <label for="form-name">LABEL_FIRST_NAME</label>
625
            <input type="text" name="form-name" id="form-name" class="form-control" maxlength="50" />
626
         </div>
627
         <div class="form-group">
628
            <label for="job_description_id">LABEL_POSITION_EVALUATED</label>
629
            <select name="job_description_id" id="job_description_id" class="form-control">
630
               <option value="">LABEL_SELECT</option>
631
               <?php foreach ($jobsDescription as $rs): ?>
632
               <option value="<?php echo $rs->uuid;?>"><?php echo $rs->name;?></option>
633
               <?php endforeach; ?>
634
            </select>
635
         </div>
636
         <div class="form-group">
1410 eleazar 637
            <label for="location_search">LABEL_LOCATION</label>
1407 eleazar 638
            <input type="text" name="location_search" id="location_search" class="form-control" maxlength="50" />
1384 efrain 639
         </div>
640
         <div class="form-group">
641
            <label for="job_category_id">LABEL_JOB_CATEGORY</label>
642
            <select name="job_category_id" id="job_category_id" class="form-control">
643
               <option value="">LABEL_SELECT</option>
644
               <?php foreach ($jobCategory as $rs): ?>
645
               <option value="<?php echo $rs->uuid;?>"><?php echo $rs->name;?></option>
646
               <?php endforeach; ?>
647
            </select>
648
         </div>
649
         <div class="form-group">
1398 eleazar 650
            <label for="industry_id">LABEL_INDUSTRY</label>
651
            <select name="industry_id" id="industry_id" class="form-control">
1384 efrain 652
               <option value="">LABEL_SELECT</option>
653
               <?php foreach ($industry as $rs): ?>
654
               <option value="<?php echo $rs->uuid;?>"><?php echo $rs->name;?></option>
655
               <?php endforeach; ?>
656
            </select>
657
         </div>
1414 eleazar 658
         <div class="form-group">
1417 eleazar 659
            <label for="last_date">LABEL_LAST_DATE_OF_APPLICATION</label>
660
            <input type="text" name="last_date" id="last_date" class="form-control" maxlength="50" />
1414 eleazar 661
         </div>
662
            <label for="description">LABEL_DESCRIPTION</label>
1384 efrain 663
            <!--  ckeditor -->
1414 eleazar 664
            <textarea  name="description" id="description" rows="5" class="ckeditor form-control"></textarea>
1384 efrain 665
         </div>
666
         <div class="form-group">
667
            <label for="form-status">LABEL_STATUS</label>
668
            <select name="form-status" id="form-status" class="form-control">
669
               <option value="<?php echo $status_inactive; ?>">LABEL_INACTIVE</option>
670
               <option value="<?php echo $status_active; ?>">LABEL_ACTIVE</option>
671
            </select>
672
         </div>
1413 eleazar 673
 
1384 efrain 674
         <br />
675
         <div class="row">
676
            <div class="col-xs-12 col-md-12">
677
               <div class="panel-group" id="rows"></div>
678
            </div>
679
         </div>
1389 eleazar 680
 
1384 efrain 681
         <div class="form-group">
1413 eleazar 682
             <button type="button" class="btn btn-primary btn-form-save-close">LABEL_SAVE</button>
1384 efrain 683
            <button type="button" class="btn btn-secondary btn-edit-cancel">LABEL_CANCEL</button>
684
         </div>
685
      </form>
686
   </div>
687
</div>
688
<!-- Create/Edit Form-->
689
 
690
</section>