Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev Autor Línea Nro. Línea
1481 eleazar 1
<?php
2
$acl            = $this->viewModel()->getRoot()->getVariable('acl');
3
$currentUser    = $this->currentUserHelper();
4
$roleName       = $currentUser->getUserTypeId();
5
 
1482 eleazar 6
$routeDatatable = $this->url('recruitment-and-selection/candidates');
1506 eleazar 7
$routeAdd = $this->url('recruitment-and-selection/candidates/add', ['vacancy_uuid' => 'UUID_PLACEHOLDER']);
1481 eleazar 8
 
1482 eleazar 9
$allowAdd = $acl->isAllowed($roleName, 'recruitment-and-selection/candidates/add') ? 1 : 0;
10
$allowDelete = $acl->isAllowed($roleName, 'recruitment-and-selection/candidates/delete') ? 1 : 0;
1613 eleazar 11
$allowEdit = $acl->isAllowed($roleName, 'recruitment-and-selection/candidates/edit') ? 1 : 0;
1481 eleazar 12
 
13
$this->headLink()->appendStylesheet($this->basePath('plugins/nprogress/nprogress.css'));
14
$this->inlineScript()->appendFile($this->basePath('plugins/nprogress/nprogress.js'));
15
 
16
 
17
$this->inlineScript()->appendFile($this->basePath('plugins/bootbox/bootbox.min.js'));
18
 
1490 eleazar 19
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-fileinput/css/fileinput.min.css'));
20
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-fileinput/themes/explorer-fas/theme.css'));
1481 eleazar 21
 
1490 eleazar 22
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/plugins/piexif.js'));
23
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/plugins/sortable.js'));
24
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/fileinput.js'));
25
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/js/locales/es.js'));
26
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/themes/fas/theme.js'));
27
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-fileinput/themes/explorer-fas/theme.js'));
28
 
29
 
1481 eleazar 30
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/jquery.validate.js'));
31
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/additional-methods.js'));
32
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/localization/messages_es.js'));
33
 
34
$this->headLink()->appendStylesheet($this->basePath('plugins/datatables-bs4/css/dataTables.bootstrap4.min.css'));
35
$this->headLink()->appendStylesheet($this->basePath('plugins/datatables-responsive/css/responsive.bootstrap4.min.css'));
36
 
37
$this->inlineScript()->appendFile($this->basePath('plugins/datatables/jquery.dataTables.min.js'));
38
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-bs4/js/dataTables.bootstrap4.min.js'));
39
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/dataTables.responsive.min.js'));
40
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/responsive.bootstrap4.min.js'));
41
 
42
 
43
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/jquery.validate.js'));
44
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/additional-methods.js'));
45
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/localization/messages_es.js'));
46
 
47
 
48
 
49
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap4-toggle/css/bootstrap4-toggle.min.css'));
50
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap4-toggle/js/bootstrap4-toggle.min.js'));
51
 
52
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-confirmation/dist/bootstrap-confirmation.js'));
53
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-checkbox/awesome-bootstrap-checkbox.css'));
54
 
55
 
56
$this->inlineScript()->captureStart();
57
echo <<<JS
58
 
59
 
