Proyectos de Subversion LeadersLinked - Backend

Rev

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

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