Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev Autor Línea Nro. Línea
15337 efrain 1
<?php
2
$acl            = $this->viewModel()->getRoot()->getVariable('acl');
3
$currentUser    = $this->currentUserHelper();
4
 
5
$roleName = $currentUser->getUserTypeId();
6
 
7
 
8
$routeDatatable = $this->url('settings/private-networks');
9
$routeAdd       = $this->url('settings/private-networks/add');
10
 
11
$allowAdd       = $acl->isAllowed($roleName, 'settings/private-networks/add') ? 1 : 0;
12
$allowEdit      = $acl->isAllowed($roleName, 'settings/private-networks/edit') ? 1 : 0;
13
$allowDelete    = $acl->isAllowed($roleName, 'settings/private-networks/delete') ? 1 : 0;
14
 
15
 
16822 efrain 16
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/nprogress/nprogress.css'));
17
$this->inlineScript()->appendFile($this->basePath('assets/vendors/nprogress/nprogress.js'));
15337 efrain 18
 
16822 efrain 19
$this->inlineScript()->appendFile($this->basePath('assets/vendors/ckeditor/ckeditor.js'));
15337 efrain 20
 
21
 
22
 
16929 efrain 23
 
24
 
25
 
16822 efrain 26
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/datatables.net-bs5/dataTables.bootstrap5.css'));
27
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/datatables.net-bs5-responsive/responsive.bootstrap5.css'));
15337 efrain 28
 
16822 efrain 29
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net/jquery.dataTables.js'));
30
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net-bs5/dataTables.bootstrap5.js'));
31
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net-bs5-responsive/dataTables.responsive.min.js'));
32
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net-bs5-responsive/responsive.bootstrap5.min.js'));
15337 efrain 33
 
34
 
16822 efrain 35
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/bootstrap4-toggle/css/bootstrap4-toggle.min.css'));
36
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap4-toggle/js/bootstrap4-toggle.min.js'));
15337 efrain 37
 
38
 
39
 
16822 efrain 40
$this->inlineScript()->appendFile($this->basePath('assets/vendors/select2/js/select2.js'));
41
$this->inlineScript()->appendFile($this->basePath('assets/vendors/select2/js/i18n/es.js'));
42
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/select2/css/select2.css'));
15337 efrain 43
 
16927 efrain 44
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/select2-bootstrap5-theme/select2-bootstrap-5-theme.css'));
15337 efrain 45
 
46
 
16822 efrain 47
 
48
 
15337 efrain 49
$status_active = \LeadersLinked\Model\Network::STATUS_ACTIVE;
50
 
51
$this->inlineScript()->captureStart();
52
echo <<<JS
53
jQuery( document ).ready(function( $ ) {
54
    $.validator.addMethod('passwordStrengthCheck', function(value) {
55
        return /^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$^x%x*-]).{6,16}$/.test(value)
56
    }, 'ERROR_PASSWORD_STRENGTH');
57
 
58
    var allowEdit   = $allowEdit;
59
    var allowDelete = $allowDelete;
60
 
61
    $.validator.setDefaults({
62
        debug: true,
63
        highlight: function(element) {
64
            $(element).addClass('is-invalid');
65
        },
66
        unhighlight: function(element) {
67
            $(element).removeClass('is-invalid');
68
        },
69
        errorElement: 'span',
70
        errorClass: 'error invalid-feedback',
71
        errorPlacement: function(error, element) {
16822 efrain 72
            error.insertAfter(element);
73
 
15337 efrain 74
        }
75
    });
76
 
16929 efrain 77
 
15337 efrain 78
 