60
jQuery( document ).ready(function( $ ) {
61
 
62
    var allowAdd = $allowAdd;
1613 eleazar 63
    var allowDelete = $allowDelete;
64
    var allowEdit = $allowEdit;
1481 eleazar 65
 
66
        var gridTable = $('#gridTable').dataTable( {
67
            'processing': true,
68
            'serverSide': true,
69
            'searching': true,
70
            'order': [[ 1, 'asc' ]],
71
            'ordering':  true,
72
            'ordenable' : true,
73
            'responsive': true,
74
            'select' : false,
75
        	'paging': true,
76
            'pagingType': 'simple_numbers',
77
            'lengthMenu': [ [10, 25, 50, -1], [10, 25, 50, 'All'] ],
78
 
79
    		'ajax': {
80
    			'url' : '$routeDatatable',
81
    			'type' : 'get',
82
                'data': function ( d ) {
83
                },
84
                'beforeSend': function (request) {
85
                  NProgress.start();
86
                },
87
                'dataFilter': function(response) {
88
                    var response = jQuery.parseJSON( response );
89
 
90
                    var json                = {};
91
                    json.recordsTotal       = 0;
92
                    json.recordsFiltered    = 0;
93
                    json.data               = [];
94
 
95
                    if(response.success) {
96
                                               json.recordsTotal       = response.data.total;
97
                        json.recordsFiltered    = response.data.total;
98
                        json.data               = response.data.items;
99
                    } else {
100
                        $.fn.showError(response.data)
101
                    }
102
 
103
                    return JSON.stringify( json );
104
                }
105
    		},
106
            'language' : {
107
                'sProcessing':     'LABEL_DATATABLE_SPROCESSING',
108
                'sLengthMenu':     'LABEL_DATATABLE_SLENGTHMENU',
109
                'sZeroRecords':    'LABEL_DATATABLE_SZERORECORDS',
110
                'sEmptyTable':     'LABEL_DATATABLE_SEMPTYTABLE',
111
                'sInfo':           'LABEL_DATATABLE_SINFO',
112
                'sInfoEmpty':      'LABEL_DATATABLE_SINFOEMPTY',
113
                'sInfoFiltered':   'LABEL_DATATABLE_SINFOFILTERED',
114
                'sInfoPostFix':    '',
115
                'sSearch':         'LABEL_DATATABLE_SSEARCH',
116
                'sUrl':            '',
117
                'sInfoThousands':  ',',
118
                'sLoadingRecords': 'LABEL_DATATABLE_SLOADINGRECORDS',
119
                'oPaginate': {
120
                    'sFirst':    'LABEL_DATATABLE_SFIRST',
121
                    'sLast':     'LABEL_DATATABLE_SLAST',
122
                    'sNext':     'LABEL_DATATABLE_SNEXT',
123
                    'sPrevious': 'LABEL_DATATABLE_SPREVIOUS'
124
                },
125
                'oAria': {
126
                    'sSortAscending':  ': LABEL_DATATABLE_SSORTASCENDING',
127
                    'sSortDescending': ':LABEL_DATATABLE_SSORTDESCENDING'
128
                },
129
            },
130
            'drawCallback': function( settings ) {
131
                NProgress.done();
132
                $('button.btn-delete').confirmation({
133
                    rootSelector: 'button.btn-delete',
134
                    title : 'LABEL_ARE_YOU_SURE',
135
                    singleton : true,
136
                    btnOkLabel: 'LABEL_YES',
137
                    btnCancelLabel: 'LABEL_NO',
138
                    onConfirm: function(value) {
139
                        action = $(this).data('href');
140
                        NProgress.start();
141
                        $.ajax({
142
                            'dataType'  : 'json',
143
                            'accept'    : 'application/json',
144
                            'method'    : 'post',
145
                            'url'       :  action,
146
                        }).done(function(response) {
147
                            if(response['success']) {
148
                                $.fn.showSuccess(response['data']);
149
                                gridTable.api().ajax.reload(null, false);
150
                            } else {
151
                                $.fn.showError(response['data']);
152
                            }
153
                        }).fail(function( jqXHR, textStatus, errorThrown) {
154
                            $.fn.showError(textStatus);
155
                        }).always(function() {
156
                            NProgress.done();
157
                        });
158
                    },
159
                });
160
 
1492 eleazar 161
                $('#form-add #file').fileinput({
1484 eleazar 162
                    theme: 'fas',
163
                    language: 'es',
164
                    showUpload: false,
165
                    dropZoneEnabled: false,
166
                    maxFileCount: 1,
167
                    allowedFileExtensions: ['pdf', 'docx'],
1481 eleazar 168
                });
169
 
1484 eleazar 170
                $('body').on('click', 'button.btn-add', function(e) {
171
                     e.preventDefault();
172
 
173
 
1492 eleazar 174
                     $('#form-add #first_name').val('');
175
                     $('#form-add #last_name').val('');
176
                     $('#form-add #email').val('');
177
                     $('#form-add #file').fileinput('reset');
1583 eleazar 178
                     $('#form-add #file').val('');
1484 eleazar 179
                     validatorAdd.resetForm();
180
 
1616 eleazar 181
                     $('#add-candidate-box').modal('show');
1484 eleazar 182
                     return false;
1485 eleazar 183
                    });
1484 eleazar 184
 
1491 eleazar 185
                    $(".close-box, .btn-add-cancel").on("click", function(e){
1485 eleazar 186
                         e.preventDefault();
1616 eleazar 187
                         $('#add-candidate-box').modal('hide');
188
                         $('#edit-candidate-box').modal('hide');
1485 eleazar 189
                         return false;
190
                    });
191
 
1618 eleazar 192
    var validatorEdit = $('#form-edit').validate({
1616 eleazar 193
        debug: true,
194
        onclick: false,
195
        onkeyup: false,
196
        onfocusout: false,
197
        ignore: [],
198
        rules: {
199
            'first_name': {
200
                required: true,
201
                maxlength: 128,
202
            },
203
            'file': {
204
                required: false,
205
                extension: 'pdf|docx',
206
                accept: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/msword,application/pdf'
207
            },
208
            'last_name': {
209
                required: true,
210
            },
211
            'email' :  {
212
                required: true,
1622 eleazar 213
            },
1619 eleazar 214
            'status' : {
215
                required: true,
1622 eleazar 216
            }
1616 eleazar 217
        },
218
        submitHandler: function(form)
219
        {
220
            var formdata = false;
221
            if (window.FormData){
222
                formdata = new FormData(form); //form[0]);
223
            }
224
 
225
            $('input[type="submit"]').prop('disabled', true);
226
 
227
            $.ajax({
228
                'dataType'  : 'json',
229
                'accept'    : 'application/json',
230
                'method'    : 'post',
231
                'url'       :  $('#form-edit').attr('action'),
232
                'data'      :  formdata,
233
                'processData': false,
234
                'contentType': false,
235
            }).done(function(response) {
236
                if(response['success']) {
237
                    $.fn.showSuccess(response['data']);
238
 
239
                    $('#edit-candidate-box').modal('hide');
240
                    gridTable.api().ajax.reload(null, false);
241
                } else {
1618 eleazar 242
                    validatorEdit.resetForm();
1616 eleazar 243
                    if(jQuery.type(response['data']) == 'string') {
244
                        $.fn.showError(response['data']);
245
                    } else  {
246
                        $.each(response['data'], function( fieldname, errors ) {
247
                            $.fn.showFormErrorValidator('#form-edit #' + fieldname, errors);
248
                        });
249
                    }
250
                }
251
            }).fail(function( jqXHR, textStatus, errorThrown) {
252
                $.fn.showError(textStatus);
253
            }).always(function() {
254
                NProgress.done();
255
            });
256
            return false;
257
        },
258
        invalidHandler: function(form, validator) {
259
 
260
        }
261
    });
262
 
263
    $('body').on('click', 'button.btn-edit', function(e) {
264
            e.preventDefault();
265
 
266
            var url = $(this).data('href');
267
            $.ajax({
268
                'dataType'  : 'json',
269
                'accept'    : 'application/json',
270
                'method'    : 'get',
271
                'url'       :  url,
272
            }).done(function(response) {
273
                if(response['success']) {
1617 eleazar 274
                    $('#form-edit')[0].reset();
1616 eleazar 275
 
276
                    $('#form-edit').attr('action',url);
277
                    $('#form-edit #first_name').val(response['data']['first_name']);
278
                    $('#form-edit #last_name').val(response['data']['last_name']);
279
                    $('#form-edit #email').val(response['data']['email']);
280
                    $('#form-edit #file').fileinput('reset');
281
                    $('#form-edit #file').val('');
282
 
283
 
284
                    $('#form-edit #status').val(response['data']['status']);
285
 
286
                    $('#edit-candidate-box').modal('show');
287
                } else {
288
                    validatorEdit.resetForm();
289
                    if(jQuery.type(response['data']) == 'string') {
290
                        $.fn.showError(response['data']);
291
                    } else  {
292
                        $.each(response['data'], function( fieldname, errors ) {
293
                            $.fn.showFormErrorValidator('#form-edit #' + fieldname, errors);
294
                        });
295
                    }
296
                }
297
            }).fail(function( jqXHR, textStatus, errorThrown) {
298
                $.fn.showError(textStatus);
299
            }).always(function() {
300
                NProgress.done();
301
            });
302
        });
303
 
1486 eleazar 304
    var validatorAdd = $('#form-add').validate({
305
        debug: true,
306
        onclick: false,
307
        onkeyup: false,
308
        onfocusout: false,
309
        ignore: [],
310
        rules: {
1489 eleazar 311
            'first_name': {
1486 eleazar 312
                required: true,
313
                maxlength: 128,
1481 eleazar 314
            },
1486 eleazar 315
            'file': {
1629 eleazar 316
                required: false,
1486 eleazar 317
                extension: 'pdf|docx',
1495 eleazar 318
                accept: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/msword,application/pdf'
1486 eleazar 319
            },
320
            'last_name': {
321
                required: true,
322
            },
323
            'email' :  {
324
                required: true,
1622 eleazar 325
            },
326
            'status' : {
327
                required: true,
1486 eleazar 328
            }
329
        },
330
        submitHandler: function(form)
331
        {
332
            var formdata = false;
333
            if (window.FormData){
334
                formdata = new FormData(form); //form[0]);
335
            }
336
 
337
            $('input[type="submit"]').prop('disabled', true);
338
 
339
            $.ajax({
340
                'dataType'  : 'json',
341
                'accept'    : 'application/json',
342
                'method'    : 'post',
1494 eleazar 343
                'url'       :  $('#form-add').attr('action'),
1486 eleazar 344
                'data'      :  formdata,
345
                'processData': false,
346
                'contentType': false,
347
            }).done(function(response) {
348
                if(response['success']) {
349
                    $.fn.showSuccess(response['data']);
350
 
1616 eleazar 351
                    $('#add-candidate-box').modal('hide');
1486 eleazar 352
                    gridTable.api().ajax.reload(null, false);
353
                } else {
354
                    validatorAdd.resetForm();
355
                    if(jQuery.type(response['data']) == 'string') {
356
                        $.fn.showError(response['data']);
357
                    } else  {
358
                        $.each(response['data'], function( fieldname, errors ) {
1494 eleazar 359
                            $.fn.showFormErrorValidator('#form-add #' + fieldname, errors);
1486 eleazar 360
                        });
361
                    }
362
                }
363
            }).fail(function( jqXHR, textStatus, errorThrown) {
364
                $.fn.showError(textStatus);
365
            }).always(function() {
366
                NProgress.done();
367
            });
368
            return false;
369
        },
370
        invalidHandler: function(form, validator) {
371
 
372
        }
373
    });
374
 
375
            },
1481 eleazar 376
            'aoColumns': [
377
                { 'mDataProp': 'first_name' },
378
                { 'mDataProp': 'last_name' },
379
                { 'mDataProp': 'email' },
380
                { 'mDataProp': 'actions' },
381
    	    ],
382
            'columnDefs': [
383
 
384
 
385
                {
386
                    'targets': -1,
387
                    'orderable': false,
388
                    'render' : function ( data, type, row ) {
389
                        s = '';
390
 
1624 eleazar 391
                        if (allowEdit && data['link_edit']) {
1616 eleazar 392
                        s = s + '<button class="btn btn-info btn-sm btn-edit" data-href="' + data['link_edit']+ '" data-toggle="tooltip" title="LABEL_EDIT"><i class="fa fa-pencil"></i> LABEL_EDIT </button>&nbsp;';
1614 eleazar 393
                        }
394
 
1481 eleazar 395
                        if(allowDelete && data['link_delete']  ) {
396
                            s = s + '<button class="btn btn-danger btn-sm btn-delete" data-href="' + data['link_delete']+ '" data-toggle="tooltip" title="LABEL_DELETE"><i class="fa fa-times"></i> LABEL_DELETE </button>&nbsp;';
397
                        }
398
 
399
                        return s;
400
                    }
401
                }
402
              ],
403
        });
404
 
405
    $('#form-filter #form_uuid').change(function(e) {
406
        e.preventDefault();
407
 
1503 eleazar 408
        var uuid = e.target.value;
409
 
1507 eleazar 410
        $('#form-add').attr('action', String("$routeAdd").replaceAll('UUID_PLACEHOLDER', uuid));
1503 eleazar 411
 
1599 eleazar 412
        gridTable.api().ajax.url("$routeDatatable" + "/" + uuid);
1481 eleazar 413
        gridTable.api().ajax.reload(null, false);
414
    })
415
 
416
 
417
    $('body').on('click', 'button.btn-refresh', function(e) {
418
        e.preventDefault();
419
        gridTable.api().ajax.reload(null, false);
420
    });
1507 eleazar 421
 
422
    $('#form-filter #form_uuid').change();
1481 eleazar 423
});
424
JS;
425
$this->inlineScript()->captureEnd();
426
?>
427
 
