Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev Autor Línea Nro. Línea
1 www 1
<?php
2
$acl            = $this->viewModel()->getRoot()->getVariable('acl');
3
$currentUser    = $this->currentUserHelper();
4
$roleName       = $currentUser->getUserTypeId();
5
 
6
$routeDatatable = $this->url('microlearning/content/slides');
7
 
8
$allowAdd = $acl->isAllowed($roleName, 'microlearning/content/slides/add') ? 1 : 0;
9
$allowEdit = $acl->isAllowed($roleName, 'microlearning/content/slides/edit') ? 1 : 0;
10
$allowDelete = $acl->isAllowed($roleName, 'microlearning/content/slides/delete') ? 1 : 0;
11
 
16822 efrain 12
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/nprogress/nprogress.css'));
13
$this->inlineScript()->appendFile($this->basePath('assets/vendors/nprogress/nprogress.js'));
1 www 14
 
16822 efrain 15
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/bootstrap-fileinput/css/fileinput.min.css'));
16
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/bootstrap-fileinput/themes/explorer-fa/theme.css'));
12071 nelberth 17
 
16843 efrain 18
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap-fileinput/js/plugins/piexif.js'));
19
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap-fileinput/js/plugins/sortable.js'));
16822 efrain 20
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap-fileinput/js/fileinput.js'));
21
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap-fileinput/js/locales/es.js'));
22
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap-fileinput/themes/fa/theme.js'));
23
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap-fileinput/themes/explorer-fa/theme.js'));
1 www 24
 
16822 efrain 25
$this->inlineScript()->appendFile($this->basePath('assets/vendors/ckeditor/ckeditor.js'));
26
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-input-number/input-number-format.jquery.js'));
1 www 27
 
16822 efrain 28
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/datatables.net-bs5/dataTables.bootstrap5.css'));
29
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/datatables.net-bs5-responsive/responsive.bootstrap5.css'));
1 www 30
 
16822 efrain 31
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net/jquery.dataTables.js'));
32
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net-bs5/dataTables.bootstrap5.js'));
33
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net-bs5-responsive/dataTables.responsive.min.js'));
34
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net-bs5-responsive/responsive.bootstrap5.min.js'));
1 www 35
 
16822 efrain 36
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/bootstrap4-toggle/css/bootstrap4-toggle.min.css'));
37
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap4-toggle/js/bootstrap4-toggle.min.js'));
1 www 38
 
39
$this->inlineScript()->captureStart();
40
echo <<<JS
41
 
