Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev Autor Línea Nro. Línea
3766 stevensc 1
<?php
1 www 2
$acl            = $this->viewModel()->getRoot()->getVariable('acl');
3
$currentUser    = $this->currentUserHelper();
4
$roleName       = $currentUser->getUserTypeId();
5
 
6
$routeAdd           = $this->url('jobs/add');
7
 
8
$routeDatatable   = $this->url('jobs');
9
 
10
$allowAdd = $acl->isAllowed($roleName, 'jobs/add') ? 1 : 0;
11
$allowDelete = $acl->isAllowed($roleName, 'jobs/delete') ? 1 : 0;
12
$allowEdit = $acl->isAllowed($roleName, 'jobs/edit') ? 1 : 0;
13
$allowUsersWhoApplied = $acl->isAllowed($roleName, 'jobs/users-who-applied') ? 1 : 0;
14
 
8107 stevensc 15
 
16
 
17
$this->inlineScript()->appendFile('https://maps.googleapis.com/maps/api/js?key=' . $google_map_key . '&libraries=places');
18
 
1 www 19
$this->headLink()->appendStylesheet($this->basePath('plugins/nprogress/nprogress.css'));
20
$this->inlineScript()->appendFile($this->basePath('plugins/nprogress/nprogress.js'));
21
 
22
$this->inlineScript()->appendFile($this->basePath('plugins/ckeditor/ckeditor.js'));
23
 
24
 
25
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-fileinput/css/fileinput.min.css'));
26
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-fileinput/themes/explorer-fas/theme.css'));
27
 
28
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/plugins/piexif.js'));
29
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/plugins/sortable.js'));
30
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/fileinput.js'));
31
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/locales/es.js'));
32
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/themes/fas/theme.js'));
33
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/themes/explorer-fas/theme.js'));
34
 
35
 
36
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/jquery.validate.js'));
37
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/additional-methods.js'));
38
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/localization/messages_es.js'));
39
 
40
$this->headLink()->appendStylesheet($this->basePath('plugins/datatables-bs4/css/dataTables.bootstrap4.min.css'));
41
$this->headLink()->appendStylesheet($this->basePath('plugins/datatables-responsive/css/responsive.bootstrap4.min.css'));
42
 
43
$this->inlineScript()->appendFile($this->basePath('plugins/datatables/jquery.dataTables.min.js'));
44
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-bs4/js/dataTables.bootstrap4.min.js'));
45
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/dataTables.responsive.min.js'));
46
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/responsive.bootstrap4.min.js'));
47
 
48
 
49
 
50
$this->headLink()->appendStylesheet($this->basePath('plugins/select2/css/select2.min.css'));
51
$this->headLink()->appendStylesheet($this->basePath('plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css'));
52
$this->inlineScript()->appendFile($this->basePath('plugins/select2/js/select2.min.js'));
53
 
54
 
55
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-input-number/input-number-format.jquery.min.js'));
56
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-confirmation/dist/bootstrap-confirmation.js'));
57
 
58
 
59
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap4-toggle/css/bootstrap4-toggle.min.css'));
60
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap4-toggle/js/bootstrap4-toggle.min.js'));
61
 
62
$this->inlineScript()->appendFile($this->basePath('plugins/moment/moment-with-locales.min.js'));
63
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-datetimepicker/css/bootstrap-datetimepicker.css'));
64
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js'));
65
 
66
 
67
$this->headStyle()->captureStart();
68
echo <<<CSS
69
 
70
 
71
#gridTableUsersWhoApplied {
72
    display: flex;
73
    flex-flow: column;
74
    width: 100%;
75
}
76
 
77
#gridTableUsersWhoApplied thead {
78
    flex: 0 0 auto;
79
}
80
 
81
#gridTableUsersWhoApplied tbody {
82
    flex: 1 1 auto;
83
    display: block;
84
    overflow-y: auto;
85
    overflow-x: hidden;
86
}
87
 
88
#gridTableUsersWhoApplied tr {
89
    width: 100%;
90
    display: table;
91
    table-layout: fixed;
92
}
93
CSS;
94
$this->headStyle()->captureEnd();
95
 
