Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 16822 | Ir a la última revisión | | Ultima modificación | Ver Log |

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