42
jQuery( document ).ready(function( $ ) {
43
        var routeAdd = '';
44
 
45
        $.validator.setDefaults({
46
            debug: true,
47
            highlight: function(element) {
48
                $(element).addClass('is-invalid');
49
            },
50
            unhighlight: function(element) {
51
                $(element).removeClass('is-invalid');
52
            },
53
            errorElement: 'span',
54
            errorClass: 'error invalid-feedback',
55
            errorPlacement: function(error, element) {
6192 nelberth 56
 
1 www 57
            }
58
        });
59
 
60
 
17135 stevensc 61
        var allowEdit   = $allowEdit;
1 www 62
        var allowDelete = $allowDelete;
63
 
64
        var gridTable = $('#gridTable').dataTable( {
65
            'processing': true,
66
            'serverSide': true,
67
            'searching': true,
68
            'order': [[ 0, 'asc' ]],
69
            'ordering':  true,
70
            'ordenable' : true,
71
            'responsive': true,
72
            'select' : false,
73
        	'paging': true,
74
            'pagingType': 'simple_numbers',
75
 
76
    		'ajax': {
77
    			'url' : '$routeDatatable',
78
    			'type' : 'get',
79
                'data': function ( d ) {
80
                    d.capsule_uuid = $('#form-filter #capsule_uuid').val();
81
                },
82
                'beforeSend': function (request) {
83
                  NProgress.start();
84
                },
85
                'dataFilter': function(response) {
86
                    var response = jQuery.parseJSON( response );
87
 
88
                    var json                = {};
89
                    json.recordsTotal       = 0;
90
                    json.recordsFiltered    = 0;
91
                    json.data               = [];
92
 
93
                    if(response.success) {
94
                        $('#form-capsule-add').attr('action', response.data.link_add );
95
 
96
                        if(response.data.capsules) {
97
                            $('#form-filter #capsule_uuid').empty();
98
                            $.each(response.data.capsules, function(index, value) {
99
                                  $('#form-filter #capsule_uuid').append('<option value="' + index + '">' + value + '</option>')
100
                            });
101
                        }
102
 
103
                        routeAdd = response.data.link_add;
104
                        if(response.data.link_add) {
105
 
106
                            $('button.btn-add').removeAttr('disabled');
107
                        } else {
108
                            $('button.btn-add').attr('disabled', 'disabled');
109
                        }
110
 
111
                        json.recordsTotal       = response.data.total;
112
                        json.recordsFiltered    = response.data.total;
113
                        json.data               = response.data.items;
114
                    } else {
115
                        $.fn.showError(response.data)
116
                    }
117
 
118
                    return JSON.stringify( json );
119
                }
120
    		},
121
            'language' : {
122
                'sProcessing':     'LABEL_DATATABLE_SPROCESSING',
123
                'sLengthMenu':     'LABEL_DATATABLE_SLENGTHMENU',
124
                'sZeroRecords':    'LABEL_DATATABLE_SZERORECORDS',
125
                'sEmptyTable':     'LABEL_DATATABLE_SEMPTYTABLE',
126
                'sInfo':           'LABEL_DATATABLE_SINFO',
127
                'sInfoEmpty':      'LABEL_DATATABLE_SINFOEMPTY',
128
                'sInfoFiltered':   'LABEL_DATATABLE_SINFOFILTERED',
129
                'sInfoPostFix':    '',
130
                'sSearch':         'LABEL_DATATABLE_SSEARCH',
131
                'sUrl':            '',
132
                'sInfoThousands':  ',',
133
                'sLoadingRecords': 'LABEL_DATATABLE_SLOADINGRECORDS',
134
                'oPaginate': {
135
                    'sFirst':    'LABEL_DATATABLE_SFIRST',
136
                    'sLast':     'LABEL_DATATABLE_SLAST',
137
                    'sNext':     'LABEL_DATATABLE_SNEXT',
138
                    'sPrevious': 'LABEL_DATATABLE_SPREVIOUS'
139
                },
140
                'oAria': {
141
                    'sSortAscending':  ': LABEL_DATATABLE_SSORTASCENDING',
142
                    'sSortDescending': ':LABEL_DATATABLE_SSORTDESCENDING'
143
                },
144
            },
145
            'drawCallback': function( settings ) {
146
                NProgress.done();
16822 efrain 147
 
1 www 148
            },
149
            'aoColumns': [
150
                { 'mDataProp': 'name' },
151
                { 'mDataProp': 'details' },
152
                { 'mDataProp': 'media' },
153
                { 'mDataProp': 'actions' },
154
    	    ],
155
            'columnDefs': [
156
                {
157
                    'targets': 0,
158
                    'className' : 'text-vertical-middle',
159
                },
160
                {
161
                    'targets': -3,
162
                    'orderable': false,
163
                    'render' : function ( data, type, row ) {
164
                        var s = '';
165
                        s += 'LABEL_TYPE: ' + data['type']  + '<br/>';
166
                        return s;
167
                    }
168
                },
169
                {
170
                    'targets': -2,
171
                    'orderable': false,
172
                    'render' : function ( data, type, row ) {
173
                        s = '';
174
                        if( data['image'] )  {
175
                            s = s + '&nbsp; <img class="btn-view-image"" data-href="' + data['image'] + '" data-toggle="tooltip" src="'+data['image']+'" title="LABEL_VIEW" style="width: 40px; object-fit: cover; height: 40px;" /> ';
176
                        }
177
 
178
                        if( data['audio'] )  {
179
                            s = s + '&nbsp;<button class="btn btn-play-audio" data-href="' + data['audio'] + '" data-toggle="tooltip" title="LABEL_PLAY_AUDIO"><i class="fa fa-play"></i></button> <br>';
180
                        }
181
 
182
                        if( data['video'] )  {
16945 efrain 183
                            s = s + '&nbsp;<button class="btn btn-play-video" data-href="' + data['video'] + '" data-toggle="tooltip" title="LABEL_PLAY_VIDEO"><i class="fa fa-video"></i></button> <br>';
1 www 184
                        }
185
 
186
 
187
                        if( data['document'] )  {
188
                            s = s + '&nbsp;<button class="btn btn-view-document" data-href="' + data['document'] + '" data-toggle="tooltip" title="LABEL_VIEW_DOCUMENT"><i class="fa fa-file"></i></button> <br>';
189
                        }
190
 
191
                        if( data['text'] )  {
192
                            s = s + '&nbsp;<button class="btn btn-view-text" data-href="' + data['text'] + '" data-toggle="tooltip" title="LABEL_VIEW_TEXT"><i class="fa fa-text-width"></i></button> <br>';
193
                        }
194
 
195
                        return s;
196
                    }
197
                },
198
 
199
 
200
                {
201
                    'targets': -1,
202
                    'orderable': false,
203
                    'render' : function ( data, type, row ) {
204
                        s = '';
205
 
206
                        if(allowEdit && data['link_edit']  ) {
16906 efrain 207
                            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-pen"></i> Editar </button>&nbsp;';
1 www 208
                        }
209
                        if(allowDelete && data['link_delete']  ) {
210
                            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-trash"></i> Eliminar</button>&nbsp;';
211
                        }
212
                        return s;
213
                    }
214
                }
215
              ],
216
        });
16905 efrain 217
 
218
 
1 www 219
    var validatorTextAdd  = $('#form-slide-text-add').validate({
220
        debug: true,
221
        onclick: false,
222
        onkeyup: false,
223
        ignore: [],
224
        rules: {
225
            'name': {
226
                required: true,
227
                maxlength: 128,
228
            },
229
            'description': {
230
                updateCkeditor:function() {
231
                        CKEDITOR.instances.description_add.updateElement();
232
                },
233
                required: true
234
            },
235
           'background': {
236
                required: true,
16905 efrain 237
                extension: 'jpg|jpeg|png',
238
                accept: 'image/jpg,image/jpeg,image/png'
1 www 239
            },
240
            'order' : {
241
                required: true,
242
                digits: true,
243
                min: 1,
244
                max: 250
245
            }
246
        },
247
        submitHandler: function(form)
248
        {
249
 
250
            var formdata = false;
251
            if (window.FormData){
252
                formdata = new FormData(form); //form[0]);
253
            }
254
 
6591 nelberth 255
            NProgress.start();
1 www 256
            $.ajax({
257
                'dataType'  : 'json',
258
                'accept'    : 'application/json',
259
                'method'    : 'post',
260
                'url'       :  routeAdd,
261
                'data'      :  formdata,
262
                'processData': false,
263
                'contentType': false,
264
            }).done(function(response) {
265
                if(response['success']) {
266
                    $.fn.showSuccess(response['data']);
16906 efrain 267
 
1 www 268
 
269
                    gridTable.api().ajax.reload(null, false);
16906 efrain 270
 
271
    	    	    $('#row-text-add-box').hide();
272
                	$('#row-text-edit-box').hide();
273
                	$('#row-image-add-box').hide();
274
                	$('#row-image-edit-box').hide();
275
                	$('#row-video-add-box').hide();
276
                	$('#row-video-edit-box').hide();
277
                	$('#row-document-add-box').hide();
278
                	$('#row-document-edit-box').hide();
279
                	$('#row-audio-add-box').hide();
280
                	$('#row-audio-edit-box').hide();
281
                	$('#row-quizz-add-box').hide();
282
                    $('#row-quizz-edit-box').hide();
283
                    $('#row-listing').show();
1 www 284
                } else {
285
                    validatorTextAdd.resetForm();
286
                    if(jQuery.type(response['data']) == 'string') {
287
                        $.fn.showError(response['data']);
288
                    } else  {
289
                        $.each(response['data'], function( fieldname, errors ) {
290
                            $.fn.showFormErrorValidator('#form-slide-text-add #' + fieldname, errors);
291
                        });
292
                    }
293
                }
294
            }).fail(function( jqXHR, textStatus, errorThrown) {
295
                $.fn.showError(textStatus);
296
            }).always(function() {
297
                NProgress.done();
7060 nelberth 298
 
16906 efrain 299
 
1 www 300
            });
301
            return false;
302
        },
303
        invalidHandler: function(form, validator) {
304
 
305
        }
306
    });
307
 
308
    var validatorTextEdit = $('#form-slide-text-edit').validate({
309
        debug: true,
310
        onclick: false,
311
        onkeyup: false,
312
        ignore: [],
313
        rules: {
314
            'name': {
315
                required: true,
316
                maxlength: 128,
317
            },
318
            'description': {
319
                updateCkeditor:function() {
320
                        CKEDITOR.instances.description_edit.updateElement();
321
                },
322
                required: true
323
            },
324
           'background': {
16906 efrain 325
                required: false,
326
                extension: 'jpg|jpeg|png',
327
                accept: 'image/jpg,image/jpeg,image/png'
1 www 328
            },
329
            'order' : {
330
                required: true,
331
                digits: true,
332
                min: 1,
333
                max: 250
334
            }
335
        },
336
        submitHandler: function(form)
337
        {
338
            var formdata = false;
339
            if (window.FormData){
340
                formdata = new FormData(form); //form[0]);
341
            }
342
 
7060 nelberth 343
 
16906 efrain 344
 
6595 nelberth 345
            NProgress.start();
1 www 346
            $.ajax({
347
                'dataType'  : 'json',
348
                'accept'    : 'application/json',
349
                'method'    : 'post',
350
                'url'       :  $('#form-slide-text-edit').attr('action'),
351
                'data'      :  formdata,
352
                'processData': false,
353
                'contentType': false,
354
            }).done(function(response) {
355
                if(response['success']) {
356
                    $.fn.showSuccess(response['data']);
6595 nelberth 357
 
16906 efrain 358
 
1 www 359
                    gridTable.api().ajax.reload(null, false);
16906 efrain 360
 
361
    	    	    $('#row-text-add-box').hide();
362
                	$('#row-text-edit-box').hide();
363
                	$('#row-image-add-box').hide();
364
                	$('#row-image-edit-box').hide();
365
                	$('#row-video-add-box').hide();
366
                	$('#row-video-edit-box').hide();
367
                	$('#row-document-add-box').hide();
368
                	$('#row-document-edit-box').hide();
369
                	$('#row-audio-add-box').hide();
370
                	$('#row-audio-edit-box').hide();
371
                	$('#row-quizz-add-box').hide();
372
                    $('#row-quizz-edit-box').hide();
373
                    $('#row-listing').show();
1 www 374
                } else {
375
                    validatorTextEdit.resetForm();
376
                    if(jQuery.type(response['data']) == 'string') {
377
                        $.fn.showError(response['data']);
378
                    } else  {
379
                        $.each(response['data'], function( fieldname, errors ) {
380
                            $.fn.showFormErrorValidator('#form-slide-text-edit #' + fieldname, errors);
381
                        });
382
                    }
383
                }
384
            }).fail(function( jqXHR, textStatus, errorThrown) {
385
                $.fn.showError(textStatus);
386
            }).always(function() {
387
                NProgress.done();
7060 nelberth 388
 
16906 efrain 389
 
1 www 390
            });
391
            return false;
392
        },
393
        invalidHandler: function(form, validator) {
394
 
395
        }
396
    });
397
 
398
    var validatorImageAdd  = $('#form-slide-image-add').validate({
399
        debug: true,
400
        onclick: false,
401
        onkeyup: false,
402
        ignore: [],
403
        rules: {
404
            'name': {
405
                required: true,
406
                maxlength: 128,
407
            },
408
           'file': {
409
                required: true,
16906 efrain 410
                extension: 'jpg|jpeg|png',
411
                accept: 'image/jpg,image/jpeg,image/png'
1 www 412
            },
413
            'order' : {
414
                required: true,
415
                digits: true,
416
                min: 1,
417
                max: 250
418
            }
419
        },
420
        submitHandler: function(form)
421
        {
422
            var formdata = false;
423
            if (window.FormData){
424
                formdata = new FormData(form); //form[0]);
425
            }
426
 
7060 nelberth 427
 
16906 efrain 428
 
6499 nelberth 429
            NProgress.start();
1 www 430
            $.ajax({
431
                'dataType'  : 'json',
432
                'accept'    : 'application/json',
433
                'method'    : 'post',
434
                'url'       :  routeAdd,
435
                'data'      :  formdata,
436
                'processData': false,
437
                'contentType': false,
438
            }).done(function(response) {
6192 nelberth 439
                console.log(response)
1 www 440
                if(response['success']) {
441
                    $.fn.showSuccess(response['data']);
16906 efrain 442
 
1 www 443
 
444
                    gridTable.api().ajax.reload(null, false);
16906 efrain 445
 
446
    	    	    $('#row-text-add-box').hide();
447
                	$('#row-text-edit-box').hide();
448
                	$('#row-image-add-box').hide();
449
                	$('#row-image-edit-box').hide();
450
                	$('#row-video-add-box').hide();
451
                	$('#row-video-edit-box').hide();
452
                	$('#row-document-add-box').hide();
453
                	$('#row-document-edit-box').hide();
454
                	$('#row-audio-add-box').hide();
455
                	$('#row-audio-edit-box').hide();
456
                	$('#row-quizz-add-box').hide();
457
                    $('#row-quizz-edit-box').hide();
458
                    $('#row-listing').show();
1 www 459
                } else {
460
                    validatorImageAdd.resetForm();
461
                    if(jQuery.type(response['data']) == 'string') {
462
                        $.fn.showError(response['data']);
463
                    } else  {
464
                        $.each(response['data'], function( fieldname, errors ) {
465
                            $.fn.showFormErrorValidator('#form-slide-image-add #' + fieldname, errors);
466
                        });
467
                    }
468
                }
469
            }).fail(function( jqXHR, textStatus, errorThrown) {
470
                $.fn.showError(textStatus);
471
            }).always(function() {
472
                NProgress.done();
7060 nelberth 473
 
16906 efrain 474
 
1 www 475
            });
476
            return false;
477
        },
478
        invalidHandler: function(form, validator) {
479
 
480
        }
481
    });
482
 
483
    var validatorImageEdit = $('#form-slide-image-edit').validate({
484
        debug: true,
485
        onclick: false,
486
        onkeyup: false,
487
        ignore: [],
488
        rules: {
489
            'name': {
490
                required: true,
491
                maxlength: 128,
492
            },
493
            'file': {
16906 efrain 494
                required: false,
495
                extension: 'jpg|jpeg|png',
496
                accept: 'image/jpg,image/jpeg,image/png'
1 www 497
            },
498
            'order' : {
499
                required: true,
500
                digits: true,
501
                min: 1,
502
                max: 250
503
            }
504
        },
505
        submitHandler: function(form)
506
        {
507
            var formdata = false;
508
            if (window.FormData){
509
                formdata = new FormData(form); //form[0]);
510
            }
7060 nelberth 511
 
16906 efrain 512
 
6500 nelberth 513
            NProgress.start();
1 www 514
            $.ajax({
515
                'dataType'  : 'json',
516
                'accept'    : 'application/json',
517
                'method'    : 'post',
518
                'url'       :  $('#form-slide-image-edit').attr('action'),
519
                'data'      :  formdata,
520
                'processData': false,
521
                'contentType': false,
522
            }).done(function(response) {
523
                if(response['success']) {
524
                    $.fn.showSuccess(response['data']);
16906 efrain 525
 
1 www 526
 
527
                    gridTable.api().ajax.reload(null, false);
16906 efrain 528
 
529
    	    	    $('#row-text-add-box').hide();
530
                	$('#row-text-edit-box').hide();
531
                	$('#row-image-add-box').hide();
532
                	$('#row-image-edit-box').hide();
533
                	$('#row-video-add-box').hide();
534
                	$('#row-video-edit-box').hide();
535
                	$('#row-document-add-box').hide();
536
                	$('#row-document-edit-box').hide();
537
                	$('#row-audio-add-box').hide();
538
                	$('#row-audio-edit-box').hide();
539
                	$('#row-quizz-add-box').hide();
540
                    $('#row-quizz-edit-box').hide();
541
                    $('#row-listing').show();
1 www 542
                } else {
543
                    validatorImageEdit.resetForm();
544
                    if(jQuery.type(response['data']) == 'string') {
545
                        $.fn.showError(response['data']);
546
                    } else  {
547
                        $.each(response['data'], function( fieldname, errors ) {
548
                            $.fn.showFormErrorValidator('#form-slide-image-edit #' + fieldname, errors);
549
                        });
550
                    }
551
                }
552
            }).fail(function( jqXHR, textStatus, errorThrown) {
553
                $.fn.showError(textStatus);
554
            }).always(function() {
555
                NProgress.done();
7060 nelberth 556
 
16906 efrain 557
 
1 www 558
            });
559
            return false;
560
        },
561
        invalidHandler: function(form, validator) {
562
 
563
        }
564
    });
565
 
566
    var validatorVideoAdd  = $('#form-slide-video-add').validate({
567
        debug: true,
568
        onclick: false,
569
        onkeyup: false,
570
        ignore: [],
571
        rules: {
572
            'name': {
573
                required: true,
574
                maxlength: 128,
575
            },
576
           'file': {
577
                required: true,
578
                extension: 'webm,mp4,webm',
579
                accept: 'video/webm,video/mpeg,video/mp4'
580
            },
581
            'background': {
6620 nelberth 582
                required: true,
16906 efrain 583
                extension: 'jpg|jpeg|png',
584
                accept: 'image/jpg,image/jpeg,image/png'
1 www 585
            },
586
            'order' : {
587
                required: true,
588
                digits: true,
589
                min: 1,
590
                max: 250
591
            }
592
        },
593
        submitHandler: function(form)
594
        {
595
            var formdata = false;
596
            if (window.FormData){
597
                formdata = new FormData(form); //form[0]);
598
            }
599
 
7060 nelberth 600
 
16906 efrain 601
 
6620 nelberth 602
            NProgress.start();
1 www 603
            $.ajax({
604
                'dataType'  : 'json',
605
                'accept'    : 'application/json',
606
                'method'    : 'post',
607
                'url'       :  routeAdd,
608
                'data'      :  formdata,
609
                'processData': false,
610
                'contentType': false,
611
            }).done(function(response) {
612
                if(response['success']) {
613
                    $.fn.showSuccess(response['data']);
16906 efrain 614
 
615
 
1 www 616
                    gridTable.api().ajax.reload(null, false);
16906 efrain 617
 
618
    	    	    $('#row-text-add-box').hide();
619
                	$('#row-text-edit-box').hide();
620
                	$('#row-image-add-box').hide();
621
                	$('#row-image-edit-box').hide();
622
                	$('#row-video-add-box').hide();
623
                	$('#row-video-edit-box').hide();
624
                	$('#row-document-add-box').hide();
625
                	$('#row-document-edit-box').hide();
626
                	$('#row-audio-add-box').hide();
627
                	$('#row-audio-edit-box').hide();
628
                	$('#row-quizz-add-box').hide();
629
                    $('#row-quizz-edit-box').hide();
630
                    $('#row-listing').show();
1 www 631
                } else {
632
                    validatorVideoAdd.resetForm();
633
                    if(jQuery.type(response['data']) == 'string') {
634
                        $.fn.showError(response['data']);
635
                    } else  {
636
                        $.each(response['data'], function( fieldname, errors ) {
637
                            $.fn.showFormErrorValidator('#form-slide-video-add #' + fieldname, errors);
638
                        });
639
                    }
640
                }
641
            }).fail(function( jqXHR, textStatus, errorThrown) {
642
                $.fn.showError(textStatus);
643
            }).always(function() {
644
                NProgress.done();
16906 efrain 645
 
1 www 646
            });
647
            return false;
648
        },
649
        invalidHandler: function(form, validator) {
650
 
651
        }
652
    });
653
 
654
    var validatorVideoEdit = $('#form-slide-video-edit').validate({
655
        debug: true,
656
        onclick: false,
657
        onkeyup: false,
658
        ignore: [],
659
        rules: {
660
            'name': {
661
                required: true,
662
                maxlength: 128,
663
            },
664
            'file': {
665
                required: false,
666
                extension: 'webm,mp4,webm',
667
                accept: 'video/webm,video/mpeg,video/mp4'
668
            },
669
            'background': {
16906 efrain 670
                required: false,
671
                extension: 'jpg|jpeg|png',
672
                accept: 'image/jpg,image/jpeg,image/png'
1 www 673
            },
674
            'order' : {
675
                required: true,
676
                digits: true,
677
                min: 1,
678
                max: 250
679
            }
680
        },
681
        submitHandler: function(form)
682
        {
683
            var formdata = false;
684
            if (window.FormData){
685
                formdata = new FormData(form); //form[0]);
686
            }
687
 
7060 nelberth 688
 
16906 efrain 689
 
6650 nelberth 690
            NProgress.start();
1 www 691
            $.ajax({
692
                'dataType'  : 'json',
693
                'accept'    : 'application/json',
694
                'method'    : 'post',
695
                'url'       :  $('#form-slide-video-edit').attr('action'),
696
                'data'      :  formdata,
697
                'processData': false,
698
                'contentType': false,
699
            }).done(function(response) {
700
                if(response['success']) {
701
                    $.fn.showSuccess(response['data']);
16906 efrain 702
 
6643 nelberth 703
 
1 www 704
                    gridTable.api().ajax.reload(null, false);
16906 efrain 705
 
706
    	    	    $('#row-text-add-box').hide();
707
                	$('#row-text-edit-box').hide();
708
                	$('#row-image-add-box').hide();
709
                	$('#row-image-edit-box').hide();
710
                	$('#row-video-add-box').hide();
711
                	$('#row-video-edit-box').hide();
712
                	$('#row-document-add-box').hide();
713
                	$('#row-document-edit-box').hide();
714
                	$('#row-audio-add-box').hide();
715
                	$('#row-audio-edit-box').hide();
716
                	$('#row-quizz-add-box').hide();
717
                    $('#row-quizz-edit-box').hide();
718
                    $('#row-listing').show();
1 www 719
                } else {
720
                    validatorVideoEdit.resetForm();
721
                    if(jQuery.type(response['data']) == 'string') {
722
                        $.fn.showError(response['data']);
723
                    } else  {
724
                        $.each(response['data'], function( fieldname, errors ) {
725
                            $.fn.showFormErrorValidator('#form-slide-video-edit #' + fieldname, errors);
726
                        });
727
                    }
728
                }
729
            }).fail(function( jqXHR, textStatus, errorThrown) {
730
                $.fn.showError(textStatus);
731
            }).always(function() {
16906 efrain 732
 
1 www 733
                NProgress.done();
734
            });
735
            return false;
736
        },
737
        invalidHandler: function(form, validator) {
738
 
739
        }
740
    });
741
 
742
 
743
    var validatorDocumentAdd  = $('#form-slide-document-add').validate({
744
        debug: true,
745
        onclick: false,
746
        onkeyup: false,
747
        ignore: [],
748
        rules: {
749
            'name': {
750
                required: true,
751
                maxlength: 128,
752
            },
753
           'file': {
754
                required: true,
755
                extension: 'pdf',
756
                accept: 'application/pdf'
757
            },
758
           'background': {
759
                required: true,
16906 efrain 760
                extension: 'jpg|jpeg|png',
761
                accept: 'image/jpg,image/jpeg,image/png'
1 www 762
            },
763
            'order' : {
764
                required: true,
765
                digits: true,
766
                min: 1,
767
                max: 250
768
            }
769
        },
770
        submitHandler: function(form)
771
        {
772
            var formdata = false;
773
            if (window.FormData){
774
                formdata = new FormData(form); //form[0]);
775
            }
776
 
7060 nelberth 777
 
16906 efrain 778
 
6650 nelberth 779
            NProgress.start();
1 www 780
            $.ajax({
781
                'dataType'  : 'json',
782
                'accept'    : 'application/json',
783
                'method'    : 'post',
784
                'url'       :  routeAdd,
785
                'data'      :  formdata,
786
                'processData': false,
787
                'contentType': false,
788
            }).done(function(response) {
789
                if(response['success']) {
790
                    $.fn.showSuccess(response['data']);
16906 efrain 791
 
1 www 792
 
793
                    gridTable.api().ajax.reload(null, false);
16906 efrain 794
 
795
    	    	    $('#row-text-add-box').hide();
796
                	$('#row-text-edit-box').hide();
797
                	$('#row-image-add-box').hide();
798
                	$('#row-image-edit-box').hide();
799
                	$('#row-video-add-box').hide();
800
                	$('#row-video-edit-box').hide();
801
                	$('#row-document-add-box').hide();
802
                	$('#row-document-edit-box').hide();
803
                	$('#row-audio-add-box').hide();
804
                	$('#row-audio-edit-box').hide();
805
                	$('#row-quizz-add-box').hide();
806
                    $('#row-quizz-edit-box').hide();
807
                    $('#row-listing').show();
1 www 808
                } else {
809
                    validatorDocumentAdd.resetForm();
810
                    if(jQuery.type(response['data']) == 'string') {
811
                        $.fn.showError(response['data']);
812
                    } else  {
813
                        $.each(response['data'], function( fieldname, errors ) {
814
                            $.fn.showFormErrorValidator('#form-slide-document-add #' + fieldname, errors);
815
                        });
816
                    }
817
                }
818
            }).fail(function( jqXHR, textStatus, errorThrown) {
819
                $.fn.showError(textStatus);
820
            }).always(function() {
16906 efrain 821
 
1 www 822
                NProgress.done();
823
            });
824
            return false;
825
        },
826
        invalidHandler: function(form, validator) {
827
 
828
        }
829
    });
830
 
831
    var validatorDocumentEdit = $('#form-slide-document-edit').validate({
832
        debug: true,
833
        onclick: false,
834
        onkeyup: false,
835
        ignore: [],
836
        rules: {
837
            'name': {
838
                required: true,
839
                maxlength: 128,
840
            },
841
           'file': {
6667 nelberth 842
                required: false,
1 www 843
                extension: 'pdf',
844
                accept: 'application/pdf'
845
            },
846
           'background': {
16906 efrain 847
                required: false,
848
                extension: 'jpg|jpeg|png',
849
                accept: 'image/jpg,image/jpeg,image/png'
1 www 850
            },
851
            'order' : {
852
                required: true,
853
                digits: true,
854
                min: 1,
855
                max: 250
856
            }
857
        },
858
        submitHandler: function(form)
859
        {
860
            var formdata = false;
861
            if (window.FormData){
862
                formdata = new FormData(form); //form[0]);
863
            }
864
 
7060 nelberth 865
 
16906 efrain 866
 
6650 nelberth 867
            NProgress.start();
1 www 868
            $.ajax({
869
                'dataType'  : 'json',
870
                'accept'    : 'application/json',
871
                'method'    : 'post',
872
                'url'       :  $('#form-slide-document-edit').attr('action'),
873
                'data'      :  formdata,
874
                'processData': false,
875
                'contentType': false,
876
            }).done(function(response) {
877
                if(response['success']) {
878
                    $.fn.showSuccess(response['data']);
16906 efrain 879
 
1 www 880
 
881
                    gridTable.api().ajax.reload(null, false);
16906 efrain 882
 
883
    	    	    $('#row-text-add-box').hide();
884
                	$('#row-text-edit-box').hide();
885
                	$('#row-image-add-box').hide();
886
                	$('#row-image-edit-box').hide();
887
                	$('#row-video-add-box').hide();
888
                	$('#row-video-edit-box').hide();
889
                	$('#row-document-add-box').hide();
890
                	$('#row-document-edit-box').hide();
891
                	$('#row-audio-add-box').hide();
892
                	$('#row-audio-edit-box').hide();
893
                	$('#row-quizz-add-box').hide();
894
                    $('#row-quizz-edit-box').hide();
895
                    $('#row-listing').show();
1 www 896
                } else {
897
                    validatorDocumentEdit.resetForm();
898
                    if(jQuery.type(response['data']) == 'string') {
899
                        $.fn.showError(response['data']);
900
                    } else  {
901
                        $.each(response['data'], function( fieldname, errors ) {
902
                            $.fn.showFormErrorValidator('#form-slide-document-edit #' + fieldname, errors);
903
                        });
904
                    }
905
                }
906
            }).fail(function( jqXHR, textStatus, errorThrown) {
907
                $.fn.showError(textStatus);
908
            }).always(function() {
16906 efrain 909
 
1 www 910
                NProgress.done();
911
            });
912
            return false;
913
        },
914
        invalidHandler: function(form, validator) {
915
 
916
        }
917
    });
918
 
919
    var validatorAudioAdd  = $('#form-slide-audio-add').validate({
920
        debug: true,
921
        onclick: false,
922
        onkeyup: false,
923
        ignore: [],
924
        rules: {
925
            'name': {
926
                required: true,
927
                maxlength: 128,
928
            },
929
           'file': {
930
                required: true,
931
                extension: 'wav|mp3',
932
                accept: 'audio/wav, audio/mpeg'
933
            },
934
 
935
           'background': {
16906 efrain 936
                required: true,
937
                extension: 'jpg|jpeg|png',
938
                accept: 'image/jpg,image/jpeg,image/png'
1 www 939
            },
940
            'order' : {
941
                required: true,
942
                digits: true,
943
                min: 1,
944
                max: 250
945
            }
946
        },
947
        submitHandler: function(form)
948
        {
949
            var formdata = false;
950
            if (window.FormData){
951
                formdata = new FormData(form); //form[0]);
952
            }
953
 
7060 nelberth 954
 
16906 efrain 955
 
6650 nelberth 956
            NProgress.start();
1 www 957
            $.ajax({
958
                'dataType'  : 'json',
959
                'accept'    : 'application/json',
960
                'method'    : 'post',
961
                'url'       :  routeAdd,
962
                'data'      :  formdata,
963
                'processData': false,
964
                'contentType': false,
965
            }).done(function(response) {
966
                if(response['success']) {
967
                    $.fn.showSuccess(response['data']);
16906 efrain 968
 
1 www 969
 
970
                    gridTable.api().ajax.reload(null, false);
16906 efrain 971
 
972
    	    	    $('#row-text-add-box').hide();
973
                	$('#row-text-edit-box').hide();
974
                	$('#row-image-add-box').hide();
975
                	$('#row-image-edit-box').hide();
976
                	$('#row-video-add-box').hide();
977
                	$('#row-video-edit-box').hide();
978
                	$('#row-document-add-box').hide();
979
                	$('#row-document-edit-box').hide();
980
                	$('#row-audio-add-box').hide();
981
                	$('#row-audio-edit-box').hide();
982
                	$('#row-quizz-add-box').hide();
983
                    $('#row-quizz-edit-box').hide();
984
                    $('#row-listing').show();
1 www 985
                } else {
986
                    validatorAudioAdd.resetForm();
987
                    if(jQuery.type(response['data']) == 'string') {
988
                        $.fn.showError(response['data']);
989
                    } else  {
990
                        $.each(response['data'], function( fieldname, errors ) {
991
                            $.fn.showFormErrorValidator('#form-slide-audio-add #' + fieldname, errors);
992
                        });
993
                    }
994
                }
995
            }).fail(function( jqXHR, textStatus, errorThrown) {
996
                $.fn.showError(textStatus);
997
            }).always(function() {
998
                NProgress.done();
7060 nelberth 999
 
16906 efrain 1000
 
1 www 1001
            });
1002
            return false;
1003
        },
1004
        invalidHandler: function(form, validator) {
1005
 
1006
        }
1007
    });
1008
 
1009
    var validatorAudioEdit = $('#form-slide-audio-edit').validate({
1010
        debug: true,
1011
        onclick: false,
1012
        onkeyup: false,
1013
        ignore: [],
1014
        rules: {
1015
            'name': {
1016
                required: true,
1017
                maxlength: 128,
1018
            },
1019
           'file': {
6667 nelberth 1020
                required: false,
1 www 1021
                extension: 'wav|mp3',
1022
                accept: 'audio/wav, audio/mpeg'
1023
            },
1024
 
1025
           'background': {
16906 efrain 1026
                required: false,
1027
                extension: 'jpg|jpeg|png',
1028
                accept: 'image/jpg,image/jpeg,image/png'
1 www 1029
            },
1030
            'order' : {
1031
                required: true,
1032
                digits: true,
1033
                min: 1,
1034
                max: 250
1035
            }
1036
        },
1037
        submitHandler: function(form)
1038
        {
1039
            var formdata = false;
1040
            if (window.FormData){
1041
                formdata = new FormData(form); //form[0]);
1042
            }
1043
 
7060 nelberth 1044
 
16906 efrain 1045
 
6650 nelberth 1046
            NProgress.start();
1 www 1047
            $.ajax({
1048
                'dataType'  : 'json',
1049
                'accept'    : 'application/json',
1050
                'method'    : 'post',
1051
                'url'       :  $('#form-slide-audio-edit').attr('action'),
1052
                'data'      :  formdata,
1053
                'processData': false,
1054
                'contentType': false,
1055
            }).done(function(response) {
1056
                if(response['success']) {
1057
                    $.fn.showSuccess(response['data']);
16906 efrain 1058
 
1 www 1059
 
1060
                    gridTable.api().ajax.reload(null, false);
16906 efrain 1061
 
1062
    	    	    $('#row-text-add-box').hide();
1063
                	$('#row-text-edit-box').hide();
1064
                	$('#row-image-add-box').hide();
1065
                	$('#row-image-edit-box').hide();
1066
                	$('#row-video-add-box').hide();
1067
                	$('#row-video-edit-box').hide();
1068
                	$('#row-document-add-box').hide();
1069
                	$('#row-document-edit-box').hide();
1070
                	$('#row-audio-add-box').hide();
1071
                	$('#row-audio-edit-box').hide();
1072
                	$('#row-quizz-add-box').hide();
1073
                    $('#row-quizz-edit-box').hide();
1074
                    $('#row-listing').show();
1 www 1075
                } else {
1076
                    validatorAudioEdit.resetForm();
1077
                    if(jQuery.type(response['data']) == 'string') {
1078
                        $.fn.showError(response['data']);
1079
                    } else  {
1080
                        $.each(response['data'], function( fieldname, errors ) {
1081
                            $.fn.showFormErrorValidator('#form-slide-audio-edit #' + fieldname, errors);
1082
                        });
1083
                    }
1084
                }
1085
            }).fail(function( jqXHR, textStatus, errorThrown) {
1086
                $.fn.showError(textStatus);
1087
            }).always(function() {
16906 efrain 1088
 
1 www 1089
                NProgress.done();
1090
            });
1091
            return false;
1092
        },
1093
        invalidHandler: function(form, validator) {
1094
 
1095
        }
1096
    });
1097
 
1098
    var validatorQuizzAdd  = $('#form-slide-quizz-add').validate({
1099
        debug: true,
1100
        onclick: false,
1101
        onkeyup: false,
1102
        ignore: [],
1103
        rules: {
1104
            'name': {
1105
                required: true,
1106
                maxlength: 128,
1107
            },
1108
           'file': {
1109
                required: true,
1110
                extension: 'wav|mp3',
1111
                accept: 'quizz/wav, quizz/mpeg'
1112
            },
6667 nelberth 1113
            'background': {
1114
                required: true,
16906 efrain 1115
                extension: 'jpg|jpeg|png',
1116
                accept: 'image/jpg,image/jpeg,image/png'
6667 nelberth 1117
            },
1 www 1118
            'quiz_id': {
1119
                required: true,
1120
            },
1121
            'order' : {
1122
                required: true,
1123
                digits: true,
1124
                min: 1,
1125
                max: 250
1126
            }
1127
        },
1128
        submitHandler: function(form)
1129
        {
1130
 
7060 nelberth 1131
 
16906 efrain 1132
 
6650 nelberth 1133
            NProgress.start();
1 www 1134
            var formdata = false;
1135
            if (window.FormData){
1136
                formdata = new FormData(form); //form[0]);
1137
            }
1138
 
1139
            $.ajax({
1140
                'dataType'  : 'json',
1141
                'accept'    : 'application/json',
1142
                'method'    : 'post',
1143
                'url'       :  routeAdd,
1144
                'data'      :  formdata,
1145
                'processData': false,
1146
                'contentType': false,
1147
            }).done(function(response) {
1148
                if(response['success']) {
1149
                    $.fn.showSuccess(response['data']);
16906 efrain 1150
 
1 www 1151
 
1152
                    gridTable.api().ajax.reload(null, false);
16906 efrain 1153
 
1154
    	    	    $('#row-text-add-box').hide();
1155
                	$('#row-text-edit-box').hide();
1156
                	$('#row-image-add-box').hide();
1157
                	$('#row-image-edit-box').hide();
1158
                	$('#row-video-add-box').hide();
1159
                	$('#row-video-edit-box').hide();
1160
                	$('#row-document-add-box').hide();
1161
                	$('#row-document-edit-box').hide();
1162
                	$('#row-audio-add-box').hide();
1163
                	$('#row-audio-edit-box').hide();
1164
                	$('#row-quizz-add-box').hide();
1165
                    $('#row-quizz-edit-box').hide();
1166
                    $('#row-listing').show();
1 www 1167
                } else {
1168
                    validatorQuizzAdd.resetForm();
1169
                    if(jQuery.type(response['data']) == 'string') {
1170
                        $.fn.showError(response['data']);
1171
                    } else  {
1172
                        $.each(response['data'], function( fieldname, errors ) {
1173
                            $.fn.showFormErrorValidator('#form-slide-quizz-add #' + fieldname, errors);
1174
                        });
1175
                    }
1176
                }
1177
            }).fail(function( jqXHR, textStatus, errorThrown) {
1178
                $.fn.showError(textStatus);
1179
            }).always(function() {
1180
                NProgress.done();
7060 nelberth 1181
 
16906 efrain 1182
 
1 www 1183
            });
1184
            return false;
1185
        },
1186
        invalidHandler: function(form, validator) {
1187
 
1188
        }
1189
    });
1190
 
1191
    var validatorQuizzEdit = $('#form-slide-quizz-edit').validate({
1192
        debug: true,
1193
        onclick: false,
1194
        onkeyup: false,
1195
        ignore: [],
1196
        rules: {
1197
            'name': {
1198
                required: true,
1199
                maxlength: 128,
1200
            },
1201
           'background': {
16906 efrain 1202
                required: false,
1203
                extension: 'jpg|jpeg|png',
1204
                accept: 'image/jpg,image/jpeg,image/png',
1 www 1205
            },
1206
            'quiz_id': {
1207
                required: true,
1208
            },
1209
            'order' : {
1210
                required: true,
1211
                digits: true,
1212
                min: 1,
1213
                max: 250
1214
            }
1215
        },
1216
        submitHandler: function(form)
1217
        {
1218
 
16906 efrain 1219
 
6650 nelberth 1220
            NProgress.start();
1 www 1221
            var formdata = false;
1222
            if (window.FormData){
1223
                formdata = new FormData(form); //form[0]);
1224
            }
1225
            $.ajax({
1226
                'dataType'  : 'json',
1227
                'accept'    : 'application/json',
1228
                'method'    : 'post',
6673 nelberth 1229
                'url'       :  $('#form-slide-quizz-edit').attr('action'),
1 www 1230
                'data'      :  formdata,
1231
                'processData': false,
1232
                'contentType': false,
1233
            }).done(function(response) {
1234
                if(response['success']) {
1235
                    $.fn.showSuccess(response['data']);
16906 efrain 1236
 
1 www 1237
 
1238
                    gridTable.api().ajax.reload(null, false);
16906 efrain 1239
 
1240
    	    	    $('#row-text-add-box').hide();
1241
                	$('#row-text-edit-box').hide();
1242
                	$('#row-image-add-box').hide();
1243
                	$('#row-image-edit-box').hide();
1244
                	$('#row-video-add-box').hide();
1245
                	$('#row-video-edit-box').hide();
1246
                	$('#row-document-add-box').hide();
1247
                	$('#row-document-edit-box').hide();
1248
                	$('#row-audio-add-box').hide();
1249
                	$('#row-audio-edit-box').hide();
1250
                	$('#row-quizz-add-box').hide();
1251
                    $('#row-quizz-edit-box').hide();
1252
                    $('#row-listing').show();
1 www 1253
                } else {
1254
                    validatorQuizzEdit.resetForm();
1255
                    if(jQuery.type(response['data']) == 'string') {
1256
                        $.fn.showError(response['data']);
1257
                    } else  {
1258
                        $.each(response['data'], function( fieldname, errors ) {
1259
                            $.fn.showFormErrorValidator('#form-slide-quizz-edit #' + fieldname, errors);
1260
                        });
1261
                    }
1262
                }
1263
            }).fail(function( jqXHR, textStatus, errorThrown) {
1264
                $.fn.showError(textStatus);
1265
            }).always(function() {
1266
                NProgress.done();
7060 nelberth 1267
 
16906 efrain 1268
 
1 www 1269
            });
1270
            return false;
1271
        },
1272
        invalidHandler: function(form, validator) {
1273
 
1274
        }
1275
    });
6591 nelberth 1276
 
1 www 1277
    $('body').on('click', 'button.btn-edit', function(e) {
1278
        e.preventDefault();
6651 nelberth 1279
        NProgress.start();
1 www 1280
        var url = $(this).data('href');
1281
        $.ajax({
1282
            'dataType'  : 'json',
1283
            'accept'    : 'application/json',
1284
            'method'    : 'get',
1285
            'url'       :  url,
1286
        }).done(function(response) {
1287
            if(response['success']) {
1288
 
16906 efrain 1289
                $('#row-listing').hide();
1290
 
1291
	    	    $('#row-text-add-box').hide();
1292
            	$('#row-text-edit-box').hide();
1293
            	$('#row-image-add-box').hide();
1294
            	$('#row-image-edit-box').hide();
1295
            	$('#row-video-add-box').hide();
1296
            	$('#row-video-edit-box').hide();
1297
            	$('#row-document-add-box').hide();
1298
            	$('#row-document-edit-box').hide();
1299
            	$('#row-audio-add-box').hide();
1300
            	$('#row-audio-edit-box').hide();
1301
            	$('#row-quizz-add-box').hide();
1302
                $('#row-quizz-edit-box').hide();
1303
 
1304
 
1 www 1305
                if(response['data']['type'] == 'text') {
1306
                    $('#form-slide-text-edit').attr('action',url);
1307
                    $('#form-slide-text-edit #name').val(response['data']['name']);
1308
                    $('#form-slide-text-edit #order').val(response['data']['order']);
16906 efrain 1309
                    $('#form-slide-text-edit #file').fileinput('reset');
1310
                    $('#form-slide-text-edit #file').val('');
1311
 
1 www 1312
                    CKEDITOR.instances.description_edit.setData(response['data']['description']);
1313
                    validatorTextEdit.resetForm();
1314
 
1315
 
16906 efrain 1316
                    $('#row-text-edit-box').show();
6595 nelberth 1317
 
1 www 1318
                }
1319
                if(response['data']['type'] == 'image') {
6510 nelberth 1320
                    console.log(response['data']['file'])
1 www 1321
                    $('#form-slide-image-edit').attr('action',url);
1322
                    $('#form-slide-image-edit #name').val(response['data']['name']);
1323
                    $('#form-slide-image-edit #order').val(response['data']['order']);
16906 efrain 1324
                    $('#form-slide-image-edit #background').fileinput('reset');
1325
                    $('#form-slide-image-edit #background').val('');
1 www 1326
                    validatorImageEdit.resetForm();
1327
 
16906 efrain 1328
                    $('#row-image-edit-box').show();
1 www 1329
 
1330
                }
1331
                if(response['data']['type'] == 'video') {
1332
                    $('#form-slide-video-edit').attr('action',url);
1333
                    $('#form-slide-video-edit #name').val(response['data']['name']);
1334
                    $('#form-slide-video-edit #order').val(response['data']['order']);
1335
                    $('#form-slide-video-edit #file').fileinput('reset');
16906 efrain 1336
                    $('#form-slide-video-edit #file').val('');
1337
                    $('#form-slide-video-edit #background').fileinput('reset');
1338
                    $('#form-slide-video-edit #background').val('');
1339
 
1 www 1340
 
16906 efrain 1341
                   $('#row-video-edit-box').show();
1 www 1342
 
1343
                }
1344
                if(response['data']['type'] == 'document') {
1345
                    $('#form-slide-document-edit').attr('action',url);
1346
                    $('#form-slide-document-edit #name').val(response['data']['name']);
1347
                    $('#form-slide-document-edit #order').val(response['data']['order']);
1348
                    $('#form-slide-document-edit #file').fileinput('reset');
1349
                    $('#form-slide-document-edit #file').val('');
16906 efrain 1350
                    $('#form-slide-document-edit #background').fileinput('reset');
1351
                    $('#form-slide-document-edit #background').val('');
1 www 1352
                    validatorDocumentEdit.resetForm();
1353
 
16906 efrain 1354
                    $('#row-document-edit-box').show();
1 www 1355
 
1356
                }
1357
                if(response['data']['type'] == 'audio') {
1358
                    $('#form-slide-audio-edit').attr('action',url);
1359
                    $('#form-slide-audio-edit #name').val(response['data']['name']);
1360
                    $('#form-slide-audio-edit #order').val(response['data']['order']);
1361
                    $('#form-slide-audio-edit #file').fileinput('reset');
1362
                    $('#form-slide-audio-edit #file').val('');
16905 efrain 1363
                    $('#form-slide-audio-edit #background').fileinput('reset');
1364
                    $('#form-slide-audio-edit #background').val('');
1 www 1365
                    validatorAudioEdit.resetForm();
1366
 
16906 efrain 1367
                    $('#row-audio-edit-box').show();
1 www 1368
 
6613 nelberth 1369
 
1 www 1370
                }
1371
                if(response['data']['type'] == 'quiz') {
1372
                    $('#form-slide-quizz-edit').attr('action',url);
1373
                    $('#form-slide-quizz-edit #name').val(response['data']['name']);
1374
                    $('#form-slide-quizz-edit #order').val(response['data']['order']);
1375
                    $('#form-slide-quizz-edit #quiz_id').val(response['data']['quiz_id']);
16906 efrain 1376
                    $('#form-slide-quizz-edit #background').fileinput('reset');
1377
                    $('#form-slide-quizz-edit #background').val('');
1 www 1378
                    validatorQuizzEdit.resetForm();
1379
 
16906 efrain 1380
                    $('#row-quizz-add-box').show();
1 www 1381
 
1382
                }
1383
 
1384
            } else {
1385
                validatorTextEdit.resetForm();
1386
                if(jQuery.type(response['data']) == 'string') {
1387
                    $.fn.showError(response['data']);
1388
                } else  {
1389
                    $.each(response['data'], function( fieldname, errors ) {
1390
                        $.fn.showFormErrorValidator('#form-slide-image-edit #' + fieldname, errors);
1391
                    });
1392
                }
1393
            }
1394
        }).fail(function( jqXHR, textStatus, errorThrown) {
1395
            $.fn.showError(textStatus);
1396
        }).always(function() {
1397
            NProgress.done();
1398
        });
1399
    });
16905 efrain 1400
 
16906 efrain 1401
    $(".btn-cancel").on("click", function(e){
1 www 1402
        e.preventDefault();
1403
 
16905 efrain 1404
 
16906 efrain 1405
    	$('#row-text-add-box').hide();
1406
    	$('#row-text-edit-box').hide();
1407
    	$('#row-image-add-box').hide();
1408
    	$('#row-image-edit-box').hide();
1409
    	$('#row-video-add-box').hide();
1410
    	$('#row-video-edit-box').hide();
1411
    	$('#row-document-add-box').hide();
1412
    	$('#row-document-edit-box').hide();
1413
    	$('#row-audio-add-box').hide();
1414
    	$('#row-audio-edit-box').hide();
1415
    	$('#row-quizz-add-box').hide();
1416
        $('#row-quizz-edit-box').hide();
1 www 1417
 
16906 efrain 1418
        $('#modal-play-video-box').modal('hide');
1419
        $('#modal-play-audio-box').modal('hide');
16910 efrain 1420
 
16905 efrain 1421
 
1 www 1422
         document.getElementById('microlearning-play-video').pause();
1423
         document.getElementById('microlearning-play-audio').pause();
16906 efrain 1424
 
1425
        $('#row-listing').show();
1 www 1426
 
1427
        return false;
1428
    });
1429
 
16910 efrain 1430
    $('#btn-add-quizz').click(function(e) {
1 www 1431
        e.preventDefault();
16906 efrain 1432
        $('#modal-add-capsule-type-box').modal('hide');
1 www 1433
 
1434
 
1435
        $('#form-slide-quizz-add #name').val('');
1436
        $('#form-slide-quizz-add #order').val('1');
1437
        $('#form-slide-quizz-add #quiz_id').val('');
16905 efrain 1438
        $('#form-slide-quizz-add #file').fileinput('reset');
1439
        $('#form-slide-quizz-add #file').val('');
1 www 1440
        CKEDITOR.instances.description_add.setData('');
1441
        validatorQuizzAdd.resetForm();
1442
 
1443
 
16905 efrain 1444
        $('#row-listing').hide();
16906 efrain 1445
    	$('#row-quizz-add-box').show();
1446
 
1 www 1447
 
1448
        return false;
1449
    });
1450
 
16910 efrain 1451
    $('#btn-add-text').click(function(e) {
1 www 1452
        e.preventDefault();
1453
 
16906 efrain 1454
        $('#modal-add-capsule-type-box').modal('hide');
1 www 1455
 
1456
        $('#form-slide-text-add #name').val('');
1457
        $('#form-slide-text-add #order').val('1');
16905 efrain 1458
        $('#form-slide-text-add #file').fileinput('reset');
1459
        $('#form-slide-text-add #file').val('');
1460
 
1 www 1461
        CKEDITOR.instances.description_add.setData('');
1462
        validatorTextAdd.resetForm();
1463
 
16905 efrain 1464
        $('#row-listing').hide();
16906 efrain 1465
    	$('#row-text-add-box').show();
1466
 
1 www 1467
    });
1468
 
1469
 
16910 efrain 1470
    $('#btn-add-image').click(function(e) {
1 www 1471
        e.preventDefault();
1472
 
16906 efrain 1473
        $('#modal-add-capsule-type-box').modal('hide');
1 www 1474
        $('#form-slide-image-add #name').val('');
1475
        $('#form-slide-image-add #order').val('1');
16905 efrain 1476
        $('#form-slide-image-add #file').fileinput('reset');
1477
        $('#form-slide-image-add #file').val('');
6112 nelberth 1478
 
1 www 1479
        validatorImageAdd.resetForm();
1480
 
16905 efrain 1481
        $('#row-listing').hide();
16906 efrain 1482
    	$('#row-image-add-box').show();
1483
 
6122 nelberth 1484
 
1 www 1485
        return false;
1486
    });
1487
 
16910 efrain 1488
    $('#btn-add-video').click(function(e) {
1 www 1489
        e.preventDefault();
1490
 
16906 efrain 1491
        $('#modal-add-capsule-type-box').modal('hide');
1 www 1492
        $('#form-slide-video-add #name').val('');
1493
        $('#form-slide-video-add #order').val('1');
1494
        $('#form-slide-video-add #file').fileinput('reset');
1495
        $('#form-slide-video-add #file').val('');
16905 efrain 1496
        $('#form-slide-video-add #background').fileinput('reset');
1497
        $('#form-slide-video-add #backgroud').val('');
1 www 1498
        validatorVideoAdd.resetForm();
1499
 
6616 nelberth 1500
 
16905 efrain 1501
        $('#row-listing').hide();
16906 efrain 1502
    	$('#row-video-add-box').show();
1503
 
1 www 1504
 
1505
        return false;
1506
    });
1507
 
16910 efrain 1508
    $('#btn-add-document').click(function(e) {
1 www 1509
        e.preventDefault();
1510
 
1511
 
16906 efrain 1512
        $('#modal-add-capsule-type-box').modal('hide');
1 www 1513
        $('#form-slide-document-add #name').val('');
1514
        $('#form-slide-document-add #order').val('1');
1515
        $('#form-slide-document-add #file').fileinput('reset');
1516
        $('#form-slide-document-add #file').val('');
16905 efrain 1517
        $('#form-slide-document-add #background').fileinput('reset');
1518
        $('#form-slide-document-add #background').val('');
1 www 1519
        validatorDocumentAdd.resetForm();
1520
 
16905 efrain 1521
        $('#row-listing').hide();
16906 efrain 1522
    	$('#row-document-add-box').show();
1523
 
1 www 1524
 
1525
        return false;
1526
    });
1527
 
16910 efrain 1528
    $('#btn-add-audio').click(function(e) {
1 www 1529
        e.preventDefault();
1530
 
16906 efrain 1531
        $('#modal-add-capsule-type-box').modal('hide');
1 www 1532
        $('#form-slide-audio-add #name').val('');
1533
        $('#form-slide-audio-add #order').val('1');
1534
        $('#form-slide-audio-add #file').fileinput('reset');
1535
        $('#form-slide-audio-add #file').val('');
16905 efrain 1536
        $('#form-slide-audio-add #background').fileinput('reset');
1537
        $('#form-slide-audio-add #background').val('');
1 www 1538
        validatorAudioAdd.resetForm();
1539
 
16905 efrain 1540
        $('#row-listing').hide();
16906 efrain 1541
    	$('#row-audio-add-box').show();
1542
 
1 www 1543
 
1544
        return false;
1545
    });
1546
 
16905 efrain 1547
 
1 www 1548
 
16906 efrain 1549
    $('#modal-play-video-box, #modal-play-audio-box').on("hide.bs.modal", function() {
1 www 1550
 
1551
 
1552
        document.getElementById('microlearning-play-video').pause();
1553
        document.getElementById('microlearning-play-audio').pause();
1554
    })
1555
 
1556
 
1557
    $('#form-slide-text-add #order').inputNumberFormat({decimal: 0});
16906 efrain 1558
    $('#form-slide-text-edit #order').inputNumberFormat({decimal: 0});
1 www 1559
 
16906 efrain 1560
    $('#form-slide-text-add #background').fileinput({
1561
        theme: 'fa',
1562
        language: 'es',
1563
        showUpload: false,
1564
        dropZoneEnabled: false,
1565
        maxFileCount: 1,
16928 efrain 1566
        msgPlaceholder:  'LABEL_RECOMMENDED_SIZE $image_size',
16906 efrain 1567
        allowedFileExtensions: ['jpeg', 'jpg', 'png'],
1568
    });
1 www 1569
 
1570
 
16906 efrain 1571
    $('#form-slide-text-edit #background').fileinput({
1572
        theme: 'fa',
1573
        language: 'es',
1574
        showUpload: false,
1575
        dropZoneEnabled: false,
1576
        maxFileCount: 1,
16928 efrain 1577
       msgPlaceholder:  'LABEL_RECOMMENDED_SIZE $image_size',
16906 efrain 1578
        allowedFileExtensions: ['jpeg', 'jpg', 'png'],
1579
    });
1 www 1580
 
6591 nelberth 1581
 
16906 efrain 1582
 
1 www 1583
    $('#form-slide-image-add #order').inputNumberFormat({decimal: 0});
16906 efrain 1584
    $('#form-slide-image-edit #order').inputNumberFormat({decimal: 0});
1 www 1585
 
16906 efrain 1586
    $('#form-slide-image-add #file').fileinput({
1587
        theme: 'fa',
1588
        language: 'es',
1589
        showUpload: false,
1590
        dropZoneEnabled: false,
1591
        maxFileCount: 1,
16928 efrain 1592
        msgPlaceholder:  'LABEL_RECOMMENDED_SIZE $image_size',
16906 efrain 1593
        allowedFileExtensions: ['jpeg', 'jpg', 'png'],
1594
    });
1 www 1595
 
1596
 
16906 efrain 1597
    $('#form-slide-image-edit #file').fileinput({
1598
        theme: 'fa',
1599
        language: 'es',
1600
        showUpload: false,
1601
        dropZoneEnabled: false,
1602
        maxFileCount: 1,
16928 efrain 1603
        msgPlaceholder:  'LABEL_RECOMMENDED_SIZE $image_size',
16906 efrain 1604
        allowedFileExtensions: ['jpeg', 'jpg', 'png'],
1605
    });
1 www 1606
 
1607
    $('#form-slide-video-add #order').inputNumberFormat({decimal: 0});
16906 efrain 1608
    $('#form-slide-video-edit #order').inputNumberFormat({decimal: 0});
1 www 1609
 
1610
    $('#form-slide-video-add #file').fileinput({
12077 nelberth 1611
        theme: 'fa',
1 www 1612
        language: 'es',
1613
        showUpload: false,
1614
        dropZoneEnabled: false,
1615
        maxFileCount: 1,
1616
        allowedFileExtensions: ['mp4', 'mpeg','webm'],
1617
        msgPlaceholder: 'Video de extensión mp4, mpeg, webm',
1618
    });
1619
 
1620
 
1621
    $('#form-slide-video-edit #file').fileinput({
12077 nelberth 1622
        theme: 'fa',
1 www 1623
        language: 'es',
1624
        showUpload: false,
1625
        dropZoneEnabled: false,
1626
        maxFileCount: 1,
1627
        allowedFileExtensions: ['mp4', 'mpeg','webm'],
1628
        msgPlaceholder: 'Video de extensión mp4, mpeg, webm',
1629
    });
1630
 
16906 efrain 1631
    $('#form-slide-video-add #background').fileinput({
1632
        theme: 'fa',
1633
        language: 'es',
1634
        showUpload: false,
1635
        dropZoneEnabled: false,
1636
        maxFileCount: 1,
16928 efrain 1637
        msgPlaceholder:  'LABEL_RECOMMENDED_SIZE $image_size',
16906 efrain 1638
        allowedFileExtensions: ['jpeg', 'jpg', 'png'],
1639
    });
1 www 1640
 
6591 nelberth 1641
 
16906 efrain 1642
    $('#form-slide-video-edit #background').fileinput({
1643
        theme: 'fa',
1644
        language: 'es',
1645
        showUpload: false,
1646
        dropZoneEnabled: false,
1647
        maxFileCount: 1,
16928 efrain 1648
        msgPlaceholder:  'LABEL_RECOMMENDED_SIZE $image_size',
16906 efrain 1649
        allowedFileExtensions: ['jpeg', 'jpg', 'png'],
1650
    });
1651
 
1652
 
1 www 1653
 
1654
 
1655
    $('#form-slide-document-add #order').inputNumberFormat({decimal: 0});
1656
 
1657
    $('#form-slide-document-add #file').fileinput({
12077 nelberth 1658
        theme: 'fa',
1 www 1659
        language: 'es',
1660
        showUpload: false,
1661
        dropZoneEnabled: false,
1662
        maxFileCount: 1,
1663
        allowedFileExtensions: ['pdf'],
1664
        msgPlaceholder: 'Documentos de extensión pdf',
1665
    });
1666
 
1667
 
1668
 
6591 nelberth 1669
 
1 www 1670
    $('#form-slide-document-edit #order').inputNumberFormat({decimal: 0});
1671
 
1672
    $('#form-slide-document-edit #file').fileinput({
12077 nelberth 1673
        theme: 'fa',
1 www 1674
        language: 'es',
1675
        showUpload: false,
1676
        dropZoneEnabled: false,
1677
        maxFileCount: 1,
1678
        allowedFileExtensions: ['pdf'],
1679
        msgPlaceholder: 'Documentos de extensión pdf',
1680
    });
1681
 
16906 efrain 1682
    $('#form-slide-document-add #background').fileinput({
1683
        theme: 'fa',
1684
        language: 'es',
1685
        showUpload: false,
1686
        dropZoneEnabled: false,
1687
        maxFileCount: 1,
16928 efrain 1688
       msgPlaceholder:  'LABEL_RECOMMENDED_SIZE $image_size',
16906 efrain 1689
        allowedFileExtensions: ['jpeg', 'jpg', 'png'],
1690
    });
1 www 1691
 
1692
 
16906 efrain 1693
    $('#form-slide-document-edit #background').fileinput({
1694
        theme: 'fa',
1695
        language: 'es',
1696
        showUpload: false,
1697
        dropZoneEnabled: false,
1698
        maxFileCount: 1,
16928 efrain 1699
        msgPlaceholder:  'LABEL_RECOMMENDED_SIZE $image_size',
16906 efrain 1700
        allowedFileExtensions: ['jpeg', 'jpg', 'png'],
1701
    });
6591 nelberth 1702
 
16906 efrain 1703
 
1 www 1704
    $('#form-slide-audio-add #order').inputNumberFormat({decimal: 0});
1705
 
1706
    $('#form-slide-audio-add #file').fileinput({
12077 nelberth 1707
        theme: 'fa',
1 www 1708
        language: 'es',
1709
        showUpload: false,
1710
        dropZoneEnabled: false,
1711
        maxFileCount: 1,
1712
        allowedFileExtensions: ['wav', 'mp3'],
1713
        msgPlaceholder: 'Audios de extensión wav y mp3',
1714
    });
1715
 
1716
 
1717
 
6591 nelberth 1718
 
1 www 1719
    $('#form-slide-audio-edit #order').inputNumberFormat({decimal: 0});
1720
 
1721
    $('#form-slide-audio-edit #file').fileinput({
12077 nelberth 1722
        theme: 'fa',
1 www 1723
        language: 'es',
1724
        showUpload: false,
1725
        dropZoneEnabled: false,
1726
        maxFileCount: 1,
1727
        allowedFileExtensions: ['wav', 'mp3'],
1728
        msgPlaceholder: 'Audios de extensión wav y mp3',
1729
    });
1730
 
16906 efrain 1731
    $('#form-slide-audio-add #background').fileinput({
1732
        theme: 'fa',
1733
        language: 'es',
1734
        showUpload: false,
1735
        dropZoneEnabled: false,
1736
        maxFileCount: 1,
16928 efrain 1737
        msgPlaceholder: 'LABEL_RECOMMENDED_SIZE $image_size',
16906 efrain 1738
        allowedFileExtensions: ['jpeg', 'jpg', 'png'],
1739
    });
1 www 1740
 
1741
 
16906 efrain 1742
    $('#form-slide-audio-edit #background').fileinput({
1743
        theme: 'fa',
1744
        language: 'es',
1745
        showUpload: false,
1746
        dropZoneEnabled: false,
1747
        maxFileCount: 1,
16928 efrain 1748
       msgPlaceholder: 'LABEL_RECOMMENDED_SIZE $image_size',
16906 efrain 1749
        allowedFileExtensions: ['jpeg', 'jpg', 'png'],
1750
    });
6591 nelberth 1751
 
16906 efrain 1752
 
1753
 
1 www 1754
    $('#form-slide-quizz-add #order').inputNumberFormat({decimal: 0});
1755
 
1756
 
1757
 
6591 nelberth 1758
 
1 www 1759
    $('#form-slide-quizz-edit #order').inputNumberFormat({decimal: 0});
1760
 
6591 nelberth 1761
 
1 www 1762
 
16906 efrain 1763
    $('#form-slide-quizz-add #background').fileinput({
1764
        theme: 'fa',
1765
        language: 'es',
1766
        showUpload: false,
1767
        dropZoneEnabled: false,
1768
        maxFileCount: 1,
16928 efrain 1769
        msgPlaceholder:  'LABEL_RECOMMENDED_SIZE $image_size',
16906 efrain 1770
        allowedFileExtensions: ['jpeg', 'jpg', 'png'],
1771
    });
1 www 1772
 
16906 efrain 1773
 
1774
    $('#form-slide-quizz-edit #background').fileinput({
1775
        theme: 'fa',
1776
        language: 'es',
1777
        showUpload: false,
1778
        dropZoneEnabled: false,
1779
        maxFileCount: 1,
16928 efrain 1780
        msgPlaceholder:  'LABEL_RECOMMENDED_SIZE $image_size',
16906 efrain 1781
        allowedFileExtensions: ['jpeg', 'jpg', 'png'],
1782
    });
1 www 1783
 
1784
 
1785
 
1786
 
1787
 
8290 stevensc 1788
    CKEDITOR.replace('description_add', {
1789
        toolbar: [
1790
                    { name: 'editing', items: ['Scayt'] },
1791
                    { name: 'links', items: ['Link', 'Unlink'] },
1792
                    { name: 'paragraph', items: ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote'] },
1793
                    { name: 'basicstyles', items: ['Bold', 'Italic', 'Strike', 'RemoveFormat'] },
1794
                    '/',
1795
                    { name: 'insert', items: ['Image', 'Table', 'HorizontalRule', 'SpecialChar'] },
1796
                    { name: 'styles', items: ['Styles', 'Format'] },
1797
                    { name: 'tools', items: ['Maximize'] }
1798
                ],
1799
                removePlugins: 'elementspath,Anchor',
1800
                heigth: 100
1801
    });
1802
    CKEDITOR.replace('description_edit',{
1803
        toolbar: [
1804
                    { name: 'editing', items: ['Scayt'] },
1805
                    { name: 'links', items: ['Link', 'Unlink'] },
1806
                    { name: 'paragraph', items: ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote'] },
1807
                    { name: 'basicstyles', items: ['Bold', 'Italic', 'Strike', 'RemoveFormat'] },
1808
                    '/',
1809
                    { name: 'insert', items: ['Image', 'Table', 'HorizontalRule', 'SpecialChar'] },
1810
                    { name: 'styles', items: ['Styles', 'Format'] },
1811
                    { name: 'tools', items: ['Maximize'] }
1812
                ],
1813
                removePlugins: 'elementspath,Anchor',
1814
                heigth: 100
1815
    });
1 www 1816
 
1817
 
17135 stevensc 1818
    $('body').on('click', '.btn-view-image', function(e) {
1 www 1819
        e.preventDefault();
1820
 
16906 efrain 1821
        $('#modal-view-image-box').modal('show');
1 www 1822
 
1823
        $('#image-view').attr('src', $(this).data('href'));
1824
 
1825
        return false;
1826
    });
1827
 
1828
    $('body').on('click', '.btn-play-video', function(e) {
1829
        e.preventDefault();
1830
 
1831
        $('#microlearning-play-video').attr('src', $(this).data('href'));
16906 efrain 1832
        $('#modal-play-video-box').modal('show');
1 www 1833
 
1834
        return false;
1835
    });
1836
 
1837
    $('body').on('click', '.btn-play-audio', function(e) {
1838
        e.preventDefault();
1839
 
1840
 
1841
        $('#microlearning-play-audio').attr('src', $(this).data('href'));
16906 efrain 1842
        $('#modal-play-audio-box').modal('show');
1 www 1843
 
1844
        return false;
1845
    });
1846
 
1847
    $('body').on('click', '.btn-view-document', function(e) {
1848
        e.preventDefault();
1849
 
1850
 
1851
        $('#document-view').attr('src', $(this).data('href'));
16906 efrain 1852
        $('#modal-view-document-box').modal('show');
1 www 1853
 
1854
        return false;
1855
    });
1856
 
1857
    $('body').on('click', '.btn-view-text', function(e) {
1858
        e.preventDefault();
1859
 
1860
        var url = $(this).data('href');
1861
        $.ajax({
1862
            'dataType'  : 'json',
1863
            'accept'    : 'application/json',
1864
            'method'    : 'get',
1865
            'url'       :  url,
1866
        }).done(function(response) {
1867
            if(response['success']) {
1868
                $('#document-text').html( response['data']  );
1869
            }
1870
 
1871
        }).fail(function( jqXHR, textStatus, errorThrown) {
1872
            $.fn.showError(textStatus);
1873
        }).always(function() {
1874
            NProgress.done();
1875
        });
1876
 
1877
 
16906 efrain 1878
        $('#modal-view-text-box').modal('show');
1 www 1879
 
1880
        return false;
1881
    });
1882
 
1883
 
1884
 
1885
 
17135 stevensc 1886
 
1 www 1887
    $('#form-filter #capsule_uuid').change(function(e) {
1888
        e.preventDefault();
1889
 
1890
        gridTable.api().ajax.reload(null, false);
1891
    })
1892
 
1893
    $('button.btn-add').click(function(e) {
1894
        e.preventDefault()
1895
 
16906 efrain 1896
        $('#modal-add-capsule-type-box').modal('show');
1 www 1897
 
1898
    } );
1899
 
16822 efrain 1900
    $('body').on('click', 'button.btn-delete', function(e) {
1901
        e.preventDefault();
1902
        var action = $(this).data('href');
1 www 1903
 
1904
 
16822 efrain 1905
          swal.fire({
1906
            title: 'LABEL_ARE_YOU_SURE',
1907
            icon: 'question',
1908
            cancelButtonText: 'LABEL_NO',
1909
            showCancelButton: true,
1910
            confirmButtonText: 'LABEL_YES'
1911
          }).then((result) => {
1912
            if (result.isConfirmed) {
1913
 
1914
                    NProgress.start();
1915
                    $.ajax({
1916
                        'dataType'  : 'json',
1917
                        'accept'    : 'application/json',
1918
                        'method'    : 'post',
1919
                        'url'       :  action,
1920
                    }).done(function(response) {
1921
                        if(response['success']) {
1922
                            $.fn.showSuccess(response['data']);
1923
                            gridTable.api().ajax.reload(null, false);
1924
                        } else {
1925
                            $.fn.showError(response['data']);
1926
                        }
1927
                    }).fail(function( jqXHR, textStatus, errorThrown) {
1928
                        $.fn.showError(textStatus);
1929
                    }).always(function() {
1930
                        NProgress.done();
1931
                    });
1932
            }
1933
       });
1934
    });
1935
 
1936
 
1 www 1937
    $('body').on('click', 'button.btn-refresh', function(e) {
1938
        e.preventDefault();
1939
        gridTable.api().ajax.reload(null, false);
1940
    });
1941
 
6113 nelberth 1942
 
1 www 1943
});
1944
JS;
1945
$this->inlineScript()->captureEnd();
1946
?>
1947
 
16905 efrain 1948
<div class="container">
1949
	<div class="card" id="row-listing">
1950
	 	<div class="card-header">
1951
	 		<h6 class="card-title">LABEL_SLIDES</h6>
1952
	 	</div>
1953
	 	<div class="card-body">
1 www 1954
 
16905 efrain 1955
	 			<?php
1956
                $form = $this->form;
1957
                $form->setAttributes([
1958
                    'name'    => 'form-filter',
1959
                    'id'      => 'form-filter',
1960
                ]);
1 www 1961
 
16905 efrain 1962
                $form->prepare();
1963
                echo $this->form()->openTag($form);
1964
                ?>
1965
             	<div class="row">
17003 efrain 1966
 
16905 efrain 1967
 
17003 efrain 1968
         	    	<div class="col-md-12 mt-3">
16905 efrain 1969
        				<?php
1970
                        $element = $form->get('capsule_uuid');
1971
                        $element->setOptions(['label' => 'LABEL_CAPSULE']);
1972
                        $element->setAttributes(['class' => 'form-control']);
1973
                        echo $this->formLabel($element);
1974
                        echo $this->formSelect($element);
1975
                        ?>
1976
                	</div>
1977
              	</div>
1978
 
1979
				<?php echo $this->form()->closeTag($form); ?>
1980
 
1981
 
1982
				<div class="row">
1983
    	 	 		<div class="col-12 mt-3">
1984
 
1985
    	 	 			<table id="gridTable" class="table   table-bordered">
1 www 1986
                      		<thead>
1987
        						<tr>
1988
                                	<th>LABEL_NAME</th>
1989
                                  	<th>LABEL_DETAILS</th>
1990
                                  	<th>LABEL_MEDIA</th>
1991
                                  	<th>LABEL_ACTIONS</th>
1992
                                </tr>
1993
                       		</thead>
1994
                         	<tbody>
1995
                         	</tbody>
1996
                    	</table>
16905 efrain 1997
 
1998
  					</div>
1999
				</div>
2000
		</div>
1 www 2001
 
16905 efrain 2002
	 	<div class="card-footer text-right">
16992 efrain 2003
	 	     <button type="button" class="btn btn-info btn-refresh"><i class="fa fa-sync"></i> LABEL_REFRESH  </button>
16905 efrain 2004
			<?php if($allowAdd) : ?>
16910 efrain 2005
			<div class="btn-group dropup">
2006
            	<button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
2007
            		<i class="fa fa-plus"></i> LABEL_ADD
2008
            	</button>
2009
            	<div class="dropdown-menu">
2010
 
2011
            		<a class="dropdown-item" href="#" id="btn-add-image"><i class="fa fa-image mr-2" aria-hidden="true"></i> LABEL_IMAGE </a>
2012
                   	<a class="dropdown-item" href="#" id="btn-add-text"><i class="fa fa-file mr-2" aria-hidden="true"></i> LABEL_TEXT </a>
2013
                    <a class="dropdown-item" href="#" id="btn-add-video"><i class="fa fa-video mr-2" aria-hidden="true"></i> LABEL_VIDEO </a>
2014
                    <a class="dropdown-item" href="#" id="btn-add-document"><i class="fa fa-file mr-2" aria-hidden="true"></i> LABEL_DOCUMENT </a>
2015
                    <a class="dropdown-item" href="#" id="btn-add-audio"><i class="fa fa-music mr-2" aria-hidden="true"></i> LABEL_AUDIO </a>
2016
                    <a class="dropdown-item" href="#" id="btn-add-quizz"><i class="fa fa-question mr-2" aria-hidden="true"></i> LABEL_QUIZ </a>
2017
 
2018
 
2019
            	</div>
2020
            </div>
2021
 
2022
 
16905 efrain 2023
			<?php endif; ?>
2024
	 	</div>
2025
	</div>
6528 nelberth 2026
 
16905 efrain 2027
 
16906 efrain 2028
	<div class="card" id="row-text-add-box" style="display: none">
16905 efrain 2029
	 	<div class="card-header">
2030
	 		<h6 class="card-title">LABEL_ADD_TEXT_SLIDE</h6>
2031
	 	</div>
2032
	 	<?php
1 www 2033
    	    $form = $this->formTextAdd;
2034
    	    $form->setAttributes([
2035
    	       'method'    => 'post',
2036
    	       'name'      => 'form-slide-text-add',
2037
    	       'id'        => 'form-slide-text-add'
2038
    	    ]);
2039
    	    $form->prepare();
2040
    	    echo $this->form()->openTag($form);
2041
 
2042
    	    $element = $form->get('type');
2043
    	    echo $this->formHidden($element);
2044
 
2045
    	    ?>
16905 efrain 2046
	 	<div class="card-body">
1 www 2047
 
16905 efrain 2048
	 		<div class="row">
2049
	 	         <div class="col-12 mt-3">
1 www 2050
    				<?php
2051
                        $element = $form->get('name');
2052
                        $element->setAttributes(['class' => 'form-control']);
2053
                        $element->setOptions(['label' => 'LABEL_NAME']);
2054
                        echo $this->formLabel($element);
2055
                        echo $this->formText($element);
2056
                    ?>
16905 efrain 2057
	 	         </div>
2058
	 	     </div>
2059
	 		<div class="row">
2060
	 	         <div class="col-12 mt-3">
1 www 2061
                	<?php
2062
                    $element = $form->get('description');
2063
                    $element->setOptions(['label' => 'LABEL_DESCRIPTION']);
6600 nelberth 2064
                    $element->setAttributes(['id' => 'description_add', 'rows' => '2',  'class' => 'form-control']);
1 www 2065
                    echo $this->formLabel($element);
2066
                    echo $this->formTextArea($element);
2067
                    ?>
16905 efrain 2068
	 	         </div>
2069
	 	     </div>
2070
	 		<div class="row">
2071
	 	         <div class="col-12 mt-3">
1 www 2072
    				<?php
2073
                        $element = $form->get('order');
2074
                        $element->setAttributes(['class' => 'form-control']);
2075
                        $element->setOptions(['label' => 'LABEL_ORDER']);
2076
                        echo $this->formLabel($element);
2077
                        echo $this->formText($element);
2078
                    ?>
2079
				</div>
16906 efrain 2080
			</div>
16905 efrain 2081
	 		<div class="row">
2082
	 	         <div class="col-12 mt-3">
6529 nelberth 2083
                <?php
2084
                    $element = $form->get('background');
16905 efrain 2085
                    $element->setAttributes([ 'class' => 'form-control']);
2086
					$element->setOptions(['label' => 'LABEL_IMAGE']);
2087
					$element->setAttributes(['accept' => 'image/jpg,image/jpeg,image/png']);
2088
					echo $this->formLabel($element);
2089
                    echo $this->formFile($element);
2090
                ?>
2091
	 	         </div>
2092
	 	     </div>
2093
	 	</div>
2094
	 	<div class="card-footer text-right">
2095
			<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
2096
      		<button type="button" class="btn btn-light btn-cancel">LABEL_CANCEL</button>
2097
	 	</div>
2098
	 	<?php echo $this->form()->closeTag($form); ?>
2099
	</div>
2100
 
16906 efrain 2101
	<div class="card" id="row-text-edit-box" style="display: none">
16905 efrain 2102
	 	<div class="card-header">
2103
	 		<h6 class="card-title">LABEL_EDIT_TEXT_SLIDE</h6>
2104
	 	</div>
2105
	 	<?php
1 www 2106
    	    $form = $this->formTextEdit;
2107
    	    $form->setAttributes([
2108
    	       'method'    => 'post',
2109
    	       'name'      => 'form-slide-text-edit',
2110
    	       'id'        => 'form-slide-text-edit'
2111
    	    ]);
2112
    	    $form->prepare();
2113
    	    echo $this->form()->openTag($form);
2114
 
2115
    	    $element = $form->get('type');
2116
    	    echo $this->formHidden($element);
2117
 
6595 nelberth 2118
    	    ?>
16905 efrain 2119
	 	<div class="card-body">
1 www 2120
 
16905 efrain 2121
	 		<div class="row">
2122
	 	         <div class="col-12 mt-3">
1 www 2123
    				<?php
2124
                        $element = $form->get('name');
2125
                        $element->setAttributes(['class' => 'form-control']);
2126
                        $element->setOptions(['label' => 'LABEL_NAME']);
2127
                        echo $this->formLabel($element);
2128
                        echo $this->formText($element);
2129
                    ?>
16905 efrain 2130
	 	         </div>
2131
	 	     </div>
2132
 
2133
	 		<div class="row">
2134
	 	         <div class="col-12 mt-3">
1 www 2135
                	<?php
2136
                    $element = $form->get('description');
2137
                    $element->setOptions(['label' => 'LABEL_DESCRIPTION']);
6600 nelberth 2138
                    $element->setAttributes(['id' => 'description_edit', 'rows' => '2',  'class' => 'form-control']);
1 www 2139
                    echo $this->formLabel($element);
2140
                    echo $this->formTextArea($element);
2141
                    ?>
16905 efrain 2142
	 	         </div>
2143
	 	     </div>
2144
 
2145
	 		<div class="row">
2146
	 	         <div class="col-12 mt-3">
1 www 2147
    				<?php
2148
                        $element = $form->get('order');
2149
                        $element->setAttributes(['class' => 'form-control']);
2150
                        $element->setOptions(['label' => 'LABEL_ORDER']);
2151
                        echo $this->formLabel($element);
2152
                        echo $this->formText($element);
2153
                    ?>
16905 efrain 2154
	 	         </div>
2155
	 	     </div>
2156
 
2157
	 		<div class="row">
2158
	 	         <div class="col-12 mt-3">
6595 nelberth 2159
                <?php
2160
                    $element = $form->get('background');
16905 efrain 2161
                    $element->setAttributes([ 'class' => 'form-control']);
2162
					$element->setOptions(['label' => 'LABEL_IMAGE']);
2163
					$element->setAttributes(['accept' => 'image/jpg,image/jpeg,image/png']);
2164
					echo $this->formLabel($element);
2165
                    echo $this->formFile($element);
2166
                ?>
2167
	 	         </div>
2168
	 	     </div>
2169
	 	</div>
2170
	 	<div class="card-footer text-right">
2171
			<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
2172
      		<button type="button" class="btn btn-light btn-cancel">LABEL_CANCEL</button>
2173
	 	</div>
2174
	 	<?php echo $this->form()->closeTag($form); ?>
2175
 
2176
	</div>
2177
 
6595 nelberth 2178
 
16905 efrain 2179
 
1 www 2180
 
2181
 
16906 efrain 2182
	<div class="card" id="row-image-add-box" style="display: none">
16905 efrain 2183
	 	<div class="card-header">
2184
	 		<h6 class="card-title">LABEL_ADD_IMAGE_SLIDE</h6>
2185
	 	</div>
2186
		<?php
1 www 2187
    	    $form = $this->formImageAdd;
2188
    	    $form->setAttributes([
2189
    	       'method'    => 'post',
2190
    	        'name'      => 'form-slide-image-add',
2191
    	        'id'        => 'form-slide-image-add'
2192
    	    ]);
2193
    	    $form->prepare();
2194
    	    echo $this->form()->openTag($form);
2195
 
2196
    	    $element = $form->get('type');
2197
    	    echo $this->formHidden($element);
2198
 
2199
    	    ?>
16905 efrain 2200
	 	<div class="card-body">
1 www 2201
 
16905 efrain 2202
	 		<div class="row">
2203
	 	         <div class="col-12 mt-3">
1 www 2204
    				<?php
2205
                        $element = $form->get('name');
2206
                        $element->setAttributes(['class' => 'form-control']);
2207
                        $element->setOptions(['label' => 'LABEL_NAME']);
2208
                        echo $this->formLabel($element);
2209
                        echo $this->formText($element);
2210
                    ?>
16905 efrain 2211
	 	         </div>
2212
	 	     </div>
2213
	 		<div class="row">
2214
	 	         <div class="col-12 mt-3">
6137 nelberth 2215
 
6134 nelberth 2216
                <?php
2217
                    $element = $form->get('file');
16905 efrain 2218
					$element->setAttributes([ 'class' => 'form-control']);
2219
					$element->setOptions(['label' => 'LABEL_IMAGE']);
2220
					$element->setAttributes(['accept' => 'image/jpg,image/jpeg,image/png']);
2221
					echo $this->formLabel($element);
2222
                    echo $this->formFile($element);
6134 nelberth 2223
                ?>
16905 efrain 2224
	 	         </div>
2225
	 	     </div>
2226
	 		<div class="row">
2227
	 	         <div class="col-12 mt-3">
1 www 2228
    				<?php
2229
                        $element = $form->get('order');
2230
                        $element->setAttributes(['class' => 'form-control']);
2231
                        $element->setOptions(['label' => 'LABEL_ORDER']);
2232
                        echo $this->formLabel($element);
2233
                        echo $this->formText($element);
2234
                    ?>
16905 efrain 2235
	 	         </div>
2236
	 	     </div>
2237
	 	</div>
2238
	 	<div class="card-footer text-right">
2239
			<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
2240
      		<button type="button" class="btn btn-light btn-cancel">LABEL_CANCEL</button>
2241
	 	</div>
2242
	 	<?php echo $this->form()->closeTag($form); ?>
2243
	</div>
2244
 
2245
 
16906 efrain 2246
	<div class="card" id="row-image-edit-box" style="display: none">
16905 efrain 2247
	 	<div class="card-header">
2248
	 		<h6 class="card-title">LABEL_EDIT_IMAGE_SLIDE</h6>
2249
	 	</div>
2250
	 	 <?php
6505 nelberth 2251
    	    $form = $this->formImageEdit;
2252
    	    $form->setAttributes([
2253
    	       'method'    => 'post',
2254
    	       'name'      => 'form-slide-image-edit',
2255
    	       'id'        => 'form-slide-image-edit'
2256
    	    ]);
2257
    	    $form->prepare();
2258
    	    echo $this->form()->openTag($form);
2259
 
2260
    	    $element = $form->get('type');
2261
    	    echo $this->formHidden($element);
2262
 
2263
    	    ?>
16905 efrain 2264
	 	<div class="card-body">
6505 nelberth 2265
 
16905 efrain 2266
	 		<div class="row">
2267
	 	         <div class="col-12 mt-3">
6505 nelberth 2268
    				<?php
2269
                        $element = $form->get('name');
2270
                        $element->setAttributes(['class' => 'form-control']);
2271
                        $element->setOptions(['label' => 'LABEL_NAME']);
2272
                        echo $this->formLabel($element);
2273
                        echo $this->formText($element);
2274
                    ?>
16905 efrain 2275
	 	         </div>
2276
	 	     </div>
6505 nelberth 2277
 
16905 efrain 2278
	 		<div class="row">
2279
	 	         <div class="col-12 mt-3">
6505 nelberth 2280
                <?php
2281
                    $element = $form->get('file');
16905 efrain 2282
					$element->setAttributes([ 'class' => 'form-control']);
2283
					$element->setOptions(['label' => 'LABEL_IMAGE']);
2284
					$element->setAttributes(['accept' => 'image/jpg,image/jpeg,image/png']);
2285
					echo $this->formLabel($element);
2286
                    echo $this->formFile($element);
6505 nelberth 2287
                ?>
16905 efrain 2288
	 	         </div>
2289
	 	     </div>
2290
	 		<div class="row">
2291
	 	         <div class="col-12 mt-3">
6505 nelberth 2292
    				<?php
2293
                        $element = $form->get('order');
2294
                        $element->setAttributes(['class' => 'form-control']);
2295
                        $element->setOptions(['label' => 'LABEL_ORDER']);
2296
                        echo $this->formLabel($element);
2297
                        echo $this->formText($element);
2298
                    ?>
2299
				</div>
16905 efrain 2300
	 	     </div>
2301
	 	</div>
2302
	 	<div class="card-footer text-right">
2303
			<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
2304
      		<button type="button" class="btn btn-light btn-cancel">LABEL_CANCEL</button>
2305
	 	</div>
2306
	 	<?php echo $this->form()->closeTag($form); ?>
2307
	</div>
2308
 
16906 efrain 2309
	<div class="card" id="row-video-add-box" style="display: none">
16905 efrain 2310
	 	<div class="card-header">
2311
	 		<h6 class="card-title">LABEL_ADD_VIDEO_SLIDE</h6>
2312
	 	</div>
2313
	 	<?php
1 www 2314
    	    $form = $this->formVideoAdd;
2315
    	    $form->setAttributes([
2316
    	       'method'    => 'post',
2317
    	        'name'      => 'form-slide-video-add',
2318
    	        'id'        => 'form-slide-video-add'
2319
    	    ]);
2320
    	    $form->prepare();
2321
    	    echo $this->form()->openTag($form);
2322
 
2323
    	    $element = $form->get('type');
2324
    	    echo $this->formHidden($element);
2325
 
2326
    	    ?>
16905 efrain 2327
	 	<div class="card-body">
2328
	 		<div class="row">
2329
	 	         <div class="col-12 mt-3">
2330
	 	         </div>
2331
	 	     </div>
2332
 
2333
	 		<div class="row">
2334
	 	         <div class="col-12 mt-3">
1 www 2335
    				<?php
2336
                        $element = $form->get('name');
2337
                        $element->setAttributes(['class' => 'form-control']);
2338
                        $element->setOptions(['label' => 'LABEL_NAME']);
2339
                        echo $this->formLabel($element);
2340
                        echo $this->formText($element);
2341
                    ?>
16905 efrain 2342
	 	         </div>
2343
	 	     </div>
2344
	 		<div class="row">
2345
	 	         <div class="col-12 mt-3">
1 www 2346
    				<?php
2347
                        $element = $form->get('order');
2348
                        $element->setAttributes(['class' => 'form-control']);
2349
                        $element->setOptions(['label' => 'LABEL_ORDER']);
2350
                        echo $this->formLabel($element);
2351
                        echo $this->formText($element);
2352
                    ?>
16905 efrain 2353
	 	         </div>
2354
	 	     </div>
2355
	 		<div class="row">
2356
	 	         <div class="col-12 mt-3">
1 www 2357
 
2358
                 		<?php
2359
                        $element = $form->get('file');
2360
                        $element->setAttributes(['class' => 'form-control']);
2361
                        $element->setOptions(['label' => 'LABEL_VIDEO']);
2362
                        $element->setAttributes(['accept' => 'video/webm,video/mpeg,video/mp4']);
2363
                        echo $this->formLabel($element);
16905 efrain 2364
                        echo $this->formFile($element);
1 www 2365
                        ?>
16905 efrain 2366
	 	         </div>
2367
	 	     </div>
2368
	 		<div class="row">
2369
	 	         <div class="col-12 mt-3">
2370
                 		<?php
2371
                        $element = $form->get('background');
2372
                        $element->setAttributes(['class' => 'form-control']);
2373
                        $element->setOptions(['label' => 'LABEL_IMAGE']);
2374
                        $element->setAttributes(['accept' => 'image/jpg,image/jpeg,image/png']);
2375
                        echo $this->formLabel($element);
2376
                        echo $this->formFile($element);
2377
                        ?>
2378
 
2379
	 	         </div>
2380
	 	     </div>
2381
	 	</div>
2382
	 	<div class="card-footer text-right">
2383
	 	     <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
2384
      		<button type="button" class="btn btn-light btn-cancel">LABEL_CANCEL</button>
2385
	 	</div>
2386
	 	<?php echo $this->form()->closeTag($form); ?>
2387
	</div>
2388
 
2389
 
16906 efrain 2390
	<div class="card" id="row-video-edit-box" style="display: none">
16905 efrain 2391
	 	<div class="card-header">
2392
	 		<h6 class="card-title">>LABEL_EDIT_VIDEO_SLIDE</h6>
2393
	 	</div>
2394
	 	<?php
2395
    	 	$form = $this->formVideoEdit;
2396
    	 	$form->setAttributes([
2397
    	 	    'method'    => 'post',
2398
    	 	    'name'      => 'form-slide-video-edit',
2399
    	 	    'id'        => 'form-slide-video-edit'
2400
    	 	]);
1 www 2401
    	    $form->prepare();
2402
    	    echo $this->form()->openTag($form);
2403
 
2404
    	    $element = $form->get('type');
2405
    	    echo $this->formHidden($element);
2406
 
2407
    	    ?>
16905 efrain 2408
	 	<div class="card-body">
2409
	 		<div class="row">
2410
	 	         <div class="col-12 mt-3">
2411
	 	         </div>
2412
	 	     </div>
2413
 
2414
	 		<div class="row">
2415
	 	         <div class="col-12 mt-3">
1 www 2416
    				<?php
2417
                        $element = $form->get('name');
2418
                        $element->setAttributes(['class' => 'form-control']);
2419
                        $element->setOptions(['label' => 'LABEL_NAME']);
2420
                        echo $this->formLabel($element);
2421
                        echo $this->formText($element);
2422
                    ?>
16905 efrain 2423
	 	         </div>
2424
	 	     </div>
2425
	 		<div class="row">
2426
	 	         <div class="col-12 mt-3">
1 www 2427
    				<?php
2428
                        $element = $form->get('order');
2429
                        $element->setAttributes(['class' => 'form-control']);
2430
                        $element->setOptions(['label' => 'LABEL_ORDER']);
2431
                        echo $this->formLabel($element);
2432
                        echo $this->formText($element);
2433
                    ?>
16905 efrain 2434
	 	         </div>
2435
	 	     </div>
2436
	 		<div class="row">
2437
	 	         <div class="col-12 mt-3">
2438
 
1 www 2439
                 		<?php
2440
                        $element = $form->get('file');
2441
                        $element->setAttributes(['class' => 'form-control']);
2442
                        $element->setOptions(['label' => 'LABEL_VIDEO']);
2443
                        $element->setAttributes(['accept' => 'video/webm,video/mpeg,video/mp4']);
2444
                        echo $this->formLabel($element);
16905 efrain 2445
                        echo $this->formFile($element);
1 www 2446
                        ?>
16905 efrain 2447
	 	         </div>
2448
	 	     </div>
2449
	 		<div class="row">
2450
	 	         <div class="col-12 mt-3">
2451
                 		<?php
2452
                        $element = $form->get('background');
2453
                        $element->setAttributes(['class' => 'form-control']);
2454
                        $element->setOptions(['label' => 'LABEL_IMAGE']);
2455
                        $element->setAttributes(['accept' => 'image/jpg,image/jpeg,image/png']);
2456
                        echo $this->formLabel($element);
2457
                        echo $this->formFile($element);
2458
                        ?>
2459
 
2460
	 	         </div>
2461
	 	     </div>
2462
	 	</div>
2463
	 	<div class="card-footer text-right">
2464
	 	     <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
2465
      		<button type="button" class="btn btn-light btn-cancel">LABEL_CANCEL</button>
2466
	 	</div>
2467
	 	<?php echo $this->form()->closeTag($form); ?>
2468
	</div>
2469
 
2470
 
16906 efrain 2471
	<div class="card" id="row-document-add-box" style="display: none">
16905 efrain 2472
	 	<div class="card-header">
2473
	 		<h6 class="card-title">LABEL_ADD_DOCUMENT_SLIDE</h6>
2474
	 	</div>
2475
	 	<?php
1 www 2476
    	    $form = $this->formDocumentAdd;
2477
    	    $form->setAttributes([
2478
    	       'method'    => 'post',
2479
    	        'name'      => 'form-slide-document-add',
2480
    	        'id'        => 'form-slide-document-add'
2481
    	    ]);
2482
    	    $form->prepare();
2483
    	    echo $this->form()->openTag($form);
2484
 
2485
    	    $element = $form->get('type');
2486
    	    echo $this->formHidden($element);
2487
 
2488
    	    ?>
16905 efrain 2489
	 	<div class="card-body">
1 www 2490
 
16905 efrain 2491
 
2492
	 		<div class="row">
2493
	 	         <div class="col-12 mt-3">
1 www 2494
    				<?php
2495
                        $element = $form->get('name');
2496
                        $element->setAttributes(['class' => 'form-control']);
2497
                        $element->setOptions(['label' => 'LABEL_NAME']);
2498
                        echo $this->formLabel($element);
2499
                        echo $this->formText($element);
2500
                    ?>
16905 efrain 2501
	 	         </div>
2502
	 	     </div>
2503
	 		<div class="row">
2504
	 	         <div class="col-12 mt-3">
1 www 2505
    				<?php
2506
                        $element = $form->get('order');
2507
                        $element->setAttributes(['class' => 'form-control']);
2508
                        $element->setOptions(['label' => 'LABEL_ORDER']);
2509
                        echo $this->formLabel($element);
2510
                        echo $this->formText($element);
2511
                    ?>
16905 efrain 2512
	 	         </div>
2513
	 	     </div>
2514
	 		<div class="row">
2515
	 	         <div class="col-12 mt-3">
1 www 2516
 
2517
                 		<?php
2518
                        $element = $form->get('file');
2519
                        $element->setAttributes(['class' => 'form-control']);
2520
                        $element->setOptions(['label' => 'LABEL_DOCUMENT']);
2521
                        $element->setAttributes(['accept' => 'application/pdf']);
2522
                        echo $this->formLabel($element);
16905 efrain 2523
                        echo $this->formFile($element);
1 www 2524
                        ?>
16905 efrain 2525
 
1 www 2526
 
16905 efrain 2527
	 	         </div>
2528
	 	     </div>
2529
	 		<div class="row">
2530
	 	         <div class="col-12 mt-3">
2531
                 		<?php
2532
                        $element = $form->get('background');
2533
                        $element->setAttributes(['class' => 'form-control']);
2534
                        $element->setOptions(['label' => 'LABEL_IMAGE']);
2535
                        $element->setAttributes(['accept' => 'image/jpg,image/jpeg,image/png']);
2536
                        echo $this->formLabel($element);
2537
                        echo $this->formFile($element);
2538
                        ?>
6656 nelberth 2539
 
16905 efrain 2540
	 	         </div>
2541
	 	     </div>
2542
	 	</div>
2543
	 	<div class="card-footer text-right">
2544
	 	      <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
2545
      		<button type="button" class="btn btn-light btn-cancel">LABEL_CANCEL</button>
2546
	 	</div>
2547
	 	<?php echo $this->form()->closeTag($form); ?>
2548
	</div>
2549
 
2550
 
16906 efrain 2551
	<div class="card" id="row-document-edit-box" style="display: none">
16905 efrain 2552
	 	<div class="card-header">
2553
	 		<h6 class="card-title">LABEL_EDIT_DOCUMENT_SLIDE</h6>
2554
	 	</div>
2555
	 	<?php
2556
    	 	$form = $this->formDocumentEdit;
2557
    	 	$form->setAttributes([
2558
    	 	    'method'    => 'post',
2559
    	 	    'name'      => 'form-slide-document-edit',
2560
    	 	    'id'        => 'form-slide-document-edit'
2561
    	 	]);
1 www 2562
    	    $form->prepare();
2563
    	    echo $this->form()->openTag($form);
2564
 
2565
    	    $element = $form->get('type');
2566
    	    echo $this->formHidden($element);
2567
 
2568
    	    ?>
16905 efrain 2569
	 	<div class="card-body">
1 www 2570
 
16905 efrain 2571
 
2572
	 		<div class="row">
2573
	 	         <div class="col-12 mt-3">
1 www 2574
    				<?php
2575
                        $element = $form->get('name');
2576
                        $element->setAttributes(['class' => 'form-control']);
2577
                        $element->setOptions(['label' => 'LABEL_NAME']);
2578
                        echo $this->formLabel($element);
2579
                        echo $this->formText($element);
2580
                    ?>
16905 efrain 2581
	 	         </div>
2582
	 	     </div>
2583
	 		<div class="row">
2584
	 	         <div class="col-12 mt-3">
1 www 2585
    				<?php
2586
                        $element = $form->get('order');
2587
                        $element->setAttributes(['class' => 'form-control']);
2588
                        $element->setOptions(['label' => 'LABEL_ORDER']);
2589
                        echo $this->formLabel($element);
2590
                        echo $this->formText($element);
2591
                    ?>
16905 efrain 2592
	 	         </div>
2593
	 	     </div>
2594
	 		<div class="row">
2595
	 	         <div class="col-12 mt-3">
1 www 2596
 
2597
                 		<?php
2598
                        $element = $form->get('file');
2599
                        $element->setAttributes(['class' => 'form-control']);
2600
                        $element->setOptions(['label' => 'LABEL_DOCUMENT']);
2601
                        $element->setAttributes(['accept' => 'application/pdf']);
2602
                        echo $this->formLabel($element);
16905 efrain 2603
                        echo $this->formFile($element);
1 www 2604
                        ?>
16905 efrain 2605
 
1 www 2606
 
16905 efrain 2607
	 	         </div>
2608
	 	     </div>
2609
	 		<div class="row">
2610
	 	         <div class="col-12 mt-3">
2611
                 		<?php
2612
                        $element = $form->get('background');
2613
                        $element->setAttributes(['class' => 'form-control']);
2614
                        $element->setOptions(['label' => 'LABEL_IMAGE']);
2615
                        $element->setAttributes(['accept' => 'image/jpg,image/jpeg,image/png']);
2616
                        echo $this->formLabel($element);
2617
                        echo $this->formFile($element);
2618
                        ?>
6656 nelberth 2619
 
16905 efrain 2620
	 	         </div>
2621
	 	     </div>
2622
	 	</div>
2623
	 	<div class="card-footer text-right">
2624
	 	      <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
2625
      		<button type="button" class="btn btn-light btn-cancel">LABEL_CANCEL</button>
2626
	 	</div>
2627
	 	<?php echo $this->form()->closeTag($form); ?>
2628
	</div>
2629
 
16906 efrain 2630
	<div class="card" id="row-audio-add-box" style="display: none">
16905 efrain 2631
	 	<div class="card-header">
2632
	 		<h6 class="card-title">LABEL_ADD_AUDIO_SLIDE</h6>
2633
	 	</div>
2634
	 	<?php
1 www 2635
    	    $form = $this->formAudioAdd;
2636
    	    $form->setAttributes([
2637
    	       'method'    => 'post',
2638
    	        'name'      => 'form-slide-audio-add',
2639
    	        'id'        => 'form-slide-audio-add'
2640
    	    ]);
2641
    	    $form->prepare();
2642
    	    echo $this->form()->openTag($form);
2643
 
2644
    	    $element = $form->get('type');
2645
    	    echo $this->formHidden($element);
2646
 
2647
    	    ?>
16905 efrain 2648
	 	<div class="card-body">
2649
	 		<div class="row">
2650
	 	         <div class="col-12 mt-3">
2651
	 	         </div>
2652
	 	     </div>
2653
 
2654
	 		<div class="row">
2655
	 	         <div class="col-12 mt-3">
1 www 2656
    				<?php
2657
                        $element = $form->get('name');
2658
                        $element->setAttributes(['class' => 'form-control']);
2659
                        $element->setOptions(['label' => 'LABEL_NAME']);
2660
                        echo $this->formLabel($element);
2661
                        echo $this->formText($element);
2662
                    ?>
16905 efrain 2663
	 	         </div>
2664
	 	     </div>
2665
	 		<div class="row">
2666
	 	         <div class="col-12 mt-3">
1 www 2667
    				<?php
2668
                        $element = $form->get('order');
2669
                        $element->setAttributes(['class' => 'form-control']);
2670
                        $element->setOptions(['label' => 'LABEL_ORDER']);
2671
                        echo $this->formLabel($element);
2672
                        echo $this->formText($element);
2673
                    ?>
16905 efrain 2674
	 	         </div>
2675
	 	     </div>
2676
	 		<div class="row">
2677
	 	         <div class="col-12 mt-3">
1 www 2678
 
2679
                 		<?php
2680
                        $element = $form->get('file');
2681
                        $element->setAttributes(['class' => 'form-control']);
2682
                        $element->setOptions(['label' => 'LABEL_AUDIO']);
2683
                        $element->setAttributes(['accept' => 'audio/x-wav, audio/mpeg']);
2684
                        echo $this->formLabel($element);
16905 efrain 2685
                        echo $this->formFile($element);
2686
 
1 www 2687
                        ?>
16905 efrain 2688
	 	         </div>
2689
	 	     </div>
2690
	 		<div class="row">
2691
	 	         <div class="col-12 mt-3">
2692
                 		<?php
2693
                        $element = $form->get('background');
2694
                        $element->setAttributes(['class' => 'form-control']);
2695
                        $element->setOptions(['label' => 'LABEL_IMAGE']);
2696
                        $element->setAttributes(['accept' => 'image/jpg,image/jpeg,image/png']);
2697
                        echo $this->formLabel($element);
2698
                        echo $this->formFile($element);
2699
                        ?>
2700
 
2701
	 	         </div>
2702
	 	     </div>
2703
	 	</div>
2704
	 	<div class="card-footer text-right">
2705
	 	      <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
2706
      		<button type="button" class="btn btn-light btn-cancel">LABEL_CANCEL</button>
2707
	 	</div>
2708
	 	<?php echo $this->form()->closeTag($form); ?>
2709
	</div>
2710
 
2711
 
16906 efrain 2712
	<div class="card" id="row-audio-edit-box" style="display: none">
16905 efrain 2713
	 	<div class="card-header">
2714
	 		<h6 class="card-title">LABEL_EDIT_AUDIO_SLIDE</h6>
2715
	 	</div>
2716
	 	<?php
2717
    	 	$form = $this->formAudioEdit;
2718
    	 	$form->setAttributes([
2719
    	 	    'method'    => 'post',
2720
    	 	    'name'      => 'form-slide-audio-edit',
2721
    	 	    'id'        => 'form-slide-audio-edit'
2722
    	 	]);
1 www 2723
    	    $form->prepare();
2724
    	    echo $this->form()->openTag($form);
2725
 
2726
    	    $element = $form->get('type');
2727
    	    echo $this->formHidden($element);
2728
 
2729
    	    ?>
16905 efrain 2730
	 	<div class="card-body">
2731
	 		<div class="row">
2732
	 	         <div class="col-12 mt-3">
2733
	 	         </div>
2734
	 	     </div>
2735
 
2736
	 		<div class="row">
2737
	 	         <div class="col-12 mt-3">
1 www 2738
    				<?php
2739
                        $element = $form->get('name');
2740
                        $element->setAttributes(['class' => 'form-control']);
16905 efrain 2741
                        $element->setOptions(['label' => 'LABEL_NAME']);
1 www 2742
                        echo $this->formLabel($element);
2743
                        echo $this->formText($element);
2744
                    ?>
16905 efrain 2745
	 	         </div>
2746
	 	     </div>
2747
	 		<div class="row">
2748
	 	         <div class="col-12 mt-3">
1 www 2749
    				<?php
2750
                        $element = $form->get('order');
2751
                        $element->setAttributes(['class' => 'form-control']);
2752
                        $element->setOptions(['label' => 'LABEL_ORDER']);
2753
                        echo $this->formLabel($element);
2754
                        echo $this->formText($element);
2755
                    ?>
16905 efrain 2756
	 	         </div>
2757
	 	     </div>
2758
	 		<div class="row">
2759
	 	         <div class="col-12 mt-3">
1 www 2760
 
2761
                 		<?php
2762
                        $element = $form->get('file');
2763
                        $element->setAttributes(['class' => 'form-control']);
2764
                        $element->setOptions(['label' => 'LABEL_AUDIO']);
2765
                        $element->setAttributes(['accept' => 'audio/x-wav, audio/mpeg']);
2766
                        echo $this->formLabel($element);
16905 efrain 2767
                        echo $this->formFile($element);
2768
 
1 www 2769
                        ?>
16905 efrain 2770
	 	         </div>
2771
	 	     </div>
2772
	 		<div class="row">
2773
	 	         <div class="col-12 mt-3">
2774
                 		<?php
2775
                        $element = $form->get('background');
2776
                        $element->setAttributes(['class' => 'form-control']);
2777
                        $element->setOptions(['label' => 'LABEL_IMAGE']);
2778
                        $element->setAttributes(['accept' => 'image/jpg,image/jpeg,image/png']);
2779
                        echo $this->formLabel($element);
2780
                        echo $this->formFile($element);
2781
                        ?>
2782
 
2783
	 	         </div>
2784
	 	     </div>
2785
	 	</div>
2786
	 	<div class="card-footer text-right">
2787
	 	      <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
2788
      		<button type="button" class="btn btn-light btn-cancel">LABEL_CANCEL</button>
2789
	 	</div>
2790
	 	<?php echo $this->form()->closeTag($form); ?>
2791
	</div>
2792
 
2793
 
16906 efrain 2794
	<div class="card" id="row-quizz-add-box" style="display: none">
16905 efrain 2795
	 	<div class="card-header">
2796
	 		<h6 class="card-title">LABEL_ADD_QUIZ_SLIDE</h6>
2797
	 	</div>
2798
	 	<?php
1 www 2799
    	    $form = $this->formQuizzAdd;
2800
    	    $form->setAttributes([
2801
    	       'method'    => 'post',
2802
    	        'name'      => 'form-slide-quizz-add',
2803
    	        'id'        => 'form-slide-quizz-add'
2804
    	    ]);
2805
    	    $form->prepare();
2806
    	    echo $this->form()->openTag($form);
2807
 
2808
    	    $element = $form->get('type');
2809
    	    echo $this->formHidden($element);
2810
 
2811
    	    ?>
16905 efrain 2812
	 	<div class="card-body">
1 www 2813
 
16905 efrain 2814
	 		<div class="row">
2815
	 	         <div class="col-12 mt-3">
1 www 2816
    				<?php
2817
                        $element = $form->get('name');
2818
                        $element->setAttributes(['class' => 'form-control']);
2819
                        $element->setOptions(['label' => 'LABEL_NAME']);
2820
                        echo $this->formLabel($element);
2821
                        echo $this->formText($element);
2822
                    ?>
16905 efrain 2823
	 	         </div>
2824
	 	     </div>
2825
	 		<div class="row">
2826
	 	         <div class="col-12 mt-3">
1 www 2827
    				<?php
2828
                        $element = $form->get('order');
2829
                        $element->setAttributes(['class' => 'form-control']);
2830
                        $element->setOptions(['label' => 'LABEL_ORDER']);
2831
                        echo $this->formLabel($element);
2832
                        echo $this->formText($element);
2833
                    ?>
16905 efrain 2834
	 	         </div>
2835
	 	     </div>
6657 nelberth 2836
 
16905 efrain 2837
	 		<div class="row">
2838
	 	         <div class="col-12 mt-3">
1 www 2839
    				<?php
2840
                        $element = $form->get('quiz_id');
2841
                        $element->setAttributes(['class' => 'form-control']);
2842
                        $element->setOptions(['label' => 'LABEL_QUIZ']);
2843
                        echo $this->formLabel($element);
2844
                        echo $this->formSelect($element);
2845
                    ?>
16905 efrain 2846
	 	         </div>
2847
	 	     </div>
2848
 
2849
			<div class="row">
2850
	 	         <div class="col-12 mt-3">
2851
                 		<?php
2852
                        $element = $form->get('background');
2853
                        $element->setAttributes(['class' => 'form-control']);
2854
                        $element->setOptions(['label' => 'LABEL_IMAGE']);
2855
                        $element->setAttributes(['accept' => 'image/jpg,image/jpeg,image/png']);
2856
                        echo $this->formLabel($element);
2857
                        echo $this->formFile($element);
2858
                        ?>
2859
 
2860
	 	         </div>
2861
	 	     </div>
2862
	 	</div>
2863
	 	<div class="card-footer text-right">
2864
	 	     <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
2865
      		<button type="button" class="btn btn-light btn-cancel">LABEL_CANCEL</button>
2866
	 	</div>
2867
	 	<?php echo $this->form()->closeTag($form); ?>
2868
	</div>
2869
 
16906 efrain 2870
	<div class="card" id="row-quizz-edit-box" style="display: none">
16905 efrain 2871
	 	<div class="card-header">
2872
	 		<h6 class="card-title">LABEL_EDIT_QUIZ_SLIDE</h6>
2873
	 	</div>
2874
	 	<?php
2875
    	 	$form = $this->formQuizzEdit;
2876
    	 	$form->setAttributes([
2877
    	 	    'method'    => 'post',
2878
    	 	    'name'      => 'form-slide-quizz-edit',
2879
    	 	    'id'        => 'form-slide-quizz-edit'
2880
    	 	]);
1 www 2881
    	    $form->prepare();
2882
    	    echo $this->form()->openTag($form);
2883
 
2884
    	    $element = $form->get('type');
2885
    	    echo $this->formHidden($element);
2886
 
2887
    	    ?>
16905 efrain 2888
	 	<div class="card-body">
1 www 2889
 
16905 efrain 2890
	 		<div class="row">
2891
	 	         <div class="col-12 mt-3">
1 www 2892
    				<?php
2893
                        $element = $form->get('name');
2894
                        $element->setAttributes(['class' => 'form-control']);
2895
                        $element->setOptions(['label' => 'LABEL_NAME']);
2896
                        echo $this->formLabel($element);
2897
                        echo $this->formText($element);
2898
                    ?>
16905 efrain 2899
	 	         </div>
2900
	 	     </div>
2901
	 		<div class="row">
2902
	 	         <div class="col-12 mt-3">
1 www 2903
    				<?php
2904
                        $element = $form->get('order');
2905
                        $element->setAttributes(['class' => 'form-control']);
2906
                        $element->setOptions(['label' => 'LABEL_ORDER']);
2907
                        echo $this->formLabel($element);
2908
                        echo $this->formText($element);
2909
                    ?>
16905 efrain 2910
	 	         </div>
2911
	 	     </div>
6657 nelberth 2912
 
16905 efrain 2913
	 		<div class="row">
2914
	 	         <div class="col-12 mt-3">
1 www 2915
    				<?php
2916
                        $element = $form->get('quiz_id');
2917
                        $element->setAttributes(['class' => 'form-control']);
2918
                        $element->setOptions(['label' => 'LABEL_QUIZ']);
2919
                        echo $this->formLabel($element);
2920
                        echo $this->formSelect($element);
2921
                    ?>
16905 efrain 2922
	 	         </div>
2923
	 	     </div>
2924
 
2925
			<div class="row">
2926
	 	         <div class="col-12 mt-3">
2927
                 		<?php
2928
                        $element = $form->get('background');
2929
                        $element->setAttributes(['class' => 'form-control']);
2930
                        $element->setOptions(['label' => 'LABEL_IMAGE']);
2931
                        $element->setAttributes(['accept' => 'image/jpg,image/jpeg,image/png']);
2932
                        echo $this->formLabel($element);
2933
                        echo $this->formFile($element);
2934
                        ?>
2935
 
2936
	 	         </div>
2937
	 	     </div>
2938
	 	</div>
2939
	 	<div class="card-footer text-right">
2940
	 	     <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
2941
      		<button type="button" class="btn btn-light btn-cancel">LABEL_CANCEL</button>
2942
	 	</div>
2943
	 	<?php echo $this->form()->closeTag($form); ?>
2944
	</div>
2945
</div>
1 www 2946
 
16905 efrain 2947
 
2948
 
1 www 2949
 
2950
 
2951
 
2952
<!-- The Modal -->
16906 efrain 2953
<div class="modal" id="modal-play-video-box" >
1 www 2954
	<div class="modal-dialog ">
2955
    	<div class="modal-content">
2956
 
2957
            <!-- Modal Header -->
2958
      		<div class="modal-header">
16845 efrain 2959
        		<h6 class="modal-title">LABEL_PLAY_VIDEO</h6>
16822 efrain 2960
        		<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="btn-close"></button>
1 www 2961
      		</div>
2962
 
2963
            <!-- Modal body -->
2964
            <div class="modal-body">
2965
				<video src=""  style="width: 300px; height: auto" controls preload="false" autoplay="false"  poster="" id="microlearning-play-video"></video>
2966
      		</div>
2967
 
2968
            <!-- Modal footer -->
16891 efrain 2969
      		<div class="modal-footer text-right">
16822 efrain 2970
        		 <button type="button" class="btn btn-light" data-bs-dismiss="modal">LABEL_CLOSE</button>
1 www 2971
          	</div>
2972
         </div>
2973
	</div>
2974
</div>
2975
 
2976
 
2977
 
2978
 
2979
 
2980
<!-- The Modal -->
16906 efrain 2981
<div class="modal" id="modal-play-audio-box" >
1 www 2982
	<div class="modal-dialog ">
2983
    	<div class="modal-content">
2984
 
2985
            <!-- Modal Header -->
2986
      		<div class="modal-header">
16845 efrain 2987
        		<h6 class="modal-title">LABEL_PLAY_AUDIO</h6>
16822 efrain 2988
        		<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="btn-close"></button>
1 www 2989
      		</div>
2990
 
2991
            <!-- Modal body -->
2992
            <div class="modal-body">
2993
				<audio src="" controls autoplay="false"  id="microlearning-play-audio" >
2994
                  Your browser does not support the <code>audio</code> element.
2995
                </audio>
2996
      		</div>
2997
 
2998
            <!-- Modal footer -->
16891 efrain 2999
      		<div class="modal-footer text-right">
16822 efrain 3000
        		 <button type="button" class="btn btn-light" data-bs-dismiss="modal">LABEL_CLOSE</button>
1 www 3001
          	</div>
3002
         </div>
3003
	</div>
3004
</div>
3005
 
3006
 
3007
<!-- The Modal -->
16906 efrain 3008
<div class="modal" id="modal-view-image-box">
1 www 3009
	<div class="modal-dialog ">
3010
    	<div class="modal-content">
3011
 
3012
            <!-- Modal Header -->
3013
      		<div class="modal-header">
16845 efrain 3014
        		<h6 class="modal-title">LABEL_IMAGE</h6>
16822 efrain 3015
        		<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="btn-close"></button>
1 www 3016
      		</div>
3017
 
3018
            <!-- Modal body -->
3019
            <div class="modal-body text-center">
3020
				<img src="" class="img img-responsive" style="width: 300px; height: auto" id="image-view" />
3021
      		</div>
3022
 
3023
            <!-- Modal footer -->
16891 efrain 3024
      		<div class="modal-footer text-right">
16822 efrain 3025
        		 <button type="button" class="btn btn-light" data-bs-dismiss="modal">LABEL_CLOSE</button>
1 www 3026
          	</div>
3027
         </div>
3028
	</div>
3029
</div>
3030
 
3031
 
3032
<!-- The Modal -->
16906 efrain 3033
<div class="modal" id="modal-view-document-box">
1 www 3034
	<div class="modal-dialog ">
3035
    	<div class="modal-content">
3036
 
3037
            <!-- Modal Header -->
3038
      		<div class="modal-header">
16845 efrain 3039
        		<h6 class="modal-title">LABEL_DOCUMENT</h6>
16822 efrain 3040
        		<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="btn-close"></button>
1 www 3041
      		</div>
3042
 
3043
            <!-- Modal body -->
3044
            <div class="modal-body text-center">
3045
            	<iframe id="document-view" style="width: 450px; height: 300px; scroll: auto">
3046
 
3047
            	</iframe>
3048
       	</div>
3049
 
3050
            <!-- Modal footer -->
16891 efrain 3051
      		<div class="modal-footer text-right">
16822 efrain 3052
        		 <button type="button" class="btn btn-light" data-bs-dismiss="modal">LABEL_CLOSE</button>
1 www 3053
          	</div>
3054
         </div>
3055
	</div>
3056
</div>
3057
 
3058
 
3059
<!-- The Modal -->
16906 efrain 3060
<div class="modal" id="modal-view-text-box">
1 www 3061
	<div class="modal-dialog modal-xl">
3062
    	<div class="modal-content">
3063
 
3064
            <!-- Modal Header -->
3065
      		<div class="modal-header">
16845 efrain 3066
        		<h6 class="modal-title">LABEL_TEXT</h6>
16822 efrain 3067
        		<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="btn-close"></button>
1 www 3068
      		</div>
3069
 
3070
            <!-- Modal body -->
3071
            <div class="modal-body" >
3072
            	<div id="document-text" style="width: 100%; height: 300px; scroll: auto; overflow: auto;">
3073
 
3074
 
3075
            	</div>
3076
 
3077
       	</div>
3078
 
3079
            <!-- Modal footer -->
16891 efrain 3080
      		<div class="modal-footer text-right">
16822 efrain 3081
        		 <button type="button" class="btn btn-light" data-bs-dismiss="modal">LABEL_CLOSE</button>
1 www 3082
          	</div>
3083
         </div>
3084
	</div>
3085
</div>
3086
 
3087
 
3088
 
3089
 
3090
 
3091
 
3092