428
 
429
<!-- Content Header (Page header) -->
430
<section class="content-header">
431
	<div class="container-fluid">
432
    	<div class="row mb-2">
433
        	<div class="col-sm-12">
434
            	<h1>LABEL_CANDIDATES</h1>
435
			</div>
436
		</div>
437
	</div><!-- /.container-fluid -->
438
</section>
439
 
440
<section class="content">
441
	<div class="container-fluid">
442
    	<div class="row">
443
        	<div class="col-12">
444
				<div class="card">
445
					<div class="card-header">
446
						<?php
1486 eleazar 447
                        // $form = $this->form;
1481 eleazar 448
            	        $form->setAttributes([
449
                            'name'    => 'form-filter',
450
                            'id'      => 'form-filter',
451
                        ]);
452
 
453
                        $form->prepare();
454
                        echo $this->form()->openTag($form);
455
                        ?>
456
                        <div class="row">
457
                            <div class="col-md-6 col-sm-12">
458
                                <div class="form-group">
459
                                    <?php
460
                                    $element = $form->get('form_uuid');
461
 
1484 eleazar 462
                                    $element->setOptions(['label' => 'LABEL_VACANCIES']);
1481 eleazar 463
 
464
                                    $element->setAttributes(['class' => 'form-control']);
465
                                    echo $this->formLabel($element);