79
    var gridTable = $('#gridTable').dataTable( {
80
        'processing': true,
81
        'serverSide': true,
82
        'searching': true,
83
        'order': [[ 0, 'asc' ]],
84
        'ordering':  true,
85
        'ordenable' : true,
86
        'responsive': true,
87
        'select' : false,
88
        'paging': true,
89
        'pagingType': 'simple_numbers',
90
    	'ajax': {
91
    	   'url' : '$routeDatatable',
92
    		'type' : 'get',
93
            'beforeSend': function (request) {
94
                NProgress.start();
95
            },
96
            'dataFilter': function(response) {
97
                var response = jQuery.parseJSON( response );
98
 
99
                var json                = {};
100
                json.recordsTotal       = 0;
101
                json.recordsFiltered    = 0;
102
                json.data               = [];
103
 
104
 
105
                if(response.success) {
106
                    json.recordsTotal       = response.data.total;
107
                    json.recordsFiltered    = response.data.total;
108
                    json.data               = response.data.items;
109
                } else {
110
                    $.fn.showError(response.data)
111
                }
112
 
113
                return JSON.stringify( json );
114
            }
115
        },
116
        'language' : {
117
            'sProcessing':     'LABEL_DATATABLE_SPROCESSING',
118
            'sLengthMenu':     'LABEL_DATATABLE_SLENGTHMENU',
119
            'sZeroRecords':    'LABEL_DATATABLE_SZERORECORDS',
120
            'sEmptyTable':     'LABEL_DATATABLE_SEMPTYTABLE',
121
            'sInfo':           'LABEL_DATATABLE_SINFO',
122
            'sInfoEmpty':      'LABEL_DATATABLE_SINFOEMPTY',
123
            'sInfoFiltered':   'LABEL_DATATABLE_SINFOFILTERED',
124
            'sInfoPostFix':    '',
125
            'sSearch':         'LABEL_DATATABLE_SSEARCH',
126
            'sUrl':            '',
127
            'sInfoThousands':  ',',
128
            'sLoadingRecords': 'LABEL_DATATABLE_SLOADINGRECORDS',
129
            'oPaginate': {
130
                'sFirst':    'LABEL_DATATABLE_SFIRST',
131
                'sLast':     'LABEL_DATATABLE_SLAST',
132
                'sNext':     'LABEL_DATATABLE_SNEXT',
133
                'sPrevious': 'LABEL_DATATABLE_SPREVIOUS'
134
            },
135
            'oAria': {
136
                'sSortAscending':  ': LABEL_DATATABLE_SSORTASCENDING',
137
                'sSortDescending': ':LABEL_DATATABLE_SSORTDESCENDING'
138
            },
139
        },
140
        'drawCallback': function( settings ) {
141
            NProgress.done();
16822 efrain 142
 
15337 efrain 143
        },
144
        'aoColumns': [
145
            { 'mDataProp': 'name' },
146
            { 'mDataProp': 'main_hostname' },
147
            { 'mDataProp': 'admin_hostname' },
148
            { 'mDataProp': 'status' },
149
            { 'mDataProp': 'actions' },
150
        ],
151
        'columnDefs': [
152
            {
153
                'targets':0,
154
                'className' : 'text-vertical-middle',
155
            },
156
            {
157
                'targets': -2,
158
                'orderable': false,
159
                'className' : 'text-center',
160
                'render' : function ( data, type, row ) {
161
 
16822 efrain 162
                    checked = data == 'a' ? 'checked' : '';
163
 
164
                    return '<div class="form-check">' +
16971 efrain 165
                        '<input type="checkbox" class="form-check-input" disabled="" ' + checked + '>' +
16822 efrain 166
                        '<label class="form-check-label" for="checkCheckedDisabled"></label></div>' ;
15337 efrain 167
                }
168
            },
169
            {
170
                'targets': -1,
171
                'orderable': false,
172
                'render' : function ( data, type, row ) {
173
                    s = '';
174
 
175
                    if(allowEdit && data['link_edit']) {
16906 efrain 176
                        s = s + '<button class="btn btn-primary btn-edit" data-href="' + data['link_edit']+ '" data-toggle="tooltip" title="LABEL_EDIT"><i class="fa fa-pen"></i> LABEL_EDIT </button>&nbsp;';
15337 efrain 177
                    }
178
                    if(allowDelete  && data['link_delete']) {
179
                        s = s + '<button class="btn btn-danger btn-delete" data-href="' + data['link_delete']+ '" data-toggle="tooltip" title="LABEL_DELETE"><i class="fa fa-trash"></i> LABEL_DELETE </button>&nbsp;';
180
                    }
181
                    return s;
182
                }
183
            }
184
        ],
185
    });
186
 