96
$this->inlineScript()->captureStart();
97
echo <<<JS
98
jQuery( document ).ready(function( $ ) {
99
       var route_status = '';
100
       var route_title =  '';
101
       var route_extended =  '';
102
       var route_location =  '';
103
       var route_job_category =  '';
104
       var route_employment_type =  '';
105
       var route_salary =  '';
106
       var route_experience = '';
107
       var route_languages =  '';
108
       var route_degrees = '';
109
       var route_skills =  '';
110
       var route_last_date_of_application =  '';
7783 stevensc 111
 
1 www 112
 
7783 stevensc 113
 
1 www 114
        var allowDelete = $allowDelete;
115
        var allowEdit = $allowEdit;
116
        var allowUsersWhoApplied = $allowUsersWhoApplied;
117
 
7783 stevensc 118
        var gridTable = $('#gridTable').dataTable( {
119
            'processing': true,
120
            'serverSide': true,
121
            'searching': true,
122
            'order': [[ 0, 'desc' ]],
123
            'ordering':  true,
124
            'ordenable' : true,
125
            'responsive': true,
126
            'select' : false,
127
        	'paging': true,
128
            'pagingType': 'simple_numbers',
1 www 129
 
7783 stevensc 130
    		'ajax': {
131
    			'url' : '$routeDatatable',
132
    			'type' : 'get',
133
                'beforeSend': function (request) {
134
                  NProgress.start();
135
                },
136
                'dataFilter': function(response) {
137
                    var response = jQuery.parseJSON( response );
138
 
139
                    var json                = {};
140
                    json.recordsTotal       = 0;
141
                    json.recordsFiltered    = 0;
142
                    json.data               = [];
143
 
144
                    if(response.success) {
145
                        json.recordsTotal       = response.data.total;
146
                        json.recordsFiltered    = response.data.total;
147
                        json.data               = response.data.items;
148
                    } else {
149
                        $.fn.showError(response.data)
150
                    }
151
 
152
                    return JSON.stringify( json );
153
                }
154
    		},
155
            'language' : {
156
                'sProcessing':     'LABEL_DATATABLE_SPROCESSING',
157
                'sLengthMenu':     'LABEL_DATATABLE_SLENGTHMENU',
158
                'sZeroRecords':    'LABEL_DATATABLE_SZERORECORDS',
159
                'sEmptyTable':     'LABEL_DATATABLE_SEMPTYTABLE',
160
                'sInfo':           'LABEL_DATATABLE_SINFO',
161
                'sInfoEmpty':      'LABEL_DATATABLE_SINFOEMPTY',
162
                'sInfoFiltered':   'LABEL_DATATABLE_SINFOFILTERED',
163
                'sInfoPostFix':    '',
164
                'sSearch':         'LABEL_DATATABLE_SSEARCH',
165
                'sUrl':            '',
166
                'sInfoThousands':  ',',
167
                'sLoadingRecords': 'LABEL_DATATABLE_SLOADINGRECORDS',
168
                'oPaginate': {
169
                    'sFirst':    'LABEL_DATATABLE_SFIRST',
170
                    'sLast':     'LABEL_DATATABLE_SLAST',
171
                    'sNext':     'LABEL_DATATABLE_SNEXT',
172
                    'sPrevious': 'LABEL_DATATABLE_SPREVIOUS'
173
                },
174
                'oAria': {
175
                    'sSortAscending':  ': LABEL_DATATABLE_SSORTASCENDING',
176
                    'sSortDescending': ':LABEL_DATATABLE_SSORTDESCENDING'
177
                },
178
            },
179
            'drawCallback': function( settings ) {
180
                NProgress.done();
181
                $('button.btn-delete').confirmation({
182
                    rootSelector: 'button.btn-delete',
183
                    title : 'LABEL_ARE_YOU_SURE',
184
                    singleton : true,
185
                    btnOkLabel: 'LABEL_YES',
186
                    btnCancelLabel: 'LABEL_NO',
187
                    onConfirm: function(value) {
188
                        action = $(this).data('href');
189
                        NProgress.start();
190
                        $.ajax({
191
                            'dataType'  : 'json',
192
                            'accept'    : 'application/json',
193
                            'method'    : 'post',
194
                            'url'       :  action,
195
                        }).done(function(response) {
196
                            if(response['success']) {
197
                                $.fn.showSuccess(response['data']);
198
                                gridTable.api().ajax.reload(null, false);
199
                            } else {
200
                                $.fn.showError(response['data']);
201
                            }
202
                        }).fail(function( jqXHR, textStatus, errorThrown) {
203
                            $.fn.showError(textStatus);
204
                        }).always(function() {
205
                            NProgress.done();
206
                        });
207
                    },
208
                });
209
            },
210
            'aoColumns': [
211
                { 'mDataProp': 'last_date_of_application' },
212
                { 'mDataProp': 'title' },
213
                { 'mDataProp': 'details' },
214
                { 'mDataProp': 'actions' },
215
    	    ],
216
            'columnDefs': [
217
 
218
                {
219
                    'targets': -2,
220
                    'orderable': false,
221
                    'render' : function ( data, type, row ) {
222
                        var s = 'LABEL_STATUS : ' + row['details']['status'] + '<br>';
223
                        s = s + 'LABEL_EMPLOYMENT_TYPE : <br>' + row['details']['employment_type'] + '<br>';
224
                        s = s +  'LABEL_QTY_USERS_WHO_APPLIED : ' + row['details']['users_who_applied'] + '<br>';
225
 
226
                        return s;
227
                    }
228
                },
229
 
230
                {
231
                    'targets': -1,
232
                    'orderable': false,
233
                    'render' : function ( data, type, row ) {
234
                        s = '';
235
 
236
                        if(allowEdit && data['link_edit']  ) {
237
                            s = s + '<button class="btn btn-info btn-sm btn-edit" style="margin-top: 5px" data-href="' + data['link_edit']+ '" data-toggle="tooltip" title="LABEL_EDIT"><i class="fa fa-pencil"></i> LABEL_EDIT </button><br>';
238
                        }
239
                        if(allowDelete && data['link_delete']  ) {
240
                            s = s + '<button class="btn btn-danger btn-sm btn-delete" style="margin-top: 5px" data-href="' + data['link_delete']+ '" data-toggle="tooltip" title="LABEL_DELETE"><i class="fa fa-trash"></i> LABEL_DELETE </button><br>';
241
                        }
242
                        if(allowUsersWhoApplied && data['link_users_who_applied']  ) {
243
                            s = s + '<button class="btn btn-primary btn-sm btn-users-who-applied" style="margin-top: 5px" data-href="' + data['link_users_who_applied']+ '" data-toggle="tooltip" title="LABEL_USERS_WHO_APPLIED"><i class="fa fa-users"></i> LABEL_USERS_WHO_APPLIED </button><br>';
244
                        }
245
 
246
                        return s;
247
                    }
248
                }
249
              ],
250
        });
251
 
1 www 252
    $.validator.addMethod('greaterThanFloat', function (value, element, param) {
253
        var otherElement = $(param);
254
        return parseFloat(value) > parseFloat(otherElement.val());
255
    }, 'ERROR_INVALID_MINIMUM');
256
 
257
 
258
 
259
    $.validator.addMethod('greaterThan', function (value, element, param) {
260
        var otherElement = $(param);
261
        return parseInt(value, 10) > parseInt(otherElement.val(), 10);
262
    }, 'ERROR_INVALID_MINIMUM');
263
 
264
 
265
    $.validator.addMethod('checkLocation', function (value, element, param) {
266
        var otherElement = $(param);
267
 
268
        return $.trim(otherElement.val()).length > 0;
269
    }, 'ERROR_PLACED_AUTOCOMPLETE_DOES_NOT_CONTAIN_GEOMETRY');
270
 
8107 stevensc 271
    var autocompleteLocation = new google.maps.places.Autocomplete(
272
        (document.getElementById('location_search')),
273
        {types: ['(cities)']}
274
    );
275
 
276
    $.fn.fillInAddressLocation = function() {
277
 
278
        var place = autocompleteLocation.getPlace();
279
        if (!place.geometry) {
280
            $.fn.showError('ERROR_PLACED_AUTOCOMPLETE_DOES_NOT_CONTAIN_GEOMETRY')
281
            return;
282
        } else {
283
            address1 = '';
284
            address2 = '';
285
            city1 = '';
286
            city2 = '';
287
            state = '';
288
            country = '';
289
            postal_code = '';
290
 
291
            formatted_address = place.formatted_address;
292
            latitude = place.geometry.location.lat();
293
            longitude = place.geometry.location.lng();
294
            var arrAddress = place.address_components;
295
 
296
            $.each(arrAddress, function(i, address_component) {
297
                if (address_component.types[0] == "route") {
298
                    address1 = address_component.long_name;
299
                }
300
                if (address_component.types[0] == "sublocality") {
301
                    address2 = address_component.long_name;
302
                }
303
                if (address_component.types[0] == "locality") {
304
                    city1 = address_component.long_name;
305
                }
306
                if (address_component.types[0] == "administrative_area_level_2") {
307
                    city2 = address_component.long_name;
308
                }
309
                if (address_component.types[0] == "administrative_area_level_1") {
310
                    state = address_component.long_name;
311
                }
312
                if (address_component.types[0] == "country") {
313
                    country = address_component.long_name;
314
                }
315
                if (address_component.types[0] == "postal_code") {
316
                    postal_code = address_component.long_name;
317
                }
318
            });
319
 
320
            $('#form-location #formatted_address').val(formatted_address);
321
            $('#form-location #address1').val(address1);
322
            $('#form-location #address2').val(address2);
323
            $('#form-location #city1').val(city1);
324
            $('#form-location #city2').val(city2);
325
            $('#form-location #state').val(state);
326
            $('#form-location #country').val(country);
327
            $('#form-location #postal_code').val(postal_code);
328
            $('#form-location #latitude').val(latitude);
329
            $('#form-location #longitude').val(longitude);
330
        }
331
    }
1 www 332
 
8107 stevensc 333
 
334
    var autocompleteLocationNew = new google.maps.places.Autocomplete(
335
        (document.getElementById('add_location_search')),
336
        {types: ['(cities)']}
337
    );
338
 
339
    $.fn.fillInAddressNewLocation = function() {
340
 
341
 
342
        var place = autocompleteLocationNew.getPlace();
343
        if (!place.geometry) {
344
            $.fn.showError('ERROR_PLACED_AUTOCOMPLETE_DOES_NOT_CONTAIN_GEOMETRY')
345
            return;
346
        } else {
347
            address1 = '';
348
            address2 = '';
349
            city1 = '';
350
            city2 = '';
351
            state = '';
352
            country = '';
353
            postal_code = '';
354
 
355
            formatted_address = place.formatted_address;
356
            latitude = place.geometry.location.lat();
357
            longitude = place.geometry.location.lng();
358
            var arrAddress = place.address_components;
359
 
360
            $.each(arrAddress, function(i, address_component) {
361
                if (address_component.types[0] == "route") {
362
                    address1 = address_component.long_name;
363
                }
364
                if (address_component.types[0] == "sublocality") {
365
                    address2 = address_component.long_name;
366
                }
367
                if (address_component.types[0] == "locality") {
368
                    city1 = address_component.long_name;
369
                }
370
                if (address_component.types[0] == "administrative_area_level_2") {
371
                    city2 = address_component.long_name;
372
                }
373
                if (address_component.types[0] == "administrative_area_level_1") {
374
                    state = address_component.long_name;
375
                }
376
                if (address_component.types[0] == "country") {
377
                    country = address_component.long_name;
378
                }
379
                if (address_component.types[0] == "postal_code") {
380
                    postal_code = address_component.long_name;
381
                }
382
            });
383
 
384
            $('#form-add #formatted_address').val(formatted_address);
385
            $('#form-add #address1').val(address1);
386
            $('#form-add #address2').val(address2);
387
            $('#form-add #city1').val(city1);
388
            $('#form-add #city2').val(city2);
389
            $('#form-add #state').val(state);
390
            $('#form-add #country').val(country);
391
            $('#form-add #postal_code').val(postal_code);
392
            $('#form-add #latitude').val(latitude);
393
            $('#form-add #longitude').val(longitude);
394
        }
395
    }
396
 
1 www 397
 
398
    $.validator.setDefaults({
399
        debug: true,
400
        highlight: function(element) {
401
            $(element).addClass('is-invalid');
402
        },
403
        unhighlight: function(element) {
404
            $(element).removeClass('is-invalid');
405
        },
406
        errorElement: 'span',
407
        errorClass: 'error invalid-feedback',
408
        errorPlacement: function(error, element) {
409
            if(element.parent('.form-group').length) {
410
                error.insertAfter(element);
411
            } else if(element.parent('.toggle').length) {
412
                error.insertAfter(element.parent().parent());
413
            } else {
414
                error.insertAfter(element.parent());
415
            }
416
        }
417
    });
418
 
419
 
420
 
421
    $.fn.showFormErrorValidator = function(fieldname, errors) {
422
        var field = $(fieldname);
423
        if(field) {
424
            $(field).addClass('form-group-has-error');
425
 
426
            var error = $('<div id="' + fieldname +'-error" class="form-group-invalid-feedback">' + errors + '</div>');
427
            if(field.parent('.form-group').length) {
428
                error.insertAfter(field.parent());
429
            } else {
430
                error.insertAfter(field);
431
            }
432
        }
433
    };
434
 
435
    var validatorAdd = $('#form-add').validate({
436
        debug: true,
437
        onclick: false,
438
        onkeyup: false,
439
        onfocusout: false,
440
        ignore: [],
441
        rules: {
442
            'name': {
443
                required: true,
444
                maxlength: 128,
445
            },
446
            'title': {
447
                required: true,
448
            },
449
            'last_date_of_application': {
450
                required: true,
451
            },
452
            'job_category_id' :  {
453
                required: true,
454
            },
455
            'employment_type' : {
456
                required: true,
457
            },
458
            'add_location_search': {
459
                required: true,
460
                checkLocation: '#form-add #latitude'
461
            }
462
        },
463
        submitHandler: function(form)
464
        {
465
            NProgress.start();
466
            $.ajax({
467
                'dataType'  : 'json',
468
                'accept'    : 'application/json',
469
                'method'    : 'post',
470
                'url'       :  '$routeAdd',
471
                'data'      :  $('#form-add').serialize(),
472
            }).done(function(response) {
473
                if(response['success']) {
474
                    $('#add-job-box').modal('hide');
475
                    gridTable.api().ajax.reload(null, false);
476
 
477
                    $('#overview-title').html(response['data']['title']);
478
                    $('#overview-job-category').html(response['data']['job_category']);
479
					$('#overview-last-date-of-application').html(response['data']['last_date_of_application']);
480
					$('#overview-employment-type').html(response['data']['employment_type']);
481
                    $('#overview-location').html(response['data']['location']);
482
 
483
                    $('#overview-status').html(response['data']['status']);
484
                    $('#overview-description').html(response['data']['description']);
485
 
486
                    $('#overview-salary').html(response['data']['salary']);
487
                    $('#overview-experience').html('')
488
 
489
 
490
 
491
 
492
 
493
                    $('list-skills').empty();
494
                    $('list-languages').empty();
495
                    $('list-degrees').empty();
496
 
497
 
498
                    route_status = response['data']['route_status'];
499
                    route_title =  response['data']['route_title'];
500
                    route_extended =  response['data']['route_extended'];
501
                    route_location =  response['data']['route_location'];
502
                    route_job_category =  response['data']['route_job_category'];
503
                    route_employment_type =  response['data']['route_employment_type'];
504
                    route_salary =  response['data']['route_salary'];
505
                    route_experience = response['data']['route_experience'];
506
                    route_languages =  response['data']['route_languages'];
507
                    route_degrees = response['data']['route_degrees'];
508
                    route_skills =  response['data']['route_skills'];
509
                    route_last_date_of_application =  response['data']['route_last_date_of_application'];
510
 
511
                    $('#divListing').hide();
512
                    $('#divEdit').show();
513
 
514
                } else {
515
                    validatorAdd.resetForm();
516
                    if(jQuery.type(response['data']) == 'string') {
517
                        $.fn.showError(response['data']);
518
                    } else  {
519
                        $.each(response['data'], function( fieldname, errors ) {
520
                            $.fn.showFormErrorValidator('#form-add #' + fieldname, errors);
521
                        });
522
                    }
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
 
7783 stevensc 536
    $('body').on('click', 'button.btn-edit', function(e) {
537
        e.preventDefault();
538
 
539
        var href = $(this).data('href');
540
 
541
        NProgress.start();
542
            $.ajax({
543
                'dataType'  : 'json',
544
                'accept'    : 'application/json',
545
                'method'    : 'get',
546
                'url'       :  href,
547
            }).done(function(response) {
548
                if(response['success']) {
549
                    $('#add-job-box').modal('hide');
550
                    gridTable.api().ajax.reload(null, false);
551
 
552
                    $('#overview-title').html(response['data']['title']);
553
                    $('#overview-job-category').html(response['data']['job_category']);
554
					$('#overview-last-date-of-application').html(response['data']['last_date_of_application']);
555
					$('#overview-employment-type').html(response['data']['employment_type']);
556
                    $('#overview-location').html(response['data']['location']);
557
 
558
                    $('#overview-status').html(response['data']['status']);
559
                    $('#overview-description').html(response['data']['description']);
560
 
561
 
562
                    if(response['data']['salary']) {
563
					   $('#overview-salary').html(response['data']['salary']);
564
                    } else {
565
                       $('#overview-salary').html('')
566
                    }
567
 
568
                    if(response['data']['experience']) {
569
					   $('#overview-experience').html(response['data']['experience'] + ' LABEL_YEARS');
570
                    } else {
571
                       $('#overview-experience').html('')
572
                    }
573
 
574
 
575
 
576
                    $('#list-skills').empty();
577
                    $.each(response['data']['skills'], function(i, name) {
578
                        $('#list-skills').append('<li>' + name + '</li>');
579
                    });
580
 
581
                    $('#list-languages').empty();
582
                    $.each(response['data']['languages'], function(i, name) {
583
                        $('#list-languages').append('<li>' + name + '</li>');
584
                    });
585
 
586
                    $('#list-degrees').empty();
587
                    $.each(response['data']['degrees'], function(i, name) {
588
                        $('#list-degrees').append('<li>' + name + '</li>');
589
                    });
590
 
591
 
592
                    route_status =  response['data']['route_status'];
593
                    route_title =   response['data']['route_title'];
594
                    route_extended =   response['data']['route_extended'];
595
                    route_location =   response['data']['route_location'];
596
                    route_job_category =   response['data']['route_job_category'];
597
                    route_employment_type =   response['data']['route_employment_type'];
598
                    route_salary =   response['data']['route_salary'];
599
                    route_experience =  response['data']['route_experience'];
600
                    route_languages =   response['data']['route_languages'];
601
                    route_degrees =  response['data']['route_degrees'];
602
                    route_skills =   response['data']['route_skills'];
603
                    route_last_date_of_application =   response['data']['route_last_date_of_application'];
604
 
605
 
606
                    $('#divListing').hide();
607
                    $('#divEdit').show();
608
 
609
                } else {
610
                    validatorAdd.resetForm();
611
                    if(jQuery.type(response['data']) == 'string') {
612
                        $.fn.showError(response['data']);
613
                    } else  {
614
                        $.each(response['data'], function( fieldname, errors ) {
615
                            $.fn.showFormErrorValidator('#form-add #' + fieldname, errors);
616
                        });
617
                    }
618
                }
619
            }).fail(function( jqXHR, textStatus, errorThrown) {
620
                $.fn.showError(textStatus);
621
            }).always(function() {
622
                NProgress.done();
623
            });
624
            return false;
625
    });
626
 
627
 
628
 
1 www 629
    $(".close-box, .btn-add-job-cancel").on("click", function(e){
630
        e.preventDefault();
631
        $('#add-job-box').modal('hide');
632
        return false;
633
    });
634
 
635
    $('body').on('click', 'button.btn-add', function(e) {
636
        e.preventDefault();
637
 
638
 
639
        $('#form-add #title').val('');
640
        $('#form-add #last_date_of_application').val('');
641
        $('#form-add #employment_type').val('').trigger('change');
642
        $('#form-add #job_category_id').val('').trigger('change');
643
        $('#form-add #formatted_address').val('');
644
        $('#form-add #address1').val('');
645
        $('#form-add #address2').val('');
646
        $('#form-add #country').val('');
647
        $('#form-add #state').val('');
648
        $('#form-add #city1').val('');
649
        $('#form-add #city2').val('');
650
        $('#form-add #postal_code').val('');
651
        $('#form-add #latitude').val('');
652
        $('#form-add #longitude').val('');
653
        $('#form-add #add_location_search').val('');
654
        validatorAdd.resetForm();
655
 
656
        $('#add-job-box').modal('show');
657
        return false;
658
    });
659
 
8107 stevensc 660
    $('#form-add #last_date_of_application').datetimepicker({
661
        //viewMode: 'years',
662
        locale: 'es',
663
        format: 'DD/MM/YYYY'
664
    });
1 www 665
 
8107 stevensc 666
 
1 www 667
    $('body').on('click', 'button.btn-view-profile', function(e) {
668
        e.preventDefault();
669
 
670
        var href = $(this).data('href');
671
        window.open(href, '_blank');
672
 
673
    });
674
 
675
    $('body').on('click', 'button.btn-users-who-applied', function(e) {
676
        e.preventDefault();
677
 
678
        var href = $(this).data('href');
679
        NProgress.start();
680
        $.ajax({
681
            'dataType'  : 'json',
682
            'accept'    : 'application/json',
683
            'method'    : 'get',
684
            'url'       :  href
685
        }).done(function(response) {
686
            if(response['success']) {
687
                $('#gridTableUsersWhoApplied tbody').empty();
688
                $.each(response['data'], function(i, record) {
689
                    var s = '<tr>';
690
                    s = s + '<td>' + record['first_name'] + '</td>';
691
                    s = s + '<td>' + record['last_name'] + '</td>';
692
                    s = s + '<td>' + record['email'] + '</td>';
693
                    s = s + '<td><button class="btn btn-default btn-view-profile" data-href="' + record['link_view']+ '"><i class="fa fa-external-link"></i></button></td>';
694
                    s = s + '<tr>';
695
 
696
                    $('#gridTableUsersWhoApplied tbody').append(s);
697
 
698
                });
699
 
700
 
701
                $('#modalUsersWhoApplied').modal('show');
702
            } else {
703
                $.fn.showError(response['data']);
704
 
705
            }
706
        }).fail(function( jqXHR, textStatus, errorThrown) {
707
            $.fn.showError(textStatus);
708
        }).always(function() {
709
            NProgress.done();
710
        });
711
        return false;
712
 
713
    });
714
 
8107 stevensc 715
 var validatorLocation = $('#form-location').validate({
716
        debug: true,
717
        onclick: false,
718
        onkeyup: false,
719
        onfocusout: false,
720
        ignore: [],
721
        rules: {
722
            'location_search': {
723
                required: true,
724
                checkLocation: '#form-location #latitude'
725
            }
726
        },
727
        submitHandler: function(form)
728
        {
729
            NProgress.start();
730
            $.ajax({
731
                'dataType'  : 'json',
732
                'accept'    : 'application/json',
733
                'method'    : 'post',
734
                'url'       :  route_location,
735
                'data'      :  $('#form-location').serialize(),
736
            }).done(function(response) {
1 www 737
 
8107 stevensc 738
 
739
 
740
                if(response['success']) {
741
                    $('#overview-location').html(response.data);
742
                    $("#location-box").modal('hide');
743
                } else {
744
                    validatorLocation.resetForm();
745
                    $.fn.showError(response['data']);
746
                }
747
            }).fail(function( jqXHR, textStatus, errorThrown) {
748
                $.fn.showError(textStatus);
749
            }).always(function() {
750
                NProgress.done();
751
            });
752
            return false;
753
        },
754
        invalidHandler: function(form, validator) {
755
 
756
        }
757
    });
758
 
759
 
760
    $('body').on('click', 'a.btn-location-edit', function(e) {
761
        e.preventDefault();
762
 
763
        $('#form-location #location_search').val('');
764
        $('#form-location #formatted_address').val('');
765
        $('#form-location #address1').val('');
766
        $('#form-location #address2').val('');
767
        $('#form-location #country').val('');
768
        $('#form-location #state').val('');
769
        $('#form-location #city1').val('');
770
        $('#form-location #city2').val('');
771
        $('#form-location #postal_code').val('');
772
        $('#form-location #latitude').val('');
773
        $('#form-location #longitude').val('');
774
        validatorLocation.resetForm();
775
 
776
        $("#location-box").modal('show');
777
    });
778
 
779
    $('.btn-location-close').on("click", function(e){
780
        e.preventDefault();
781
 
782
        $("#location-box").modal('hide');
783
        return false;
784
    });
785
 
786
 
787
 
788
 
789
    var validatorLastDateOfApplication = $('#form-last-date-of-application').validate({
790
        debug: true,
791
        onclick: false,
792
        onkeyup: false,
793
        onfocusout: false,
794
        ignore: [],
795
        rules: {
796
            'last_date_of_application': {
797
                required: true,
798
            },
799
        },
800
 
801
        submitHandler: function(form)
802
        {
803
            NProgress.start();
804
            $.ajax({
805
                'dataType'  : 'json',
806
                'accept'    : 'application/json',
807
                'method'    : 'post',
808
                'url'       :  route_last_date_of_application,
809
                'data'      :  $('#form-last-date-of-application').serialize()
810
            }).done(function(response) {
811
                if(response['success']) {
812
 
813
                    $('#overview-last-date-of-application').html(response['data']);
814
                    $("#last-date-of-application-box").modal('hide');
815
                } else {
816
                    validatorLastDateOfApplication.resetForm();
817
                    if(jQuery.type(response['data']) == 'string') {
818
                        $.fn.showError(response['data']);
819
                    } else  {
820
                        $.each(response['data'], function( fieldname, errors ) {
821
                            $.fn.showFormErrorValidator('#form-last-date-of-application #' + fieldname, errors);
822
                        });
823
                    }
824
                }
825
            }).fail(function( jqXHR, textStatus, errorThrown) {
826
                $.fn.showError(textStatus);
827
            }).always(function() {
828
                NProgress.done();
829
            });
830
            return false;
831
        },
832
        invalidHandler: function(form, validator) {
833
 
834
        }
835
    });
836
 
837
 
838
    $('.btn-last-date-of-application-edit').on("click", function(e){
839
        e.preventDefault();
840
 
841
        NProgress.start();
842
        $.ajax({
843
            'dataType'  : 'json',
844
            'accept'    : 'application/json',
845
            'method'    : 'get',
846
            'url'       : route_last_date_of_application,
847
        }).done(function(response) {
848
           if(response['success']) {
849
                $('#form-last-date-of-application #last_date_of_application').val(response['data']);
850
                validatorLastDateOfApplication.resetForm();
851
 
852
                $("#last-date-of-application-box").modal('show');
853
            } else {
854
                $.fn.showError(response['data']);
855
            }
856
        }).fail(function( jqXHR, textStatus, errorThrown) {
857
            $.fn.showError(textStatus);
858
        }).always(function() {
859
            NProgress.done();
860
        });
861
        return false;
862
 
863
    });
864
 
865
    $('.btn-last-date-of-application-close').on("click", function(e){
866
        e.preventDefault();
867
 
868
        $("#last-date-of-application-box").modal('hide');
869
        return false;
870
    });
871
 
872
 
873
    var validatorExtended = $('#form-extended').validate({
874
        debug: true,
875
        onclick: false,
876
        onkeyup: false,
877
        onfocusout: false,
878
        ignore: [],
879
        rules: {
880
            'description': {
881
                updateCkeditor:function() {
882
                        CKEDITOR.instances.description.updateElement();
883
                },
884
                required: false,
885
            },
886
        },
887
 
888
        submitHandler: function(form)
889
        {
890
            NProgress.start();
891
            $.ajax({
892
                'dataType'  : 'json',
893
                'accept'    : 'application/json',
894
                'method'    : 'post',
895
                'url'       :  route_extended,
896
                'data'      :  $('#form-extended').serialize()
897
            }).done(function(response) {
898
                if(response['success']) {
899
 
900
                    $('#overview-description').html(response['data']['description']);
901
                    $("#extended-box").modal('hide');
902
                } else {
903
                    validatorExtended.resetForm();
904
                    if(jQuery.type(response['data']) == 'string') {
905
                        $.fn.showError(response['data']);
906
                    } else  {
907
                        $.each(response['data'], function( fieldname, errors ) {
908
                            $.fn.showFormErrorValidator('#form-extended #' + fieldname, errors);
909
                        });
910
                    }
911
                }
912
            }).fail(function( jqXHR, textStatus, errorThrown) {
913
                $.fn.showError(textStatus);
914
            }).always(function() {
915
                NProgress.done();
916
            });
917
            return false;
918
        },
919
        invalidHandler: function(form, validator) {
920
 
921
        }
922
    });
923
 
924
 
925
    $('.btn-extended-edit').on("click", function(e){
926
        e.preventDefault();
927
 
928
        NProgress.start();
929
        $.ajax({
930
            'dataType'  : 'json',
931
            'accept'    : 'application/json',
932
            'method'    : 'get',
933
            'url'       : route_extended,
934
        }).done(function(response) {
935
           if(response['success']) {
936
                CKEDITOR.instances.description.setData(response['data']['description']);
937
                validatorExtended.resetForm();
938
 
939
                $("#extended-box").modal('show');
940
            } else {
941
                $.fn.showError(response['data']);
942
            }
943
        }).fail(function( jqXHR, textStatus, errorThrown) {
944
            $.fn.showError(textStatus);
945
        }).always(function() {
946
            NProgress.done();
947
        });
948
        return false;
949
 
950
    });
951
 
952
    $('.btn-extended-close').on("click", function(e){
953
        e.preventDefault();
954
 
955
        $("#extended-box").modal('hide');
956
        return false;
957
    });
958
 
959
 
960
    var validatorJobCategory = $('#form-job-category').validate({
961
        debug: true,
962
        onclick: false,
963
        onkeyup: false,
964
        ignore: [],
965
        rules: {
966
            'job-category_id': {
967
                required: false,
968
                digits: true
969
            },
970
        },
971
        submitHandler: function(form)
972
        {
973
            NProgress.start();
974
            $.ajax({
975
                'dataType'  : 'json',
976
                'accept'    : 'application/json',
977
                'method'    : 'post',
978
                'url'       :  route_job_category,
979
                'data'      :  $('#form-job-category').serialize()
980
            }).done(function(response) {
981
                if(response['success']) {
982
					$('#overview-job-category').html(response['data']);
983
                    $("#job-category-box").modal('hide');
984
                } else {
985
                    validatorJobCategory.resetForm();
986
                    if(jQuery.type(response['data']) == 'string') {
987
                        $.fn.showError(response['data']);
988
                    } else  {
989
                        $.each(response['data'], function( fieldname, errors ) {
990
                            $.fn.showFormErrorValidator('#form-job-category #' + fieldname, errors);
991
                        });
992
                    }
993
                }
994
            }).fail(function( jqXHR, textStatus, errorThrown) {
995
                $.fn.showError(textStatus);
996
            }).always(function() {
997
                NProgress.done();
998
            });
999
            return false;
1000
        },
1001
        invalidHandler: function(form, validator) {
1002
 
1003
        }
1004
    });
1005
 
1006
    $('.btn-job-category-edit').on("click", function(e){
1007
        e.preventDefault();
1008
 
1009
        NProgress.start();
1010
        $.ajax({
1011
            'dataType'  : 'json',
1012
            'accept'    : 'application/json',
1013
            'method'    : 'get',
1014
            'url'       : route_job_category,
1015
        }).done(function(response) {
1016
           if(response['success']) {
1017
                $('#form-job-category #job_category_id').val(response['data']).trigger('change');
1018
                validatorJobCategory.resetForm();
1019
                $("#job-category-box").modal('show');
1020
            } else {
1021
                $.fn.showError(response['data']);
1022
            }
1023
        }).fail(function( jqXHR, textStatus, errorThrown) {
1024
            $.fn.showError(textStatus);
1025
        }).always(function() {
1026
            NProgress.done();
1027
        });
1028
        return false;
1029
 
1030
    });
1031
 
1032
    $('.btn-job-category-close').on("click", function(e){
1033
        e.preventDefault();
1034
 
1035
        $("#job-category-box").modal('hide');
1036
        return false;
1037
    });
1038
 
1039
 
1040
 
1041
    var validatorEmploymentType = $('#form-employment-type').validate({
1042
        debug: true,
1043
        onclick: false,
1044
        onkeyup: false,
1045
        ignore: [],
1046
        rules: {
1047
            'employment_type': {
1048
                required: false,
1049
            },
1050
        },
1051
        submitHandler: function(form)
1052
        {
1053
            NProgress.start();
1054
            $.ajax({
1055
                'dataType'  : 'json',
1056
                'accept'    : 'application/json',
1057
                'method'    : 'post',
1058
                'url'       :  route_employment_type,
1059
                'data'      :  $('#form-employment-type').serialize()
1060
            }).done(function(response) {
1061
                if(response['success']) {
1062
					$('#overview-employment-type').html(response['data']);
1063
                    $("#employment-type-box").modal('hide');
1064
                } else {
1065
                    validatorEmploymentType.resetForm();
1066
                    if(jQuery.type(response['data']) == 'string') {
1067
                        $.fn.showError(response['data']);
1068
                    } else  {
1069
                        $.each(response['data'], function( fieldname, errors ) {
1070
                            $.fn.showFormErrorValidator('#form-employment-type #' + fieldname, errors);
1071
                        });
1072
                    }
1073
                }
1074
            }).fail(function( jqXHR, textStatus, errorThrown) {
1075
                $.fn.showError(textStatus);
1076
            }).always(function() {
1077
                NProgress.done();
1078
            });
1079
            return false;
1080
        },
1081
        invalidHandler: function(form, validator) {
1082
 
1083
        }
1084
    });
1085
 
1086
    $('.btn-employment-type-edit').on("click", function(e){
1087
        e.preventDefault();
1088
 
1089
        NProgress.start();
1090
        $.ajax({
1091
            'dataType'  : 'json',
1092
            'accept'    : 'application/json',
1093
            'method'    : 'get',
1094
            'url'       : route_employment_type,
1095
        }).done(function(response) {
1096
           if(response['success']) {
1097
                $('#form-employment-type #employment_type').val(response['data']).trigger('change');
1098
                validatorEmploymentType.resetForm();
1099
                $("#employment-type-box").modal('show');
1100
            } else {
1101
                $.fn.showError(response['data']);
1102
            }
1103
        }).fail(function( jqXHR, textStatus, errorThrown) {
1104
            $.fn.showError(textStatus);
1105
        }).always(function() {
1106
            NProgress.done();
1107
        });
1108
        return false;
1109
 
1110
    });
1111
 
1112
    $('.btn-employment-type-close').on("click", function(e){
1113
        e.preventDefault();
1114
 
1115
        $("#employment-type-box").modal('hide');
1116
        return false;
1117
    });
1118
 
1 www 1119
    var validatorSalary = $('#form-salary').validate({
1120
        debug: true,
1121
        onclick: false,
1122
        onkeyup: false,
1123
        ignore: [],
1124
        rules: {
1125
            'salary_visible': {
1126
                required: false,
1127
            },
1128
            'salary_min': {
1129
                required:  '#form-salary #salary_visible:checked',
1130
                number: true,
1131
                maxlength: 10,
1132
            },
1133
            'salary currency': {
1134
                required:  '#form-salary #salary_visible:checked',
1135
                maxlength: 5,
1136
            },
1137
            'salary_max': {
1138
                required:  '#form-salary #salary_visible:checked',
1139
                number: true,
1140
                maxlength: 10,
1141
                greaterThanFloat : '#form-salary #salary_min',
1142
            },
1143
        },
1144
        submitHandler: function(form)
1145
        {
1146
            NProgress.start();
1147
            $.ajax({
1148
                'dataType'  : 'json',
1149
                'accept'    : 'application/json',
1150
                'method'    : 'post',
1151
                'url'       :  route_salary,
1152
                'data'      :  $('#form-salary').serialize()
1153
            }).done(function(response) {
1154
                if(response['success']) {
1155
					$('#overview-salary').html(response['data']);
1156
                    $("#salary-box").modal('hide');
1157
                } else {
1158
                    validatorSalary.resetForm();
1159
                    if(jQuery.type(response['data']) == 'string') {
1160
                        $.fn.showError(response['data']);
1161
                    } else  {
1162
                        $.each(response['data'], function( fieldname, errors ) {
1163
                            $.fn.showFormErrorValidator('#form-salary #' + fieldname, errors);
1164
                        });
1165
                    }
1166
                }
1167
            }).fail(function( jqXHR, textStatus, errorThrown) {
1168
                $.fn.showError(textStatus);
1169
            }).always(function() {
1170
                NProgress.done();
1171
            });
1172
            return false;
1173
        },
1174
        invalidHandler: function(form, validator) {
1175
 
1176
        }
1177
    });
1178
 
1179
    $('.btn-salary-edit').on("click", function(e){
1180
        e.preventDefault();
1181
 
1182
        NProgress.start();
1183
        $.ajax({
1184
            'dataType'  : 'json',
1185
            'accept'    : 'application/json',
1186
            'method'    : 'get',
1187
            'url'       : route_salary,
1188
        }).done(function(response) {
1189
           if(response['success']) {
1190
                if(response['data']['salary_visible'] == 'y') {
1191
                    $('#form-salary #salary_visible').bootstrapToggle('on')
1192
                    $('#form-salary #salary_min').val(response['data']['salary_min']);
1193
                    $('#form-salary #salary_min').prop('readonly', false);
1194
                    $('#form-salary #salary_max').val(response['data']['salary_max']);
1195
                    $('#form-salary #salary_max').prop('readonly', false);
1196
                    $('#form-salary #salary_currency').val(response['data']['salary_currency']);
1197
                    $('#form-salary #salary_currency').prop('disable',false);
1198
                } else {
1199
                    $('#form-salary #salary_visible').bootstrapToggle('off')
1200
                    $('#form-salary #salary_min').val('1');
1201
                    $('#form-salary #salary_min').prop('readonly', true);
1202
                    $('#form-salary #salary_max').val('99');
1203
                    $('#form-salary #salary_max').prop('readonly', true);
1204
                    $('#form-salary #salary_currency').val('USD');
1205
                    $('#form-salary #salary_currency').prop('disable',true);
1206
                }
1207
                validatorSalary.resetForm();
1208
                $("#salary-box").modal('show');
1209
            } else {
1210
                $.fn.showError(response['data']);
1211
            }
1212
        }).fail(function( jqXHR, textStatus, errorThrown) {
1213
            $.fn.showError(textStatus);
1214
        }).always(function() {
1215
            NProgress.done();
1216
        });
1217
        return false;
1218
 
1219
    });
1220
 
1221
    $('.btn-salary-close').on("click", function(e){
1222
        e.preventDefault();
1223
 
1224
        $("#salary-box").modal('hide');
1225
        return false;
1226
    });
1227
 
1228
    var validatorExperience = $('#form-experience').validate({
1229
        debug: true,
1230
        onclick: false,
1231
        onkeyup: false,
1232
        ignore: [],
1233
        rules: {
1234
            'experience_visible': {
1235
                required: false,
1236
            },
1237
            'experience_min': {
1238
                required:  '#form-experience #experience_visible:checked',
1239
                digits: true,
1240
                maxlength: 2,
1241
            },
1242
            'experience_max': {
1243
                required:  '#form-experience #experience_visible:checked',
1244
                digits: true,
1245
                maxlength: 4,
1246
                greaterThan : '#form-experience #experience_min',
1247
            },
1248
        },
1249
        submitHandler: function(form)
1250
        {
1251
            NProgress.start();
1252
            $.ajax({
1253
                'dataType'  : 'json',
1254
                'accept'    : 'application/json',
1255
                'method'    : 'post',
1256
                'url'       :  route_experience,
1257
                'data'      :  $('#form-experience').serialize()
1258
            }).done(function(response) {
1259
                if(response['success']) {
1260
					$('#overview-experience').html(response['data']);
1261
                    $("#experience-box").modal('hide');
1262
                } else {
1263
                    validatorExperience.resetForm();
1264
                    if(jQuery.type(response['data']) == 'string') {
1265
                        $.fn.showError(response['data']);
1266
                    } else  {
1267
                        $.each(response['data'], function( fieldname, errors ) {
1268
                            $.fn.showFormErrorValidator('#form-experience #' + fieldname, errors);
1269
                        });
1270
                    }
1271
                }
1272
            }).fail(function( jqXHR, textStatus, errorThrown) {
1273
                $.fn.showError(textStatus);
1274
            }).always(function() {
1275
                NProgress.done();
1276
            });
1277
            return false;
1278
        },
1279
        invalidHandler: function(form, validator) {
1280
 
1281
        }
1282
    });
1283
 
1284
    $('.btn-experience-edit').on("click", function(e){
1285
        e.preventDefault();
1286
 
1287
        NProgress.start();
1288
        $.ajax({
1289
            'dataType'  : 'json',
1290
            'accept'    : 'application/json',
1291
            'method'    : 'get',
1292
            'url'       : route_experience,
1293
        }).done(function(response) {
1294
           if(response['success']) {
1295
                if(response['data']['experience_visible'] == 'y') {
1296
                    $('#form-experience #experience_visible').bootstrapToggle('on')
1297
                    $('#form-experience #experience_min').val(response['data']['experience_min']);
1298
                    $('#form-experience #experience_min').prop('readonly', false);
1299
                    $('#form-experience #experience_max').val(response['data']['experience_max']);
1300
                    $('#form-experience #experience_max').prop('readonly', false);
1301
                } else {
1302
                    $('#form-experience #experience_visible').bootstrapToggle('off')
1303
                    $('#form-experience #experience_min').val('1');
1304
                    $('#form-experience #experience_min').prop('readonly', true);
1305
                    $('#form-experience #experience_max').val('5');
1306
                    $('#form-experience #experience_max').prop('readonly', true);
1307
                }
1308
 
1309
                validatorExperience.resetForm();
1310
                $("#experience-box").modal('show');
1311
            } else {
1312
                $.fn.showError(response['data']);
1313
            }
1314
        }).fail(function( jqXHR, textStatus, errorThrown) {
1315
            $.fn.showError(textStatus);
1316
        }).always(function() {
1317
            NProgress.done();
1318
        });
1319
        return false;
1320
 
1321
    });
1322
 
1323
    $('.btn-experience-close').on("click", function(e){
1324
        e.preventDefault();
1325
 
1326
        $("#experience-box").modal('hide');
1327
        return false;
1328
    });
1329
 
1330
 
1331
    $('.btn-skills-edit').on("click", function(e){
1332
        e.preventDefault();
1333
 
1334
        NProgress.start();
1335
        $.ajax({
1336
            'dataType'  : 'json',
1337
            'accept'    : 'application/json',
1338
            'method'    : 'get',
1339
            'url'       : route_skills,
1340
        }).done(function(response) {
1341
           if(response['success']) {
1342
                $('#form-skill #skills').val(response['data']).trigger('change');
1343
                validatorSkills.resetForm();
1344
 
1345
                $('#skills-box').modal('show');
1346
            } else {
1347
                $.fn.showError(response['data']);
1348
            }
1349
        }).fail(function( jqXHR, textStatus, errorThrown) {
1350
            $.fn.showError(textStatus);
1351
        }).always(function() {
1352
            NProgress.done();
1353
        });
1354
        return false;
1355
 
1356
    });
1357
 
1358
    $('.btn-skills-close').on("click", function(e){
1359
        e.preventDefault();
1360
 
1361
        $('#skills-box').modal('hide');
1362
        return false;
1363
    });
1364
 
1365
    var validatorSkills = $('#form-skill').validate({
1366
        debug: true,
1367
        onclick: false,
1368
        onkeyup: false,
1369
         onfocusout: false,
1370
        ignore: [],
1371
        rules: {
1372
            'skills[]': {
1373
                required: true,
1374
            }
1375
        },
1376
        submitHandler: function(form)
1377
        {
1378
            NProgress.start();
1379
            $.ajax({
1380
                'dataType'  : 'json',
1381
                'accept'    : 'application/json',
1382
                'method'    : 'post',
1383
                'url'       :  route_skills,
1384
                'data'      :  {
1385
                    'skills[]' : $('#form-skill #skills').val()
1386
                },
1387
            }).done(function(response) {
1388
                if(response['success']) {
1389
 
1390
					$('#list-skills').empty();
1391
                    $.each(response['data'], function(index, item) {
1392
                        $('#list-skills').append('<li><a href="#" title="">' + item.label + '</a></li>');
1393
                    });
1394
 
1395
                    $("#skills-box").modal('hide');
1396
                } else {
1397
                    validatorSkills.resetForm();
1398
                    if(jQuery.type(response['data']) == 'string') {
1399
                        $.fn.showError(response['data']);
1400
                    } else  {
1401
                        $.each(response['data'], function( fieldname, errors ) {
1402
                            $.fn.showFormErrorValidator('#form-skill #' + fieldname, errors);
1403
                        });
1404
                    }
1405
                }
1406
            }).fail(function( jqXHR, textStatus, errorThrown) {
1407
                $.fn.showError(textStatus);
1408
            }).always(function() {
1409
                NProgress.done();
1410
            });
1411
            return false;
1412
        },
1413
        invalidHandler: function(form, validator) {
1414
 
1415
        }
1416
    });
1417
 
1418
 
1419
 
1420
    var validatorLanguages = $('#form-language').validate({
1421
        debug: true,
1422
        onclick: false,
1423
        onkeyup: false,
1424
         onfocusout: false,
1425
        ignore: [],
1426
        rules: {
1427
            'languages[]': {
1428
                required: true,
1429
            }
1430
        },
1431
        submitHandler: function(form)
1432
        {
1433
            NProgress.start();
1434
            $.ajax({
1435
                'dataType'  : 'json',
1436
                'accept'    : 'application/json',
1437
                'method'    : 'post',
1438
                'url'       :  route_languages,
1439
                'data'      :  {
1440
                    'languages[]' : $('#form-language #languages').val()
1441
                },
1442
            }).done(function(response) {
1443
                if(response['success']) {
1444
 
1445
					$('#list-languages').empty();
1446
                    $.each(response['data'], function(index, item) {
1447
                        $('#list-languages').append('<li><a href="#" title="">' + item.label + '</a></li>');
1448
                    });
1449
 
1450
                    $("#languages-box").modal('hide');
1451
                } else {
1452
                    validatorLanguages.resetForm();
1453
                    if(jQuery.type(response['data']) == 'string') {
1454
                        $.fn.showError(response['data']);
1455
                    } else  {
1456
                        $.each(response['data'], function( fieldname, errors ) {
1457
                            $.fn.showFormErrorValidator('#form-language #' + fieldname, errors);
1458
                        });
1459
                    }
1460
                }
1461
            }).fail(function( jqXHR, textStatus, errorThrown) {
1462
                $.fn.showError(textStatus);
1463
            }).always(function() {
1464
                NProgress.done();
1465
            });
1466
            return false;
1467
        },
1468
        invalidHandler: function(form, validator) {
1469
 
1470
        }
1471
    });
1472
 
7774 stevensc 1473
    $('.btn-languages-edit').on("click", function(e){
1474
        e.preventDefault();
1 www 1475
 
1476
        NProgress.start();
1477
        $.ajax({
1478
            'dataType'  : 'json',
1479
            'accept'    : 'application/json',
1480
            'method'    : 'get',
1481
            'url'       : route_languages,
1482
        }).done(function(response) {
1483
           if(response['success']) {
1484
                $('#form-language #languages').val(response['data']).trigger('change');
1485
                validatorLanguages.resetForm();
1486
 
1487
                $("#languages-box").modal('show');
1488
            } else {
1489
                $.fn.showError(response['data']);
1490
            }
1491
        }).fail(function( jqXHR, textStatus, errorThrown) {
1492
            $.fn.showError(textStatus);
1493
        }).always(function() {
1494
            NProgress.done();
1495
        });
1496
        return false;
1497
 
1498
    });
1499
 
1500
    $('.btn-languages-close').on("click", function(e){
1501
        e.preventDefault();
1502
 
1503
        $("#languages-box").modal('hide');
1504
        return false;
1505
    });
1506
 
1507
 
1508
    var validatorDegrees = $('#form-degree').validate({
1509
        debug: true,
1510
        onclick: false,
1511
        onkeyup: false,
1512
         onfocusout: false,
1513
        ignore: [],
1514
        rules: {
1515
            'degrees[]': {
1516
                required: true,
1517
            }
1518
        },
1519
        submitHandler: function(form)
1520
        {
1521
            NProgress.start();
1522
            $.ajax({
1523
                'dataType'  : 'json',
1524
                'accept'    : 'application/json',
1525
                'method'    : 'post',
1526
                'url'       :  route_degrees,
1527
                'data'      :  {
1528
                    'degrees[]' : $('#form-degree #degrees').val()
1529
                },
1530
            }).done(function(response) {
1531
                if(response['success']) {
1532
 
1533
					$('#list-degrees').empty();
1534
                    $.each(response['data'], function(index, item) {
1535
                        $('#list-degrees').append('<li><a href="#" title="">' + item.label + '</a></li>');
1536
                    });
1537
 
1538
                    $("#degrees-box").modal('hide');
1539
                } else {
1540
                    validatorDegrees.resetForm();
1541
                    if(jQuery.type(response['data']) == 'string') {
1542
                        $.fn.showError(response['data']);
1543
                    } else  {
1544
                        $.each(response['data'], function( fieldname, errors ) {
1545
                            $.fn.showFormErrorValidator('#form-degree #' + fieldname, errors);
1546
                        });
1547
                    }
1548
                }
1549
            }).fail(function( jqXHR, textStatus, errorThrown) {
1550
                $.fn.showError(textStatus);
1551
            }).always(function() {
1552
                NProgress.done();
1553
            });
1554
            return false;
1555
        },
1556
        invalidHandler: function(form, validator) {
1557
 
1558
        }
1559
    });
1560
 
1561
    $('.btn-degrees-edit').on("click", function(e){
1562
        e.preventDefault();
1563
 
1564
        NProgress.start();
1565
        $.ajax({
1566
            'dataType'  : 'json',
1567
            'accept'    : 'application/json',
1568
            'method'    : 'get',
1569
            'url'       : route_degrees,
1570
        }).done(function(response) {
1571
           if(response['success']) {
1572
                $('#form-degree #degrees').val(response['data']).trigger('change');
1573
                validatorDegrees.resetForm();
1574
 
1575
                $("#degrees-box").modal('show');
1576
            } else {
1577
                $.fn.showError(response['data']);
1578
            }
1579
        }).fail(function( jqXHR, textStatus, errorThrown) {
1580
            $.fn.showError(textStatus);
1581
        }).always(function() {
1582
            NProgress.done();
1583
        });
1584
        return false;
1585
 
1586
    });
1587
 
1588
    $('.btn-degrees-close').on("click", function(e){
1589
        e.preventDefault();
1590
 
1591
        $("#degrees-box").modal('hide');
1592
        return false;
1593
    });
1594
 
1595
 
1596
    $('#form-degree #degrees').select2({
1597
        theme: 'bootstrap4',
1598
        width: '100%',
1599
        placeholder: 'LABEL_SELECT_DEGREE'
1600
    });
1601
 
1602
    $('#form-skill #skills').select2({
1603
        theme: 'bootstrap4',
1604
        width: '100%',
1605
        placeholder: 'LABEL_SELECT_ONE_SKILLS'
1606
    });
1607
 
1608
    $('#form-language #languages').select2({
1609
        theme: 'bootstrap4',
1610
        width: '100%',
1611
        placeholder: 'LABEL_SELECT_ONE_LANGUAGE'
1612
    });
1613
 
1614
 
1615
 
1616
    $('#form-last-date-of-application #last_date_of_application').datetimepicker({
1617
        locale: 'es',
1618
        format: 'DD/MM/YYYY'
1619
    });
1620
 
1621
    $('#form-salary #salary_visible').bootstrapToggle({'on' : 'LABEL_SHOW',  'off' : 'LABEL_NO_SHOW', 'width' : '160px', 'height' : '40px'});
1622
    $('#form-salary #salary_min').inputNumberFormat({ 'decimal': 2 });
1623
    $('#form-salary #salary_max').inputNumberFormat({ 'decimal': 2 });
1624
 
1625
    $('#form-salary #salary_visible').change(function(e) {
1626
        e.preventDefault();
1627
 
1628
        if($(this).prop('checked')) {
1629
            $('#form-salary #salary_min').prop('readonly', false);
1630
            $('#form-salary #salary_max').prop('readonly', false);
1631
            $('#form-salary #salary_currency').prop('disabled', false);
1632
        } else {
1633
            $('#form-salary #salary_min').val('1');
1634
            $('#form-salary #salary_max').val('99');
1635
            $('#form-salary #salary_min').prop('readonly', true);
1636
            $('#form-salary #salary_max').prop('readonly', true);
1637
            $('#form-salary #salary_currency').prop('disabled', true);
1638
        }
1639
    });
1640
 
1641
    $('#form-experience #experience_visible').bootstrapToggle({'on' : 'LABEL_SHOW',  'off' : 'LABEL_NO_SHOW', 'width' : '160px', 'height' : '40px'});
1642
    $('#form-experience #experience_min').inputNumberFormat({ 'decimal': 0 });
1643
    $('#form-experience #experience_max').inputNumberFormat({ 'decimal': 0 });
1644
 
1645
    $('#form-experience #experience_visible').change(function(e) {
1646
        e.preventDefault();
1647
 
1648
        if($(this).prop('checked')) {
1649
            $('#form-experience #experience_min').prop('readonly', false);
1650
            $('#form-experience #experience_max').prop('readonly', false);
1651
        } else {
1652
            $('#form-experience #experience_min').val('1');
1653
            $('#form-experience #experience_max').val('5');
1654
            $('#form-experience #experience_min').prop('readonly', true);
1655
            $('#form-experience #experience_max').prop('readonly', true);
1656
       }
1657
    });
8107 stevensc 1658
 
1659
 
1660
    var validatorStatus = $('#form-status').validate({
1661
        debug: true,
1662
        onclick: false,
1663
        onkeyup: false,
1664
        ignore: [],
1665
        rules: {
1666
            'status': {
1667
                required: false,
1668
            },
1669
        },
1670
        submitHandler: function(form)
1671
        {
1672
            NProgress.start();
1673
            $.ajax({
1674
                'dataType'  : 'json',
1675
                'accept'    : 'application/json',
1676
                'method'    : 'post',
1677
                'url'       :  route_status,
1678
                'data'      :  $('#form-status').serialize()
1679
            }).done(function(response) {
1680
                if(response['success']) {
1681
					$('#overview-status').html(response['data']['status']);
1682
                    $("#status-box").modal('hide');
1683
                } else {
1684
                    validatorStatus.resetForm();
1685
                    if(jQuery.type(response['data']) == 'string') {
1686
                        $.fn.showError(response['data']);
1687
                    } else  {
1688
                        $.each(response['data'], function( fieldname, errors ) {
1689
                            $.fn.showFormErrorValidator('#form-status #' + fieldname, errors);
1690
                        });
1691
                    }
1692
                }
1693
            }).fail(function( jqXHR, textStatus, errorThrown) {
1694
                $.fn.showError(textStatus);
1695
            }).always(function() {
1696
                NProgress.done();
1697
            });
1698
            return false;
1699
        },
1700
        invalidHandler: function(form, validator) {
1701
 
1702
        }
1703
    });
1 www 1704
 
8107 stevensc 1705
    $('.btn-status-edit').on("click", function(e){
1706
        e.preventDefault();
1707
 
1708
        NProgress.start();
1709
        $.ajax({
1710
            'dataType'  : 'json',
1711
            'accept'    : 'application/json',
1712
            'method'    : 'get',
1713
            'url'       : route_status,
1714
        }).done(function(response) {
1715
           if(response['success']) {
1716
                $('#form-status #status').val(response['data']['status']);
1717
                validatorStatus.resetForm();
1718
                $("#status-box").modal('show');
1719
            } else {
1720
                $.fn.showError(response['data']);
1721
            }
1722
        }).fail(function( jqXHR, textStatus, errorThrown) {
1723
            $.fn.showError(textStatus);
1724
        }).always(function() {
1725
            NProgress.done();
1726
        });
1727
        return false;
1728
 
1729
    });
1 www 1730
 
8107 stevensc 1731
    $('.btn-status-close').on("click", function(e){
1732
        e.preventDefault();
1733
 
1734
        $("#status-box").modal('hide');
1735
        return false;
1736
    });
1737
 
1738
 
1739
    var validatorTitle = $('#form-title').validate({
1740
        debug: true,
1741
        onclick: false,
1742
        onkeyup: false,
1743
        ignore: [],
1744
        rules: {
1745
            'title': {
1746
                required: true,
1747
                maxlength: 128,
1748
            },
1749
        },
1750
        submitHandler: function(form)
1751
        {
1752
            NProgress.start();
1753
            $.ajax({
1754
                'dataType'  : 'json',
1755
                'accept'    : 'application/json',
1756
                'method'    : 'post',
1757
                'url'       :  route_title,
1758
                'data'      :  $('#form-title').serialize()
1759
            }).done(function(response) {
1760
                if(response['success']) {
1761
					$('#overview-title').html(response['data']['title']);
1762
                    $("#title-box").modal('hide');
1763
                } else {
1764
                    validatorTitle.resetForm();
1765
                    if(jQuery.type(response['data']) == 'string') {
1766
                        $.fn.showError(response['data']);
1767
                    } else  {
1768
                        $.each(response['data'], function( fieldname, errors ) {
1769
                            $.fn.showFormErrorValidator('#form-title #' + fieldname, errors);
1770
                        });
1771
                    }
1772
                }
1773
            }).fail(function( jqXHR, textTitle, errorThrown) {
1774
                $.fn.showError(textTitle);
1775
            }).always(function() {
1776
                NProgress.done();
1777
            });
1778
            return false;
1779
        },
1780
        invalidHandler: function(form, validator) {
1781
 
1782
        }
1783
    });
1784
 
1785
    $('.btn-title-edit').on("click", function(e){
1786
        e.preventDefault();
1787
 
1788
        NProgress.start();
1789
        $.ajax({
1790
            'dataType'  : 'json',
1791
            'accept'    : 'application/json',
1792
            'method'    : 'get',
1793
            'url'       : route_title,
1794
        }).done(function(response) {
1795
           if(response['success']) {
1796
                $('#form-title #title').val(response['data']['title'] );
1797
                validatorTitle.resetForm();
1798
                $("#title-box").modal('show');
1799
            } else {
1800
                $.fn.showError(response['data']);
1801
            }
1802
        }).fail(function( jqXHR, textTitle, errorThrown) {
1803
            $.fn.showError(textTitle);
1804
        }).always(function() {
1805
            NProgress.done();
1806
        });
1807
        return false;
1808
 
1809
    });
1810
 
1811
    $('.btn-title-close').on("click", function(e){
1812
        e.preventDefault();
1813
 
1814
        $("#title-box").modal('hide');
1815
        return false;
1816
    });
1817
 
1818
    $('h1.btn-edit-back').on("click", function(e){
1819
        e.preventDefault();
1820
 
1821
 
1822
 
1823
        $('#divEdit').hide();
1824
        $('#divListing').show();
1825
        return false;
1826
    });
1827
 
1828
 
1829
    CKEDITOR.replace('description', {
1830
        toolbar: [
1831
            { name: 'editing', items: [ 'Scayt' ] },
1832
            { name: 'links', items: [ 'Link', 'Unlink'] },
1833
            { name: 'paragraph', items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote' ] },
1834
            { name: 'basicstyles', items: [ 'Bold', 'Italic', 'Strike', 'RemoveFormat' ] },
1835
            '/',
1836
            { name: 'insert', items: [ 'Image', 'Table', 'HorizontalRule', 'SpecialChar' ] },
1837
            { name: 'styles', items: [ 'Styles', 'Format' ] },
1838
            { name: 'tools', items: [ 'Maximize' ] }
1839
        ],
1840
        removePlugins: 'elementspath,Anchor',
1841
        height: 100
1842
    });
1843
 
1844
    autocompleteLocation.addListener('place_changed', $.fn.fillInAddressLocation);
1845
    autocompleteLocationNew.addListener('place_changed', $.fn.fillInAddressNewLocation);
1 www 1846
});
1847
JS;
1848
$this->inlineScript()->captureEnd();
8109 stevensc 1849
 
1850
$js = <<<JS
1851
const linksVars = {
1852
    link_add:"$routeAdd",
1853
    link_table: "$routeDatatable",
1854
    allowAdd: "$allowAdd",
1855
    allowDelete: "$allowDelete",
1856
    allowEdit: "$allowEdit",
1857
    allowUsersWhoApplied: "$allowUsersWhoApplied",
1858
    googleApi: "$google_map_key"
1859
}
1860
JS;
1861
 
1862
$this->inlineScript()->appendScript($js);
1863
$this->headLink()->appendStylesheet('/react-bundles/jobs/main.css');
1864
$this->inlineScript()->appendFile('/react-bundles/jobs/jobsBundle.js');
1 www 1865
?>
8108 stevensc 1866
<div class="jobs">
1867
</div>
3766 stevensc 1868
 
1 www 1869
<!-- Content Header (Page header) -->
8107 stevensc 1870
<div id="divListing">
1 www 1871
 
8107 stevensc 1872
    <section class="content-header">
1873
        <div class="container-fluid">
1874
            <div class="row mb-2">
1875
                <div class="col-sm-12">
1876
                    <h1>LABEL_JOBS</h1>
1877
                </div>
1878
            </div>
1879
        </div><!-- /.container-fluid -->
1880
    </section>
3766 stevensc 1881
 
8107 stevensc 1882
    <section class="content">
1883
        <div class="container-fluid">
1884
            <div class="row">
1885
                <div class="col-12">
1886
                    <div class="card">
1887
                        <div class="card-body">
1888
                            <table id="gridTable" class="table   table-hover">
1889
                                <thead>
1890
                                    <tr>
3766 stevensc 1891
 
8107 stevensc 1892
                                        <th>LABEL_LAST_DATE_OF_APPLICATION</th>
1893
                                        <th>LABEL_TITLE</th>
1894
                                        <th>LABEL_DETAILS</th>
1895
                                        <th>LABEL_ACTIONS</th>
1896
                                    </tr>
1897
                                </thead>
1898
                                <tbody>
1899
                                </tbody>
1900
                            </table>
1901
                        </div>
1902
                        <div class="card-footer clearfix">
1903
                            <div style="float:right;">
1904
                                <button type="button" class="btn btn-info btn-refresh"><i class="fa fa-refresh"></i> LABEL_REFRESH </button>
1905
                                <?php if ($allowAdd) : ?>
1906
                                    <button type="button" class="btn btn-primary btn-add"><i class="fa fa-plus"></i> LABEL_ADD </button>
1907
                                <?php endif; ?>
1908
                            </div>
1909
                        </div>
1910
                    </div>
1911
                </div>
1912
            </div>
1913
        </div>
1914
    </section>
1915
</div>
1916
 
1917
<div id="divEdit" style="display: none">
1918
 
1919
    <section class="content-header">
1920
        <div class="container-fluid">
1921
            <div class="row mb-2">
1922
                <div class="col-sm-12">
1923
                    <h1 class="btn-edit-back"><i class="fa fa-chevron-left" aria-hidden="true"></i> LABEL_EDIT_JOB</h1>
1924
 
1925
                </div>
1926
            </div>
1927
        </div><!-- /.container-fluid -->
1928
    </section>
1929
 
1930
    <section class="content">
1931
        <div class="container-fluid">
1932
 
1933
            <div class="row">
1934
                <div class="col-lg-3">
1935
                </div>
1936
                <div class="col-lg-6">
1937
                    <div class="main-ws-sec">
1938
 
1939
                        <!--user-profile-ov end -->
1940
                        <div class="user-profile-ov">
1941
                            <h3>
1942
                                LABEL_STATUS <a href="#" title="" class="btn-status-edit"> <i class="fa fa-pencil"></i></a>
1943
                            </h3>
1944
                            <p id="overview-status"></p>
1945
                        </div>
1946
 
1947
                        <div class="user-profile-ov">
1948
                            <h3>LABEL_TITLE
1949
                                <a href="#" title="" class="btn-title-edit"><i class="fa fa-pencil"></i></a>
1950
                            </h3>
1951
                            <p id="overview-title"></p>
1952
                        </div>
1953
                        <div class="user-profile-ov">
1954
                            <h3>LABEL_OVERVIEW
1955
                                <a href="#" title="" class="btn-extended-edit"><i class="fa fa-pencil"></i></a>
1956
                            </h3>
1957
                            <p id="overview-description"></p>
1958
                        </div>
1959
                        <!--user-profile-ov end-->
1960
                        <div class="user-profile-ov st2">
1961
                            <h3>LABEL_LAST_DATE_OF_APPLICATION
1962
                                <a href="#" title="" class="btn-last-date-of-application-edit"><i class="fa fa-pencil"></i></a> <a href="#" title="" class="esp-bx-open"></a>
1963
                            </h3>
1964
                            <span id="overview-last-date-of-application"></span>
1965
                        </div>
1966
                        <!--user-profile-ov end-->
1967
                        <div class="user-profile-ov">
1968
                            <h3>LABEL_EMPLOYMENT_TYPE
1969
                                <a href="#" title="" class="btn-employment-type-edit"><i class="fa fa-pencil"></i></a>
1970
                            </h3>
1971
                            <span id="overview-employment-type"></span>
1972
                        </div>
1973
                        <!--user-profile-ov end-->
1974
                        <div class="user-profile-ov">
1975
                            <h3>
1976
                                <a href="#" title="">LABEL_LOCATION</a>
1977
                                <a href="#" title="" class="btn-location-edit"><i class="fa fa-pencil"></i></a>
1978
                            </h3>
1979
                            <span id="overview-location"></span>
1980
                        </div>
1981
                        <!--user-profile-ov end-->
1982
                        <div class="user-profile-ov">
1983
                            <h3>
1984
                                LABEL_EXPERIENCE
1985
                                <a href="#" title="" class="btn-experience-edit"><i class="fa fa-pencil"></i></a>
1986
                            </h3>
1987
                            <span id="overview-experience"> </span>
1988
                        </div>
1989
                        <!--user-profile-ov end-->
1990
                        <div class="user-profile-ov">
1991
                            <h3>
1992
                                LABEL_SALARY
1993
                                <a href="#" title="" class="btn-salary-edit"><i class="fa fa-pencil"></i></a>
1994
                            </h3>
1995
                            <span id="overview-salary"></span>
1996
                        </div>
1997
                        <!--user-profile-ov end-->
1998
                        <div class="user-profile-ov">
1999
                            <h3>
2000
                                LABEL_CATEGORIE
2001
                                <a href="#" title="" class="btn-job-category-edit"><i class="fa fa-pencil"></i></a>
2002
                            </h3>
2003
                            <span id="overview-job-category"></span>
2004
                        </div>
2005
                        <!--user-profile-ov end-->
2006
                        <div class="user-profile-ov">
2007
                            <h3>
2008
                                LABEL_SKILLS <a href="#" title="" class="btn-skills-edit"> <i class="fa fa-pencil"></i></a>
2009
                            </h3>
2010
                            <ul id="list-skills">
2011
 
2012
 
2013
                            </ul>
2014
                        </div>
2015
                        <!--user-profile-ov end -->
2016
                        <div class="user-profile-ov">
2017
                            <h3>
2018
                                LABEL_LANGUAGES <a href="#" title="" class="btn-languages-edit"> <i class="fa fa-pencil"></i></a>
2019
                            </h3>
2020
                            <ul id="list-languages">
2021
 
2022
 
2023
                            </ul>
2024
                        </div>
2025
                        <!--user-profile-ov end -->
2026
                        <div class="user-profile-ov">
2027
                            <h3>
2028
                                LABEL_DEGREES <a href="#" title="" class="btn-degrees-edit"> <i class="fa fa-pencil"></i></a>
2029
                            </h3>
2030
                            <ul id="list-degrees">
2031
 
2032
 
2033
                            </ul>
2034
                        </div>
2035
 
2036
 
2037
 
2038
                    </div>
2039
                </div>
2040
                <div class="col-lg-3">
2041
                </div>
2042
            </div>
2043
        </div>
2044
    </section>
2045
</div>
2046
 
1 www 2047
<div class="modal" tabindex="-1" role="dialog" id="add-job-box">
3766 stevensc 2048
    <div class="modal-dialog" role="document">
2049
        <?php
2050
        $form = $this->formAdd;
2051
        $form->setAttributes([
2052
            'method'    => 'post',
2053
            'name'      => 'form-add',
2054
            'id'        => 'form-add'
2055
        ]);
2056
        $form->prepare();
2057
        echo $this->form()->openTag($form);
2058
 
2059
        $fieldnames = [
2060
            'formatted_address',
2061
            'address1',
2062
            'address2',
2063
            'country',
2064
            'state',
2065
            'city1',
2066
            'city2',
2067
            'postal_code',
2068
            'latitude',
2069
            'longitude',
2070
        ];
2071
 
2072
        foreach ($fieldnames as $fieldname) {
2073
 
2074
            $element = $form->get($fieldname);
2075
            echo $this->formHidden($element);
2076
        }
2077
        ?>
2078
        <div class="modal-content">
2079
            <div class="modal-header">
2080
                <h3 class="modal-title">LABEL_NEW_JOB</h3>
2081
            </div>
2082
            <div class="modal-body">
2083
                <div class="form-group">
2084
                    <?php
2085
                    $element = $form->get('title');
2086
                    $element->setOptions(['label' => 'LABEL_TITLE']);
2087
                    $element->setAttributes(['class' => 'form-control']);
2088
                    echo $this->formLabel($element);
2089
                    echo $this->formText($element);
1 www 2090
                    ?>
3766 stevensc 2091
                </div>
2092
                <div class="form-group">
2093
                    <?php
2094
                    $element = $form->get('employment_type');
2095
                    $element->setAttributes(['class' => 'form-control']);
2096
                    $element->setOptions(['empty_option' => 'LABEL_SELECT_EMPLOYMENT_TYPE', 'label' => 'LABEL_EMPLOYMENT_TYPE']);
2097
                    echo $this->formLabel($element);
2098
                    echo $this->formSelect($element);
1 www 2099
                    ?>
3766 stevensc 2100
                </div>
2101
                <div class="form-group">
2102
                    <?php
2103
                    $element = $form->get('last_date_of_application');
2104
                    $element->setAttributes(['class' => 'form-control']);
2105
                    $element->setOptions(['label' => 'LABEL_LAST_DATE_OF_APPLICATION']);
2106
                    echo $this->formLabel($element);
2107
                    echo $this->formText($element);
1 www 2108
                    ?>
3766 stevensc 2109
                </div>
2110
 
2111
                <div class="form-group">
2112
                    <?php
2113
                    $element = $form->get('job_category_id');
2114
                    $element->setOptions(['empty_option' => 'LABEL_SELECT_JOB_CATEGORY', 'label' => 'LABEL_JOB_CATEGORY']);
2115
                    $element->setAttributes(['class' => 'form-control']);
2116
                    echo $this->formLabel($element);
2117
                    echo $this->formSelect($element);
1 www 2118
                    ?>
3766 stevensc 2119
                </div>
2120
                <div class="form-group">
2121
                    <?php
2122
                    $element = $form->get('location_search');
2123
                    $element->setAttributes(['name' => 'add_location_search',  'id' => 'add_location_search', 'class' => 'form-control']);
2124
                    $element->setOptions(['label' => 'LABEL_LOCATION']);
2125
                    echo $this->formLabel($element);
2126
                    echo $this->formText($element);
1 www 2127
                    ?>
3766 stevensc 2128
                </div>
2129
            </div>
2130
 
2131
            <div class="modal-footer">
2132
                <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
2133
                <button type="button" class="btn btn-default btn-add-job-cancel">LABEL_CANCEL</button>
2134
            </div>
2135
            <?php echo $this->form()->closeTag($form); ?>
2136
        </div>
2137
    </div>
1 www 2138
</div>
3766 stevensc 2139
 
2140
 
1 www 2141
<!-- The Modal -->
2142
<div class="modal" id="modalUsersWhoApplied">
3766 stevensc 2143
    <div class="modal-dialog modal-xl">
2144
        <div class="modal-content">
1 www 2145
 
2146
            <!-- Modal Header -->
3766 stevensc 2147
            <div class="modal-header">
2148
                <h4 class="modal-title">LABEL_USERS_WHO_APPLIED</h4>
2149
                <button type="button" class="close" data-dismiss="modal">&times;</button>
2150
            </div>
1 www 2151
 
2152
            <!-- Modal body -->
3766 stevensc 2153
            <div class="modal-body">
2154
                <div style="height: 300px;overflow: scroll;">
2155
                    <table id="gridTableUsersWhoApplied" style="width: 100%" class="table table-bordered table-hover">
2156
                        <thead>
2157
                            <tr>
2158
                                <th>LABEL_FIRST_NAME</th>
2159
                                <th>LABEL_LAST_NAME</th>
2160
                                <th>LABEL_EMAIL</th>
2161
                                <th>LABEL_ACTIONS</th>
2162
                            </tr>
2163
                        </thead>
2164
                        <tbody>
2165
                        </tbody>
2166
                    </table>
2167
                </div>
1 www 2168
 
3766 stevensc 2169
            </div>
2170
 
1 www 2171
            <!-- Modal footer -->
3766 stevensc 2172
            <div class="modal-footer">
2173
                <button type="button" class="btn btn-danger" data-dismiss="modal">LABEL_CLOSE</button>
2174
            </div>
1 www 2175
 
3766 stevensc 2176
        </div>
2177
    </div>
2178
</div>
1 www 2179
 
8107 stevensc 2180
<div class="modal" tabindex="-1" role="dialog" id="extended-box">
2181
    <div class="modal-dialog" role="document">
2182
        <?php
2183
        $form = $this->formExtended;
2184
        $form->setAttributes([
2185
            'method' => 'post',
2186
            'name' => 'form-extended',
2187
            'id' => 'form-extended'
2188
        ]);
2189
        $form->prepare();
2190
        echo $this->form()->openTag($form);
2191
        ?>
2192
        <div class="modal-content">
2193
            <div class="modal-header">
2194
                <h3 class="modal-title">LABEL_OVERVIEW</h3>
2195
            </div>
2196
            <div class="modal-body">
2197
                <div class="form-group">
2198
                    <?php
2199
                    $element = $form->get('description');
2200
                    $element->setOptions(['label' => 'LABEL_OVERVIEW']);
2201
                    $element->setAttributes(['class' => 'form-control']);
2202
                    echo $this->formLabel($element);
2203
                    echo $this->formTextArea($element);
2204
                    ?>
2205
                </div>
2206
            </div>
2207
            <div class="modal-footer">
2208
                <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
2209
                <button type="button" class="btn btn-default btn-extended-close">LABEL_CANCEL</button>
2210
            </div>
2211
            <?php echo $this->form()->closeTag($form); ?>
2212
        </div>
2213
    </div>
2214
</div>
2215
 
2216
<div class="modal" tabindex="-1" role="dialog" id="location-box">
2217
    <div class="modal-dialog" role="document">
2218
        <?php
2219
        $form = $this->formLocation;
2220
        $form->setAttributes([
2221
            'method' => 'post',
2222
            'name' => 'form-location',
2223
            'id' => 'form-location'
2224
        ]);
2225
        $form->prepare();
2226
        echo $this->form()->openTag($form);
2227
 
2228
        $fieldnames = [
2229
            'formatted_address',
2230
            'address1',
2231
            'address2',
2232
            'country',
2233
            'state',
2234
            'city1',
2235
            'city2',
2236
            'postal_code',
2237
            'latitude',
2238
            'longitude',
2239
        ];
2240
 
2241
        foreach ($fieldnames as $fieldname) {
2242
 
2243
            $element = $form->get($fieldname);
2244
            echo $this->formHidden($element);
2245
        }
2246
        ?>
2247
        <div class="modal-content">
2248
            <div class="modal-header">
2249
                <h3 class="modal-title">LABEL_LOCATION</h3>
2250
            </div>
2251
            <div class="modal-body">
2252
                <div class="form-group datefm">
2253
                    <?php
2254
                    $element = $form->get('location_search');
2255
                    $element->setOptions(['label' => 'LABEL_LOCATION']);
2256
                    $element->setAttributes(['class' => 'form-control']);
2257
                    echo $this->formLabel($element);
2258
                    echo $this->formText($element);
2259
                    ?>
2260
                    <i class="fa fa-map-marker"></i>
2261
                </div>
2262
            </div>
2263
            <div class="modal-footer">
2264
                <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
2265
                <button type="button" class="btn btn-default btn-location-close">LABEL_CANCEL</button>
2266
            </div>
2267
            <?php echo $this->form()->closeTag($form); ?>
2268
        </div>
2269
    </div>
2270
</div>
2271
 
2272
<div class="modal" tabindex="-1" role="dialog" id="employment-type-box">
2273
    <div class="modal-dialog" role="document">
2274
        <?php
2275
        $form = $this->formEmploymentType;
2276
        $form->setAttributes([
2277
            'method' => 'post',
2278
            'name' => 'form-employment-type',
2279
            'id' => 'form-employment-type'
2280
        ]);
2281
        $form->prepare();
2282
        echo $this->form()->openTag($form);
2283
        ?>
2284
        <div class="modal-content">
2285
            <div class="modal-header">
2286
                <h3 class="modal-title">LABEL_EMPLOYMENT_TYPE</h3>
2287
            </div>
2288
            <div class="modal-body">
2289
                <div class="form-group">
2290
                    <?php
2291
                    $element = $form->get('employment_type');
2292
                    $element->setOptions(['label' => 'LABEL_EMPLOYMENT_TYPE']);
2293
                    $element->setAttributes(['class' => 'form-control']);
2294
                    echo $this->formLabel($element);
2295
                    echo $this->formSelect($element);
2296
                    ?>
2297
                </div>
2298
            </div>
2299
            <div class="modal-footer">
2300
                <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
2301
                <button type="button" class="btn btn-default btn-employment-type-close">LABEL_CANCEL</button>
2302
            </div>
2303
            <?php echo $this->form()->closeTag($form); ?>
2304
        </div>
2305
    </div>
2306
</div>
2307
 
1 www 2308
<div class="modal" tabindex="-1" role="dialog" id="job-category-box">
3766 stevensc 2309
    <div class="modal-dialog" role="document">
2310
        <?php
1 www 2311
        $form = $this->formJobCategory;
2312
        $form->setAttributes([
2313
            'method' => 'post',
2314
            'name' => 'form-job-category',
2315
            'id' => 'form-job-category'
2316
        ]);
2317
        $form->prepare();
2318
        echo $this->form()->openTag($form);
3766 stevensc 2319
        ?>
2320
        <div class="modal-content">
2321
            <div class="modal-header">
2322
                <h3 class="modal-title">LABEL_JOB_CATEGORY</h3>
2323
            </div>
2324
            <div class="modal-body">
1 www 2325
                <div class="form-group">
3766 stevensc 2326
                    <?php
2327
                    $element = $form->get('job_category_id');
2328
                    $element->setOptions(['label' => 'LABEL_JOB_CATEGORY']);
2329
                    $element->setAttributes(['class' => 'form-control']);
2330
                    echo $this->formLabel($element);
2331
                    echo $this->formSelect($element);
2332
                    ?>
1 www 2333
                </div>
3766 stevensc 2334
            </div>
2335
            <div class="modal-footer">
2336
                <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
2337
                <button type="button" class="btn btn-default btn-job-category-close">LABEL_CANCEL</button>
2338
            </div>
2339
            <?php echo $this->form()->closeTag($form); ?>
2340
        </div>
2341
    </div>
2342
</div>
1 www 2343
 
2344
<div class="modal" tabindex="-1" role="dialog" id="salary-box">
3766 stevensc 2345
    <div class="modal-dialog" role="document">
2346
        <?php
1 www 2347
        $form = $this->formSalary;
2348
        $form->setAttributes([
2349
            'method' => 'post',
2350
            'name' => 'form-salary',
2351
            'id' => 'form-salary'
2352
        ]);
2353
        $form->prepare();
2354
        echo $this->form()->openTag($form);
3766 stevensc 2355
        ?>
2356
        <div class="modal-content">
2357
            <div class="modal-header">
2358
                <h3 class="modal-title">LABEL_SALARY</h3>
2359
            </div>
2360
            <div class="modal-body">
1 www 2361
                <div class="form-group">
3766 stevensc 2362
                    <?php
2363
                    $element = $form->get('salary_visible');
2364
                    echo $this->formCheckbox($element);
2365
                    ?>
1 www 2366
                </div>
2367
                <div class="form-group">
3766 stevensc 2368
                    <?php
2369
                    $element = $form->get('salary_currency');
2370
                    $element->setAttributes(['class' => 'form-control']);
2371
                    $element->setOptions(['label' => 'LABEL_CURRENCY']);
2372
                    echo $this->formLabel($element);
2373
                    echo $this->formSelect($element);
2374
                    ?>
1 www 2375
                </div>
3766 stevensc 2376
                <div class="form-group">
2377
                    <?php
2378
                    $element = $form->get('salary_min');
2379
                    $element->setOptions(['label' => 'LABEL_MINIMUM']);
2380
                    $element->setAttributes(['class' => 'form-control']);
2381
                    echo $this->formLabel($element);
2382
                    echo $this->formText($element);
2383
                    ?>
1 www 2384
                </div>
2385
                <div class="form-group">
3766 stevensc 2386
                    <?php
2387
                    $element = $form->get('salary_max');
2388
                    $element->setOptions(['label' => 'LABEL_MAXIMUM']);
2389
                    $element->setAttributes(['class' => 'form-control']);
2390
                    echo $this->formLabel($element);
2391
                    echo $this->formText($element);
2392
                    ?>
1 www 2393
                </div>
3766 stevensc 2394
            </div>
2395
            <div class="modal-footer">
2396
                <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
2397
                <button type="button" class="btn btn-default btn-salary-close">LABEL_CANCEL</button>
2398
            </div>
2399
            <?php echo $this->form()->closeTag($form); ?>
2400
        </div>
2401
    </div>
2402
</div>
1 www 2403
 
2404
<div class="modal" tabindex="-1" role="dialog" id="experience-box">
3766 stevensc 2405
    <div class="modal-dialog" role="document">
2406
        <?php
1 www 2407
        $form = $this->formExperience;
2408
        $form->setAttributes([
2409
            'method' => 'post',
2410
            'name' => 'form-experience',
2411
            'id' => 'form-experience'
2412
        ]);
2413
        $form->prepare();
2414
        echo $this->form()->openTag($form);
3766 stevensc 2415
        ?>
2416
        <div class="modal-content">
2417
            <div class="modal-header">
2418
                <h3 class="modal-title">LABEL_EXPERIENCE</h3>
2419
            </div>
2420
            <div class="modal-body">
1 www 2421
                <div class="form-group">
3766 stevensc 2422
                    <?php
2423
                    $element = $form->get('experience_visible');
2424
 
2425
                    echo $this->formCheckbox($element);
2426
                    ?>
1 www 2427
                </div>
3766 stevensc 2428
                <div class="form-group">
2429
                    <?php
2430
                    $element = $form->get('experience_min');
2431
                    $element->setOptions(['label' => 'LABEL_MINIMUM']);
2432
                    $element->setAttributes(['class' => 'form-control']);
2433
                    echo $this->formLabel($element);
2434
                    echo $this->formText($element);
2435
                    ?>
1 www 2436
                </div>
2437
                <div class="form-group">
3766 stevensc 2438
                    <?php
2439
                    $element = $form->get('experience_max');
2440
                    $element->setOptions(['label' => 'LABEL_MAXIMUM']);
2441
                    $element->setAttributes(['class' => 'form-control']);
2442
                    echo $this->formLabel($element);
2443
                    echo $this->formText($element);
2444
                    ?>
1 www 2445
                </div>
3766 stevensc 2446
            </div>
2447
            <div class="modal-footer">
2448
                <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
2449
                <button type="button" class="btn btn-default btn-experience-close">LABEL_CANCEL</button>
2450
            </div>
2451
            <?php echo $this->form()->closeTag($form); ?>
2452
        </div>
2453
    </div>
2454
</div>
1 www 2455
 
2456
 
2457
<div class="modal" tabindex="-1" role="dialog" id="skills-box">
3766 stevensc 2458
    <div class="modal-dialog" role="document">
2459
        <?php
2460
        $form = $this->formSkill;
2461
        $form->setAttributes([
2462
            'method' => 'post',
2463
            'name' => 'form-skill',
2464
            'id' => 'form-skill'
2465
        ]);
2466
        $form->prepare();
2467
        echo $this->form()->openTag($form);
2468
        ?>
2469
        <div class="modal-content">
2470
            <div class="modal-header">
2471
                <h3 class="modal-title">LABEL_SKILLS</h3>
2472
            </div>
2473
            <div class="modal-body">
1 www 2474
                <div class="form-group">
3766 stevensc 2475
                    <?php
1 www 2476
                    $element = $form->get('skills');
2477
                    $element->setOptions(['label' => 'LABEL_SKILLS']);
2478
                    $element->setAttributes(['class' => 'form-control']);
2479
                    echo $this->formLabel($element);
2480
                    echo $this->formSelect($element);
3766 stevensc 2481
                    ?>
1 www 2482
                </div>
3766 stevensc 2483
            </div>
2484
 
2485
 
2486
            <div class="modal-footer">
2487
                <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
2488
                <button type="button" class="btn btn-default btn-skills-close">LABEL_CANCEL</button>
2489
            </div>
2490
            <?php echo $this->form()->closeTag($form); ?>
2491
        </div>
2492
    </div>
1 www 2493
</div>
2494
 
2495
<div class="modal" tabindex="-1" role="dialog" id="languages-box">
3766 stevensc 2496
    <div class="modal-dialog" role="document">
2497
        <?php
1 www 2498
        $form = $this->formLanguage;
2499
        $form->setAttributes([
2500
            'method' => 'post',
2501
            'name' => 'form-language',
2502
            'id' => 'form-language'
2503
        ]);
2504
        $form->prepare();
2505
        echo $this->form()->openTag($form);
3766 stevensc 2506
        ?>
2507
        <div class="modal-content">
2508
            <div class="modal-header">
2509
                <h3 class="modal-title">LABEL_LANGUAGES</h3>
2510
            </div>
2511
            <div class="modal-body">
1 www 2512
                <div class="form-group">
3766 stevensc 2513
                    <?php
1 www 2514
                    $element = $form->get('languages');
2515
                    $element->setOptions(['label' => 'LABEL_LANGUAGES']);
2516
                    $element->setAttributes(['class' => 'form-control']);
2517
                    echo $this->formLabel($element);
2518
                    echo $this->formSelect($element);
3766 stevensc 2519
                    ?>
1 www 2520
                </div>
3766 stevensc 2521
            </div>
2522
            <div class="modal-footer">
2523
                <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
2524
                <button type="button" class="btn btn-default btn-languages-close">LABEL_CANCEL</button>
2525
            </div>
2526
            <?php echo $this->form()->closeTag($form); ?>
2527
        </div>
2528
    </div>
1 www 2529
</div>
2530
 
8107 stevensc 2531
<div class="modal" tabindex="-1" role="dialog" id="last-date-of-application-box">
2532
    <div class="modal-dialog" role="document">
2533
        <?php
2534
        $form = $this->fromLastDateOfApplication;
2535
        $form->setAttributes([
2536
            'method' => 'post',
2537
            'name' => 'form-last-date-of-application',
2538
            'id' => 'form-last-date-of-application'
2539
        ]);
2540
        $form->prepare();
2541
        echo $this->form()->openTag($form);
2542
        ?>
2543
        <div class="modal-content">
2544
            <div class="modal-header">
2545
                <h3 class="modal-title">LABEL_LAST_DATE_OF_APPLICATION</h3>
2546
            </div>
2547
            <div class="modal-body">
2548
                <div class="form-group">
2549
                    <?php
2550
                    $element = $form->get('last_date_of_application');
2551
                    $element->setOptions(['label' => 'LABEL_LAST_DATE_OF_APPLICATION']);
2552
                    $element->setAttributes(['class' => 'form-control']);
2553
                    echo $this->formLabel($element);
2554
                    echo $this->formText($element);
2555
                    ?>
2556
                </div>
2557
            </div>
2558
            <div class="modal-footer">
2559
                <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
2560
                <button type="button" class="btn btn-default btn-last-date-of-application-close">LABEL_CANCEL</button>
2561
            </div>
2562
            <?php echo $this->form()->closeTag($form); ?>
2563
        </div>
2564
    </div>
2565
</div>
2566
 
1 www 2567
<div class="modal" tabindex="-1" role="dialog" id="degrees-box">
3766 stevensc 2568
    <div class="modal-dialog" role="document">
2569
        <?php
1 www 2570
        $form = $this->formDegree;
2571
        $form->setAttributes([
2572
            'method' => 'post',
2573
            'name' => 'form-degree',
2574
            'id' => 'form-degree'
2575
        ]);
2576
        $form->prepare();
2577
        echo $this->form()->openTag($form);
3766 stevensc 2578
        ?>
2579
        <div class="modal-content">
2580
            <div class="modal-header">
2581
                <h3 class="modal-title">LABEL_DEGREES</h3>
2582
            </div>
2583
            <div class="modal-body">
1 www 2584
                <div class="form-group">
3766 stevensc 2585
                    <?php
1 www 2586
                    $element = $form->get('degrees');
2587
                    $element->setOptions(['label' => 'LABEL_DEGREES']);
2588
                    $element->setAttributes(['class' => 'form-control']);
2589
                    echo $this->formLabel($element);
2590
                    echo $this->formSelect($element);
3766 stevensc 2591
                    ?>
1 www 2592
                </div>
3766 stevensc 2593
            </div>
2594
            <div class="modal-footer">
2595
                <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
2596
                <button type="button" class="btn btn-default btn-degrees-close">LABEL_CANCEL</button>
2597
            </div>
2598
            <?php echo $this->form()->closeTag($form); ?>
2599
        </div>
2600
    </div>
8107 stevensc 2601
</div>
2602
 
2603
<div class="modal" tabindex="-1" role="dialog" id="status-box">
2604
    <div class="modal-dialog" role="document">
2605
        <?php
2606
        $form = $this->formStatus;
2607
        $form->setAttributes([
2608
            'method' => 'post',
2609
            'name' => 'form-status',
2610
            'id' => 'form-status'
2611
        ]);
2612
        $form->prepare();
2613
        echo $this->form()->openTag($form);
2614
        ?>
2615
        <div class="modal-content">
2616
            <div class="modal-header">
2617
                <h3 class="modal-title">LABEL_STATUS</h3>
2618
            </div>
2619
            <div class="modal-body">
2620
                <div class="form-group">
2621
                    <?php
2622
                    $element = $form->get('status');
2623
                    $element->setOptions(['label' => 'LABEL_STATUS']);
2624
                    $element->setAttributes(['class' => 'form-control']);
2625
                    echo $this->formLabel($element);
2626
                    echo $this->formSelect($element);
2627
                    ?>
2628
                </div>
2629
            </div>
2630
 
2631
 
2632
            <div class="modal-footer">
2633
                <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
2634
                <button type="button" class="btn btn-default btn-status-close">LABEL_CANCEL</button>
2635
            </div>
2636
            <?php echo $this->form()->closeTag($form); ?>
2637
        </div>
2638
    </div>
2639
</div>
2640
 
2641
<div class="modal" tabindex="-1" role="dialog" id="title-box">
2642
    <div class="modal-dialog" role="document">
2643
        <?php
2644
        $form = $this->formTitle;
2645
        $form->setAttributes([
2646
            'method' => 'post',
2647
            'name' => 'form-title',
2648
            'id' => 'form-title'
2649
        ]);
2650
        $form->prepare();
2651
        echo $this->form()->openTag($form);
2652
        ?>
2653
        <div class="modal-content">
2654
            <div class="modal-header">
2655
                <h3 class="modal-title">LABEL_TITLE</h3>
2656
            </div>
2657
            <div class="modal-body">
2658
                <div class="form-group">
2659
                    <?php
2660
                    $element = $form->get('title');
2661
                    $element->setOptions(['label' => 'LABEL_TITLE']);
2662
                    $element->setAttributes(['class' => 'form-control']);
2663
                    echo $this->formLabel($element);
2664
                    echo $this->formText($element);
2665
                    ?>
2666
                </div>
2667
            </div>
2668
 
2669
 
2670
            <div class="modal-footer">
2671
                <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
2672
                <button type="button" class="btn btn-default btn-title-close">LABEL_CANCEL</button>
2673
            </div>
2674
            <?php echo $this->form()->closeTag($form); ?>
2675
        </div>
2676
    </div>
1 www 2677
</div>