466
                                    echo $this->formSelect($element);
467
                                    ?>
468
                                </div>
469
                            </div>
470
 
471
                        </div>
472
						<?php echo $this->form()->closeTag($form); ?>
473
					</div>
474
					<div class="card-body">
475
        	    		<table id="gridTable" class="table   table-hover">
476
                      		<thead>
477
        						<tr>
478
                                	<th>LABEL_FIRST_NAME</th>
479
                                	<th>LABEL_LAST_NAME</th>
480
                                	<th>LABEL_EMAIL</th>
481
                                  	<th>LABEL_ACTIONS</th>
482
                                </tr>
483
                       		</thead>
484
                         	<tbody>
485
                         	</tbody>
486
                    	</table>
487
                   	</div>
1483 eleazar 488
                       <div class="card-footer clearfix">
489
                       		<div style="float:right;">
490
    							<button type="button" class="btn btn-info btn-refresh"><i class="fa fa-refresh"></i> LABEL_REFRESH </button>
491
    							<?php if($allowAdd) : ?>
492
    							<button type="button" class="btn btn-primary btn-add"><i class="fa fa-plus"></i> LABEL_ADD </button>
493
    							<?php endif; ?>
494
    						</div>
495
                     	</div>
1481 eleazar 496
          		</div>
497
           	</div>