187
    var validatorAdd = $('#form-add').validate({
188
        debug: true,
189
        onclick: false,
190
        onkeyup: false,
191
        ignore: [':hidden'],
192
        rules: {
193
            'first_name': {
194
                required: true,
195
                maxlength: 64,
196
            },
197
            'last_name': {
198
                required: true,
199
                maxlength: 64,
200
            },
201
            'email': {
202
                required: true,
203
                email: true,
204
                maxlength: 250,
205
            },
206
            'password': {
207
                required: true,
208
                minlength: 6,
209
                maxlength: 16,
210
                passwordStrengthCheck: true,
211
            },
212
            'confirmation' : {
213
                required: true,
214
                minlength: 6,
215
                maxlength: 16,
216
                equalTo: '#form-add #password'
217
            },
218
            'company': {
219
                required: true,
220
                maxlength: 128,
221
            },
222
            'company_size_id': {
223
                required: true,
224
            },
225
            'industry_id': {
226
               required: true,
227
            },
228
            'main_hostname': {
229
                required: true,
230
                maxlength: 250,
15459 efrain 231
                url: true,
15337 efrain 232
            },
15452 efrain 233
            'alternative_hostname': {
234
                required: false,
235
                maxlength: 250,
15459 efrain 236
                 url: true,
15452 efrain 237
            },
15337 efrain 238
            'admin_hostname': {
239
                required: true,
15459 efrain 240
                maxlength: 250,
241
                 url: true,
15337 efrain 242
            },
16948 efrain 243
            'service_hostname': {
244
                required: true,
245
                maxlength: 250,
246
                url: true,
247
            },
15831 efrain 248
            'moodle_name': {
249
                required: false,
250
                maxlength: 20,
251
            },
15459 efrain 252
            'moodle_url': {
253
                required: false,
254
                maxlength: 250,
15831 efrain 255
                url: true,
15459 efrain 256
            },
15831 efrain 257
            'microlearning_appstore': {
258
                required: false,
259
                maxlength: 250,
260
                url: true,
261
            },
262
            'microlearning_playstore': {
263
                required: false,
264
                maxlength: 250,
265
                url: true,
266
            },
15459 efrain 267
            'relationship_user_mode': {
268
                required: true,
269
            },
270
            'status': {
271
                required: false,
272
            },
15441 efrain 273
            'theme_id': {
274
                required: true,
275
            },
15337 efrain 276
        },
277
        submitHandler: function(form)
278
        {
279
            NProgress.start();
280
            $.ajax({
281
                'dataType'  : 'json',
282
                'accept'    : 'application/json',
283
                'method'    : 'post',
284
                'url'       : $('#form-add').attr('action'),
285
                'data'      : $('#form-add').serialize()
286
            }).done(function(response) {
287
                if(response.success) {
288
                    $.fn.showSuccess(response.data);
289
 
16822 efrain 290
                    $('#card-add').hide();
291
                    $('#card-edit').hide();
292
                    $('#card-list').show();
15337 efrain 293
                    gridTable.api().ajax.reload(null, false);
294
                } else {
295
                    if(jQuery.type(response.data) == 'string') {
296
                        $.fn.showError(response.data)
297
                    } else  {
298
                        $.each(response.data, function( fieldname, errors ) {
299
                            $.fn.showFormErrorValidator('#form-add #' + fieldname, errors);
300
                        });
301
                    }
302
                }
303
            }).fail(function( jqXHR, textStatus, errorThrown) {
304
                $.fn.showError(textStatus)
305
 
306
            }).always(function() {
307
                NProgress.done();
308
            })
309
        },
310
        invalidHandler: function(form, validator) {
311
        }
312
    });
313
 
314
    var validatorEdit = $('#form-edit').validate({
315
        debug: true,
316
        onclick: false,
317
        onkeyup: false,
318
        ignore: [':hidden'],
319
        rules: {
15441 efrain 320
            'theme_id' : {
321
                required: true,
322
            },
15337 efrain 323
            'name': {
324
                required: true,
325
                maxlength: 128,
326
            },
327
            'main_hostname': {
328
                required: true,
329
                maxlength: 250,
330
            },
15452 efrain 331
            'alternative_hostname': {
332
                required: false,
333
                maxlength: 250,
334
            },
15337 efrain 335
            'admin_hostname': {
336
                required: true,
337
                maxlength: 250,
338
            },
16948 efrain 339
            'service_hostname': {
340
                required: true,
341
                maxlength: 250,
342
                url: true,
343
            },
15459 efrain 344
            'status': {
345
                required: false,
15337 efrain 346
            },
15831 efrain 347
            'moodle_name': {
348
                required: false,
349
                maxlength: 20,
350
            },
351
 
15459 efrain 352
            'moodle_url': {
353
                required: false,
354
                maxlength: 250,
355
                 url: true,
356
            },
15831 efrain 357
            'microlearning_appstore': {
358
                required: false,
359
                maxlength: 250,
360
                url: true,
361
            },
362
            'microlearning_playstore': {
363
                required: false,
364
                maxlength: 250,
365
                url: true,
366
            },
15459 efrain 367
            'relationship_user_mode': {
368
                required: true,
369
            },
15441 efrain 370
            'theme_id': {
371
                required: true,
372
            },
15337 efrain 373
        },
374
        submitHandler: function(form)
375
        {
376
            NProgress.start();
377
            $.ajax({
378
                'dataType'  : 'json',
379
                'accept'    : 'application/json',
380
                'method'    : 'post',
381
                'url'       : $('#form-edit').attr('action'),
382
                'data'      : $('#form-edit').serialize()
383
            }).done(function(response) {
384
                if(response.success) {
385
                    $.fn.showSuccess(response.data);
386
 
16822 efrain 387
                    $('#card-add').hide();
388
                    $('#card-edit').hide();
389
                    $('#card-list').show();
15337 efrain 390
                    gridTable.api().ajax.reload(null, false);
391
                } else {
392
                    if(jQuery.type(response.data) == 'string') {
393
                        $.fn.showError(response.data)
394
                    } else  {
395
                        $.each(response.data, function( fieldname, errors ) {
396
                            $.fn.showFormErrorValidator('#form-edit #' + fieldname, errors);
397
                        });
398
                    }
399
                }
400
            }).fail(function( jqXHR, textStatus, errorThrown) {
401
                $.fn.showError(textStatus)
402
 
403
            }).always(function() {
404
                NProgress.done();
405
            })
406
        },
407
        invalidHandler: function(form, validator) {
408
        }
409
    });
410
 
