Proyectos de Subversion LeadersLinked - Backend

Rev

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