498
        </div>
499
 	</div>
500
</section>
1616 eleazar 501
 
502
<!-- The Add Modal -->
503
<div class="modal" tabindex="-1" role="dialog" id="add-candidate-box">
1485 eleazar 504
	<div class="modal-dialog" role="document">
505
		<?php
1487 eleazar 506
	    //$form = $this->formA;
1485 eleazar 507
	    $form->setAttributes([
508
	       'method'    => 'post',
509
	        'name'      => 'form-add',
1496 eleazar 510
            'action'    => $routeAdd,
1485 eleazar 511
	        'id'        => 'form-add'
512
	    ]);
513
	    $form->prepare();
514
	    echo $this->form()->openTag($form);
515
 
516
	    ?>
517
    	<div class="modal-content">
518
      		<div class="modal-header">
519
        		<h3 class="modal-title">LABEL_NEW_CANDIDATE</h3>
520
      		</div>
521
      		<div class="modal-body">
522
      			<div class="form-group">
523
    				<?php
524
                        $element = $form->get('first_name');
525
                        $element->setOptions(['label' => 'LABEL_FIRST_NAME']);
526
                        $element->setAttributes(['class' => 'form-control']);
527
                        echo $this->formLabel($element);
528
                        echo $this->formText($element);
529
                    ?>
530
				</div>
531
				<div class="form-group">
532
    				<?php
533
                        $element = $form->get('last_name');
534
                        $element->setOptions(['label' => 'LABEL_LAST_NAME']);
535
                        $element->setAttributes(['class' => 'form-control']);
536
                        echo $this->formLabel($element);
537
                        echo $this->formText($element);
538
                    ?>
539
				</div>
540
      			<div class="form-group">
541
    				<?php
542
                        $element = $form->get('email');
543
                        $element->setOptions(['label' => 'LABEL_EMAIL']);
544
                        $element->setAttributes(['class' => 'form-control']);