411
    $('body').on('click', 'button.btn-add', function(e) {
412
        e.preventDefault();
413
 
414
        $('#form-add #first_name').val('');
415
        $('#form-add #last_name').val('');
416
        $('#form-add #email').val('');
417
        $('#form-add #password').val('');
418
        $('#form-add #confirmation').val('');
419
        $('#form-add #company').val('');
420
        $('#form-add #company_size_id').val('').trigger('change');
421
        $('#form-add #industry_id').val('').trigger('change');
422
        $('#form-add #main_hostname').val('');
15452 efrain 423
        $('#form-add #alternative_hostname').val('');
15337 efrain 424
        $('#form-add #admin_hostname').val('');
16948 efrain 425
        $('#form-add #service_hostname').val('');
15831 efrain 426
        $('#form-add #moodle_name').val('');
15459 efrain 427
        $('#form-add #moodle_url').val('');
15831 efrain 428
        $('#form-add #microlearning_appstore').val('');
429
        $('#form-add #microlearning_playstore').val('');
15459 efrain 430
        $('#form-add #relationship_user_mode').val('').trigger('change');
15441 efrain 431
        $('#form-add #theme_id').val('');
15337 efrain 432
 
433
        validatorAdd.resetForm();
16822 efrain 434
 
435
        $('#card-list').hide();
436
        $('#card-edit').hide();
437
        $('#card-add').show();
15337 efrain 438
    });
439
 
440
    $('body').on('click', 'button.btn-edit', function(e) {
441
        e.preventDefault();
442
        NProgress.start();
443
        var action = $(this).data('href');
444
 
445
        $.ajax({
446
            'dataType'  : 'json',
447
            'method'    : 'get',
448
            'url'       :  action,
449
        }).done(function(response) {
450
            if(response['success']) {
451
 
452
                $('#form-edit').attr('action', action);
453
                $('#form-edit #name').val(response['data']['name']);
454
                $('#form-edit #main_hostname').val(response['data']['main_hostname']);
15452 efrain 455
                $('#form-edit #alternative_hostname').val(response['data']['alternative_hostname']);
15337 efrain 456
                $('#form-edit #admin_hostname').val(response['data']['admin_hostname']);
16948 efrain 457
                $('#form-edit #service_hostname').val(response['data']['service_hostname']);
15337 efrain 458
                $('#form-edit #status').bootstrapToggle(response['data']['status'] == '$status_active' ? 'on' : 'off')
15441 efrain 459
                $('#form-edit #theme_id').val(response['data']['theme_id']);
15831 efrain 460
                $('#form-edit #moodle_name').val(response['data']['moodle_name']);
15459 efrain 461
                $('#form-edit #moodle_url').val(response['data']['moodle_url']);
15831 efrain 462
                $('#form-edit #microlearning_appstore').val(response['data']['microlearning_appstore']);
463
                $('#form-edit #microlearning_playstore').val(response['data']['microlearning_playstore']);
15459 efrain 464
                $('#form-edit #relationship_user_mode').val(response['data']['relationship_user_mode']).trigger('change');
15337 efrain 465
                validatorEdit.resetForm();
466
 
16822 efrain 467
                $('#card-list').hide();
468
                $('#card-add').hide();
469
                $('#card-edit').show();
15337 efrain 470
            } else {
471
                $.fn.showError(response['data']);
472
            }
473
        }).fail(function( jqXHR, textStatus, errorThrown) {
474
            $.fn.showError(textStatus);
475
        }).always(function() {
476
            NProgress.done();
477
        });
478
    });
16822 efrain 479
 
480
 
481
    $('body').on('click', 'button.btn-cancel', function(e) {
482
        e.preventDefault();
483
 
484
        $('#card-add').hide();
485
        $('#card-edit').hide();
486
        $('#card-list').show();
487
    });
15337 efrain 488
 
489
 
490
    $('body').on('click', 'button.btn-refresh', function(e) {
491
        e.preventDefault();
492
        gridTable.api().ajax.reload(null, false);
493
    });
494
 
16822 efrain 495
    $('body').on('click', 'button.btn-delete', function(e) {
496
        e.preventDefault();
497
        var action = $(this).data('href');
15337 efrain 498
 
499
 
16822 efrain 500
          swal.fire({
501
            title: 'LABEL_ARE_YOU_SURE',
502
            icon: 'question',
503
            cancelButtonText: 'LABEL_NO',
504
            showCancelButton: true,
505
            confirmButtonText: 'LABEL_YES'
506
          }).then((result) => {
507
            if (result.isConfirmed) {
508
 
509
                    NProgress.start();
510
                    $.ajax({
511
                        'dataType'  : 'json',
512
                        'accept'    : 'application/json',
513
                        'method'    : 'post',
514
                        'url'       :  action,
515
                    }).done(function(response) {
516
                        if(response['success']) {
517
                            $.fn.showSuccess(response['data']);
518
                            gridTable.api().ajax.reload(null, false);
519
                        } else {
520
                            $.fn.showError(response['data']);
521
                        }
522
                    }).fail(function( jqXHR, textStatus, errorThrown) {
523
                        $.fn.showError(textStatus);
524
                    }).always(function() {
525
                        NProgress.done();
526
                    });
527
            }
528
          });
529
 
530
 
531
    });
532
 
533
 
534
 
15337 efrain 535
    $('body').on('click', 'button.btn-cancel', function(e) {
536
        e.preventDefault();
537
        $('#modalAdd').modal('hide');
538
        $('#modalEdit').modal('hide');
539
    });
540
 
541
    $('#form-add #company_size_id').select2({
16918 efrain 542
        theme: 'bootstrap-5',
15337 efrain 543
        width: '100%',
544
    });
545
 
546
    $('#form-add #industry_id').select2({
16918 efrain 547
        theme: 'bootstrap-5',
15337 efrain 548
        width: '100%',
549
    });
550
 
551
    $('#form-edit #status').bootstrapToggle({'on' : 'LABEL_ACTIVE',  'off' : 'LABEL_INACTIVE', 'width' : '160px', 'height' : '40px'});
552
 
553
});
554
JS;
555
$this->inlineScript()->captureEnd();
556
?>
557
 
558
 
16822 efrain 559
 <div class="container">
560
 	<div class="card" id="card-list">
561
 		<div class="card-body">
562
 			<h6 class="card-title">LABEL_PRIVATE_NETWORKS</h6>
563
     	    <div class="row">
16891 efrain 564
                <div class="col-12 mt-3">
15337 efrain 565
 
16912 efrain 566
               		<table id="gridTable" class="table  table-bordered">
16822 efrain 567
               			<thead>
568
            				<tr>
569
                       			<th>LABEL_NAME</th>
570
                          		<th>LABEL_MAIN_HOSTNAME</th>
571
                          		<th>LABEL_ADMIN_HOSTNAME</th>
572
                              	<th>LABEL_ACTIVE</th>
573
                              	<th>LABEL_ACTIONS</th>
574
                       		</tr>
575
                       	</thead>
576
                  		<tbody>
577
                   		</tbody>
578
             		 </table>
579
     			</div>
15337 efrain 580
 
16822 efrain 581
			</div>
582
    	</div>
583
    	<div class="card-footer clearfix">
584
        	<div style="float:right;">
585
         		<button type="button" class="btn btn-info btn-refresh"><i class="fa fa-refresh"></i> LABEL_REFRESH </button>
586
             	<?php if ($allowAdd) : ?>
587
             	<button type="button" class="btn btn-primary btn-add"><i class="fa fa-plus"></i> LABEL_ADD </button>
588
    			<?php endif; ?>
589
    		</div>
590
    	</div>
591
    </div>
592
 
593
	<div class="card" id="card-add" style="display: none">
594
		<?php
15337 efrain 595
                    $form = $this->formAdd;
596
            		$form->setAttributes([
597
                        'method'    => 'post',
598
                        'name'      => 'form-add',
599
                        'id'        => 'form-add',
600
            		    'action'    => $routeAdd,
601
                    ]);
602
 
603
                    $form->prepare();
604
                    echo $this->form()->openTag($form);
16822 efrain 605
        ?>
606
 		<div class="card-body">
607
 			<h6 class="card-title">LABEL_NEW_PRIVATE_NETWORK</h6>
608
 
609
 			<div class="row">
16841 efrain 610
                      	<div class="col-12  mr-3">
15337 efrain 611
        					<?php
612
        					$element = $form->get('first_name');
613
        					$element->setOptions(['label' => 'LABEL_FIRST_NAME']);
614
                            $element->setAttributes(['class' => 'form-control']);
615
 
616
                            echo $this->formLabel($element);
617
                            echo $this->formText($element);
618
                            ?>
16822 efrain 619
						</div>
620
					</div>
621
                    <div class="row">
16841 efrain 622
                      	<div class="col-12  mr-3">
15337 efrain 623
        					<?php
624
        					$element = $form->get('last_name');
625
        					$element->setOptions(['label' => 'LABEL_LAST_NAME']);
626
                            $element->setAttributes(['class' => 'form-control']);
627
 
628
                            echo $this->formLabel($element);
629
                            echo $this->formText($element);
630
                            ?>
631
						</div>
16822 efrain 632
					</div>
633
                    <div class="row">
16841 efrain 634
                      	<div class="col-12  mr-3">
15337 efrain 635
                    	<?php
636
                    	    $element = $form->get('email');
637
                    	    $element->setOptions(['label' => 'LABEL_EMAIL']);
638
                            $element->setAttributes(['class' => 'form-control']);
639
 
640
                            echo $this->formLabel($element);
641
                            echo $this->formText($element);
642
                        ?>
643
						</div>
16822 efrain 644
					</div>
645
                    <div class="row">
16841 efrain 646
                      	<div class="col-12  mr-3">
15337 efrain 647
                    	<?php
648
                    	    $element = $form->get('password');