545
                        echo $this->formLabel($element);
546
                        echo $this->formText($element);
547
                    ?>
548
				</div>
549
 
550
				<div class="form-group">
551
    				<?php
552
                    $element = $form->get('file');
553
 
554
                    $element->setAttributes(['class' => 'form-control',  'accept' => 'pdf/docx']);
555
                    $element->setOptions(['label' => 'LABEL_CURRICULUM']);
556
                    echo $this->formLabel($element);
557
                    ?>
558
                    <div class="file-loading">
559
                    	<?php echo $this->formFile($element); ?>
1493 eleazar 560
                    </div>
1485 eleazar 561
				</div>
1619 eleazar 562
          		<div class="form-group">
563
    				<?php
564
                        $element = $form->get('status');
565
                        $element->setAttributes(['class' => 'form-control']);
566
                        $element->setOptions(['label' => 'LABEL_STATUS']);
567
                        echo $this->formLabel($element);
568
                        echo $this->formSelect($element);
569
                    ?>
570
				</div>
1485 eleazar 571
          	</div>
572
         	<div class="modal-footer">
573
    			<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
574
    			<button type="button" class="btn btn-default btn-add-cancel">LABEL_CANCEL</button>
575
          	</div>
576
      	<?php echo $this->form()->closeTag($form); ?>
577
    	</div>
578
	</div>
1616 eleazar 579
</div>
580
 
581
<!-- The Edit Modal -->
582
<div class="modal" tabindex="-1" role="dialog" id="edit-candidate-box">
583
	<div class="modal-dialog" role="document">
584
		<?php
585
	    $form->setAttributes([
586
	       'method'    => 'post',
587
	        'name'      => 'form-edit',
588
	        'id'        => 'form-edit'
589
	    ]);
590
	    $form->prepare();
591
	    echo $this->form()->openTag($form);
592
 
593
	    ?>
594
    	<div class="modal-content">
595
      		<div class="modal-header">
596
        		<h3 class="modal-title">LABEL_CANDIDATE</h3>
597
      		</div>
598
      		<div class="modal-body">
599
      			<div class="form-group">
600
    				<?php
601
                        $element = $form->get('first_name');
602
                        $element->setOptions(['label' => 'LABEL_FIRST_NAME']);
603
                        $element->setAttributes(['class' => 'form-control']);
604
                        echo $this->formLabel($element);
605
                        echo $this->formText($element);
606
                    ?>
607
				</div>
608
				<div class="form-group">
609
    				<?php
610
                        $element = $form->get('last_name');
611
                        $element->setOptions(['label' => 'LABEL_LAST_NAME']);
612
                        $element->setAttributes(['class' => 'form-control']);
613
                        echo $this->formLabel($element);
614
                        echo $this->formText($element);
615
                    ?>
616
				</div>
617
      			<div class="form-group">
618
    				<?php
619
                        $element = $form->get('email');
620
                        $element->setOptions(['label' => 'LABEL_EMAIL']);
621
                        $element->setAttributes(['class' => 'form-control']);
622
                        echo $this->formLabel($element);
623
                        echo $this->formText($element);
624
                    ?>
625
				</div>
626
 
627
				<div class="form-group">
628
    				<?php
629
                    $element = $form->get('file');
630
 
631
                    $element->setAttributes(['class' => 'form-control',  'accept' => 'pdf/docx']);
632
                    $element->setOptions(['label' => 'LABEL_CURRICULUM']);
633
                    echo $this->formLabel($element);
634
                    ?>
635
                    <div class="file-loading">
636
                    	<?php echo $this->formFile($element); ?>
637
                    </div>
638
				</div>
1619 eleazar 639
 
640
          		<div class="form-group">
641
    				<?php
642
                        $element = $form->get('status');
643
                        $element->setAttributes(['class' => 'form-control']);
644
                        $element->setOptions(['label' => 'LABEL_STATUS']);
645
                        echo $this->formLabel($element);
646
                        echo $this->formSelect($element);
647
                    ?>
648
				</div>
1616 eleazar 649
          	</div>
650
         	<div class="modal-footer">
651
    			<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
652
    			<button type="button" class="btn btn-default btn-add-cancel">LABEL_CANCEL</button>
653
          	</div>
654
      	<?php echo $this->form()->closeTag($form); ?>
655
    	</div>
656
	</div>
1485 eleazar 657
</div>