649
                    	    $element->setOptions(['label' => 'LABEL_PASSWORD']);
650
                            $element->setAttributes(['class' => 'form-control']);
651
 
652
                            echo $this->formLabel($element);
653
                            echo $this->formPassword($element);
654
                        ?>
655
						</div>
16822 efrain 656
					</div>
657
                    <div class="row">
16841 efrain 658
                      	<div class="col-12  mr-3">
15337 efrain 659
                    	<?php
660
                    	    $element = $form->get('confirmation');
661
                    	    $element->setOptions(['label' => 'LABEL_CONFIRMATION']);
662
                            $element->setAttributes(['class' => 'form-control']);
663
 
664
                            echo $this->formLabel($element);
665
                            echo $this->formPassword($element);
666
                        ?>
667
						</div>
16822 efrain 668
					</div>
669
                    <div class="row">
16841 efrain 670
                      	<div class="col-12  mr-3">
15337 efrain 671
                    	<?php
672
                    	    $element = $form->get('company');
673
                    	    $element->setOptions(['label' => 'LABEL_COMPANY']);
674
                            $element->setAttributes(['class' => 'form-control']);
675
 
676
                            echo $this->formLabel($element);
677
                            echo $this->formText($element);
678
                        ?>
679
						</div>
16822 efrain 680
					</div>
681
                    <div class="row">
16841 efrain 682
                      	<div class="col-12  mr-3">
15337 efrain 683
                    	<?php
684
                    	    $element = $form->get('industry_id');
685
                    	    $element->setOptions(['label' => 'LABEL_INDUSTRY']);
686
                            $element->setAttributes(['class' => 'form-control']);
687
 
688
                            echo $this->formLabel($element);
689
                            echo $this->formSelect($element);
690
                        ?>
691
						</div>
16822 efrain 692
					</div>
693
                    <div class="row">
16841 efrain 694
                      	<div class="col-12  mr-3">
15337 efrain 695
                    	<?php
696
                    	    $element = $form->get('company_size_id');
697
                    	    $element->setOptions(['label' => 'LABEL_COMPANY_SIZE']);
698
                            $element->setAttributes(['class' => 'form-control']);
699
 
700
                            echo $this->formLabel($element);
701
                            echo $this->formSelect($element);
702
                        ?>
703
						</div>
16822 efrain 704
					</div>
705
                    <div class="row">
16841 efrain 706
                      	<div class="col-12  mr-3">
15337 efrain 707
                    	<?php
708
                    	    $element = $form->get('main_hostname');
709
                    	    $element->setOptions(['label' => 'LABEL_MAIN_HOSTNAME']);
710
                            $element->setAttributes(['class' => 'form-control']);
711
 
712
                            echo $this->formLabel($element);
713
                            echo $this->formText($element);
714
                        ?>
715
						</div>
16822 efrain 716
					</div>
717
                    <div class="row">
16841 efrain 718
                      	<div class="col-12  mr-3">
15337 efrain 719
                    	<?php
15452 efrain 720
                    	    $element = $form->get('alternative_hostname');
721
                    	    $element->setOptions(['label' => 'LABEL_ALTERNATIVE_HOSTNAME']);
722
                            $element->setAttributes(['class' => 'form-control']);
723
 
724
                            echo $this->formLabel($element);
725
                            echo $this->formText($element);
726
                        ?>
727
						</div>
16822 efrain 728
					</div>
729
                    <div class="row">
16841 efrain 730
                      	<div class="col-12  mr-3">
15452 efrain 731
                    	<?php
15337 efrain 732
                    	    $element = $form->get('admin_hostname');
733
                    	    $element->setOptions(['label' => 'LABEL_ADMIN_HOSTNAME']);
734
                            $element->setAttributes(['class' => 'form-control']);
735
 
736
                            echo $this->formLabel($element);
737
                            echo $this->formText($element);
738
                        ?>
739
						</div>
16822 efrain 740
					</div>
16948 efrain 741
					<div class="row">
742
                      	<div class="col-12  mr-3">
743
                    	<?php
744
                    	    $element = $form->get('service_hostname');
745
                    	    $element->setOptions(['label' => 'LABEL_SERVICE_HOSTNAME']);
746
                            $element->setAttributes(['class' => 'form-control']);
747
 
748
                            echo $this->formLabel($element);
749
                            echo $this->formText($element);
750
                        ?>
751
						</div>
752
					</div>
16822 efrain 753
                    <div class="row">
16841 efrain 754
                      	<div class="col-12  mr-3">
15441 efrain 755
                    	<?php
15831 efrain 756
                    	    $element = $form->get('moodle_name');
757
                    	    $element->setOptions(['label' => 'LABEL_MY_ONROOM_NAME']);
758
                            $element->setAttributes(['class' => 'form-control']);
759
 
760
                            echo $this->formLabel($element);
761
                            echo $this->formText($element);
762
                        ?>
763
						</div>
16822 efrain 764
					</div>
765
                    <div class="row">
16841 efrain 766
                      	<div class="col-12  mr-3">
15831 efrain 767
                    	<?php
15459 efrain 768
                    	    $element = $form->get('moodle_url');
769
                    	    $element->setOptions(['label' => 'LABEL_MY_ONROOM_URL']);
770
                            $element->setAttributes(['class' => 'form-control']);
771
 
772
                            echo $this->formLabel($element);
773
                            echo $this->formText($element);
774
                        ?>
775
						</div>
16822 efrain 776
					</div>
777
                    <div class="row">
16841 efrain 778
                      	<div class="col-12  mr-3">
15831 efrain 779
                    	<?php
780
                    	    $element = $form->get('microlearning_appstore');
781
                    	    $element->setOptions(['label' => 'LABEL_MY_MICROLEARNING_APPSTORE']);
782
                            $element->setAttributes(['class' => 'form-control']);
783
 
784
                            echo $this->formLabel($element);
785
                            echo $this->formText($element);
786
                        ?>
787
						</div>
16822 efrain 788
					</div>
789
                    <div class="row">
16841 efrain 790
                      	<div class="col-12  mr-3">
15831 efrain 791
                    	<?php
792
                    	    $element = $form->get('microlearning_playstore');
793
                    	    $element->setOptions(['label' => 'LABEL_MY_MICROLEARNING_PLAYSTORE']);
794
                            $element->setAttributes(['class' => 'form-control']);
795
 
796
                            echo $this->formLabel($element);
797
                            echo $this->formText($element);
798
                        ?>
799
						</div>
16822 efrain 800
					</div>
801
                    <div class="row">
16841 efrain 802
                      	<div class="col-12  mr-3">
15459 efrain 803
                    	<?php
804
                    	    $element = $form->get('relationship_user_mode');
805
                    	    $element->setOptions(['label' => 'LABEL_THEME']);
806
                            $element->setAttributes(['class' => 'form-control']);
807
 
808
                            echo $this->formLabel($element);
809
                            echo $this->formSelect($element);
810
                        ?>
811
						</div>
16822 efrain 812
					</div>
813
                    <div class="row">
16841 efrain 814
                      	<div class="col-12  mr-3">
15459 efrain 815
                    	<?php
15441 efrain 816
                    	    $element = $form->get('theme_id');
817
                    	    $element->setOptions(['label' => 'LABEL_THEME']);
818
                            $element->setAttributes(['class' => 'form-control']);
15337 efrain 819
 
15441 efrain 820
                            echo $this->formLabel($element);
821
                            echo $this->formSelect($element);
822
                        ?>
823
						</div>
16822 efrain 824
					</div>
825
 
826
 		</div>
827
 		<div class="card-footer text-right">
828
 			<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
829
        	<button type="button" class="btn btn-light btn-cancel">LABEL_CLOSE</button>
830
 
831
 		</div>
832
 		<?php echo $this->form()->closeTag($form); ?>
833
 	</div>
834
 
835
	<div class="card" id="card-edit" style="display: none">
836
	<?php
15337 efrain 837
                    $form = $this->formEdit;
838
            		$form->setAttributes([
839
                        'method'    => 'post',
840
                        'name'      => 'form-edit',
841
                        'id'        => 'form-edit',
842
 
843
                    ]);
844
 
845
                    $form->prepare();
846
                    echo $this->form()->openTag($form);
16822 efrain 847
                    ?>
848
 		<div class="card-body">
849
 			<h6 class="card-title">LABEL_EDIT_PRIVATE_NETWORK</h6>
850
 
851
 			<div class="row">
16841 efrain 852
                      	<div class="col-12  mr-3">
15337 efrain 853
                    	<?php
854
                    	    $element = $form->get('name');
855
                    	    $element->setOptions(['label' => 'LABEL_NAME']);
856
                            $element->setAttributes(['class' => 'form-control']);
857
 
858
                            echo $this->formLabel($element);
859
                            echo $this->formText($element);
860
                        ?>
861
						</div>
16822 efrain 862
					</div>
863
                    <div class="row">
16841 efrain 864
                      	<div class="col-12  mr-3">
15337 efrain 865
                    	<?php
866
                    	    $element = $form->get('main_hostname');
867
                    	    $element->setOptions(['label' => 'LABEL_MAIN_HOSTNAME']);
868
                            $element->setAttributes(['class' => 'form-control']);
869
 
870
                            echo $this->formLabel($element);
871
                            echo $this->formText($element);
872
                        ?>
873
						</div>
16822 efrain 874
					</div>
875
                    <div class="row">
16841 efrain 876
                      	<div class="col-12  mr-3">
15337 efrain 877
                    	<?php
15452 efrain 878
                    	    $element = $form->get('alternative_hostname');
879
                    	    $element->setOptions(['label' => 'LABEL_ALTERNATIVE_HOSTNAME']);
880
                            $element->setAttributes(['class' => 'form-control']);
881
 
882
                            echo $this->formLabel($element);
883
                            echo $this->formText($element);
884
                        ?>
885
						</div>
16822 efrain 886
					</div>
15452 efrain 887
 
16822 efrain 888
                    <div class="row">
16841 efrain 889
                      	<div class="col-12  mr-3">
15452 efrain 890
                    	<?php
15337 efrain 891
                    	    $element = $form->get('admin_hostname');
892
                    	    $element->setOptions(['label' => 'LABEL_ADMIN_HOSTNAME']);
893
                            $element->setAttributes(['class' => 'form-control']);
894
 
895
                            echo $this->formLabel($element);
896
                            echo $this->formText($element);
897
                        ?>
898
						</div>
16822 efrain 899
					</div>
16948 efrain 900
					<div class="row">
901
                      	<div class="col-12  mr-3">
902
                    	<?php
903
                    	    $element = $form->get('service_hostname');
904
                    	    $element->setOptions(['label' => 'LABEL_SERVICE_HOSTNAME']);
905
                            $element->setAttributes(['class' => 'form-control']);
906
 
907
                            echo $this->formLabel($element);
908
                            echo $this->formText($element);
909
                        ?>
910
						</div>
911
					</div>
16822 efrain 912
                    <div class="row">
16841 efrain 913
                      	<div class="col-12  mr-3">
15337 efrain 914
                            <?php
915
                            $element = $form->get('status');
916
                            echo $this->formCheckbox($element);
917
                            ?>
16822 efrain 918
						</div>
919
					</div>
920
                    <div class="row">
16841 efrain 921
                      	<div class="col-12  mr-3">
15459 efrain 922
                    	<?php
15831 efrain 923
                    	    $element = $form->get('moodle_name');
924
                    	    $element->setOptions(['label' => 'LABEL_MY_ONROOM_NAME']);
925
                            $element->setAttributes(['class' => 'form-control']);
926
 
927
                            echo $this->formLabel($element);
928
                            echo $this->formText($element);
929
                        ?>
930
						</div>
16822 efrain 931
                    <div class="row">
16841 efrain 932
                      	<div class="col-12  mr-3">
15831 efrain 933
                    	<?php
15459 efrain 934
                    	    $element = $form->get('moodle_url');
935
                    	    $element->setOptions(['label' => 'LABEL_MY_ONROOM_URL']);
936
                            $element->setAttributes(['class' => 'form-control']);
937
 
938
                            echo $this->formLabel($element);
939
                            echo $this->formText($element);
940
                        ?>
941
						</div>
16822 efrain 942
					</div>
943
                    <div class="row">
16841 efrain 944
                      	<div class="col-12  mr-3">
15831 efrain 945
                    	<?php
946
                    	    $element = $form->get('microlearning_appstore');
947
                    	    $element->setOptions(['label' => 'LABEL_MY_MICROLEARNING_APPSTORE']);
948
                            $element->setAttributes(['class' => 'form-control']);
949
 
950
                            echo $this->formLabel($element);
951
                            echo $this->formText($element);
952
                        ?>
953
						</div>
16822 efrain 954
					</div>
955
                    <div class="row">
16841 efrain 956
                      	<div class="col-12  mr-3">
15831 efrain 957
                    	<?php
958
                    	    $element = $form->get('microlearning_playstore');
959
                    	    $element->setOptions(['label' => 'LABEL_MY_MICROLEARNING_PLAYSTORE']);
960
                            $element->setAttributes(['class' => 'form-control']);
961
 
962
                            echo $this->formLabel($element);
963
                            echo $this->formText($element);
964
                        ?>
965
						</div>
16822 efrain 966
					</div>
967
                    <div class="row">
16841 efrain 968
                      	<div class="col-12  mr-3">
15459 efrain 969
                    	<?php
970
                    	    $element = $form->get('relationship_user_mode');
971
                    	    $element->setOptions(['label' => 'LABEL_THEME']);
972
                            $element->setAttributes(['class' => 'form-control']);
973
 
974
                            echo $this->formLabel($element);
975
                            echo $this->formSelect($element);
976
                        ?>
977
						</div>
16822 efrain 978
					</div>
979
                    <div class="row">
16841 efrain 980
                      	<div class="col-12  mr-3">
15441 efrain 981
                    	<?php
982
                    	    $element = $form->get('theme_id');
983
                    	    $element->setOptions(['label' => 'LABEL_THEME']);
984
                            $element->setAttributes(['class' => 'form-control']);
15337 efrain 985
 
15441 efrain 986
                            echo $this->formLabel($element);
987
                            echo $this->formSelect($element);
988
                        ?>
989
						</div>
16822 efrain 990
					</div>
991
 
992
 		</div>
993
 		<div class="card-footer text-right">
994
 			<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
995
        	<button type="button" class="btn btn-light btn-cancel">LABEL_CLOSE</button>
996
 
997
 		</div>
998
 		<?php echo $this->form()->closeTag($form); ?>
999
 	</div>
1000
</div>
15441 efrain 1001
 
16822 efrain 1002
 
15337 efrain 1003