| 1 | www | 1 | <?php
 | 
        
           |  |  | 2 | use LeadersLinked\Model\CompanyMicrolearningUserLog;
 | 
        
           |  |  | 3 |   | 
        
           |  |  | 4 | $acl            = $this->viewModel()->getRoot()->getVariable('acl');
 | 
        
           |  |  | 5 | $currentUser    = $this->currentUserHelper();
 | 
        
           |  |  | 6 | $roleName       = $currentUser->getUserTypeId();
 | 
        
           |  |  | 7 |   | 
        
           |  |  | 8 | $routeDatatable = $this->url('microlearning/students');
 | 
        
           |  |  | 9 |   | 
        
           |  |  | 10 | $allowEdit = $acl->isAllowed($roleName, 'microlearning/students/edit') ? 1 : 0;
 | 
        
           |  |  | 11 | $allowTimeline = $acl->isAllowed($roleName, 'microlearning/students/timeline') ? 1 : 0;
 | 
        
           |  |  | 12 | $allowChangePassword    = $acl->isAllowed($roleName, 'microlearning/students/change-password') ? 1 : 0;
 | 
        
           |  |  | 13 | $allowUnblock           = $acl->isAllowed($roleName, 'microlearning/students/unblock') ? 1 : 0;
 | 
        
           |  |  | 14 |   | 
        
           |  |  | 15 | $this->headLink()->appendStylesheet($this->basePath('plugins/nprogress/nprogress.css'));
 | 
        
           |  |  | 16 | $this->inlineScript()->appendFile($this->basePath('plugins/nprogress/nprogress.js'));
 | 
        
           |  |  | 17 |   | 
        
           |  |  | 18 |   | 
        
           |  |  | 19 | $this->inlineScript()->appendFile($this->basePath('plugins/bootbox/bootbox.min.js'));
 | 
        
           |  |  | 20 |   | 
        
           |  |  | 21 |   | 
        
           |  |  | 22 | $this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/jquery.validate.js'));
 | 
        
           |  |  | 23 | $this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/additional-methods.js'));
 | 
        
           |  |  | 24 | $this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/localization/messages_es.js'));
 | 
        
           |  |  | 25 |   | 
        
           |  |  | 26 | $this->headLink()->appendStylesheet($this->basePath('plugins/datatables-bs4/css/dataTables.bootstrap4.min.css'));
 | 
        
           |  |  | 27 | $this->headLink()->appendStylesheet($this->basePath('plugins/datatables-responsive/css/responsive.bootstrap4.min.css'));
 | 
        
           |  |  | 28 |   | 
        
           |  |  | 29 | $this->inlineScript()->appendFile($this->basePath('plugins/datatables/jquery.dataTables.min.js'));
 | 
        
           |  |  | 30 | $this->inlineScript()->appendFile($this->basePath('plugins/datatables-bs4/js/dataTables.bootstrap4.min.js'));
 | 
        
           |  |  | 31 | $this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/dataTables.responsive.min.js'));
 | 
        
           |  |  | 32 | $this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/responsive.bootstrap4.min.js'));
 | 
        
           |  |  | 33 |   | 
        
           |  |  | 34 | $this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-confirmation/dist/bootstrap-confirmation.js'));
 | 
        
           |  |  | 35 | $this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-checkbox/awesome-bootstrap-checkbox.css'));
 | 
        
           |  |  | 36 |   | 
        
           |  |  | 37 |   | 
        
           |  |  | 38 |   | 
        
           |  |  | 39 | $this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/jquery.validate.js'));
 | 
        
           |  |  | 40 | $this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/additional-methods.js'));
 | 
        
           |  |  | 41 | $this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/localization/messages_es.js'));
 | 
        
           |  |  | 42 |   | 
        
           |  |  | 43 | $activityApprovedTest = CompanyMicrolearningUserLog::ACTIVITY_APPROVED_TEST;
 | 
        
           |  |  | 44 | $activityCompletedCapsule = CompanyMicrolearningUserLog::ACTIVITY_COMPLETED_CAPSULE;
 | 
        
           |  |  | 45 | $activityCompletedTopic = CompanyMicrolearningUserLog::ACTIVITY_COMPLETED_TOPIC;
 | 
        
           |  |  | 46 | $activityRetakeATest = CompanyMicrolearningUserLog::ACTIVITY_RETAKE_A_TEST;
 | 
        
           |  |  | 47 | $activitySignin = CompanyMicrolearningUserLog::ACTIVITY_SIGNIN;
 | 
        
           |  |  | 48 | $activitySignout = CompanyMicrolearningUserLog::ACTIVITY_SIGNOUT;
 | 
        
           |  |  | 49 | $activityStartCapsule = CompanyMicrolearningUserLog::ACTIVITY_START_CAPSULE;
 | 
        
           |  |  | 50 | $activityStartTopic = CompanyMicrolearningUserLog::ACTIVITY_START_TOPIC;
 | 
        
           |  |  | 51 | $activityTakeATest = CompanyMicrolearningUserLog::ACTIVITY_TAKE_A_TEST;
 | 
        
           |  |  | 52 | $activityViewSlide = CompanyMicrolearningUserLog::ACTIVITY_VIEW_SLIDE;
 | 
        
           |  |  | 53 |   | 
        
           |  |  | 54 |   | 
        
           |  |  | 55 |   | 
        
           |  |  | 56 | $this->inlineScript()->captureStart();
 | 
        
           |  |  | 57 | echo <<<JS
 | 
        
           |  |  | 58 |   | 
        
           |  |  | 59 |   | 
        
           |  |  | 60 | jQuery( document ).ready(function( $ ) {
 | 
        
           |  |  | 61 |   | 
        
           |  |  | 62 |         var routeUpload = '';
 | 
        
           |  |  | 63 |         var routeNotification = '';
 | 
        
           |  |  | 64 |   | 
        
           |  |  | 65 |         $.validator.addMethod('passwordStrengthCheck', function(value) {
 | 
        
           |  |  | 66 |             return /^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$^x%x*-]).{6,16}$/.test(value)
 | 
        
           |  |  | 67 |         }, 'ERROR_PASSWORD_STRENGTH');
 | 
        
           |  |  | 68 |   | 
        
           |  |  | 69 |   | 
        
           |  |  | 70 |         $.validator.setDefaults({
 | 
        
           |  |  | 71 |             debug: true,
 | 
        
           |  |  | 72 |             highlight: function(element) {
 | 
        
           |  |  | 73 |                 $(element).addClass('is-invalid');
 | 
        
           |  |  | 74 |             },
 | 
        
           |  |  | 75 |             unhighlight: function(element) {
 | 
        
           |  |  | 76 |                 $(element).removeClass('is-invalid');
 | 
        
           |  |  | 77 |             },
 | 
        
           |  |  | 78 |             errorElement: 'span',
 | 
        
           |  |  | 79 |             errorClass: 'error invalid-feedback',
 | 
        
           |  |  | 80 |             errorPlacement: function(error, element) {
 | 
        
           |  |  | 81 |                 if(element.parent('.btn-file').length) {
 | 
        
           |  |  | 82 |                     error.insertAfter(element.parent().parent());
 | 
        
           |  |  | 83 |                 } else if(element.parent('.toggle').length) {
 | 
        
           |  |  | 84 |                     error.insertAfter(element.parent().parent());
 | 
        
           |  |  | 85 |                 } else {
 | 
        
           |  |  | 86 |                     error.insertAfter(element.parent());
 | 
        
           |  |  | 87 |                 }
 | 
        
           |  |  | 88 |             }
 | 
        
           |  |  | 89 |         });
 | 
        
           |  |  | 90 |   | 
        
           |  |  | 91 |   | 
        
           |  |  | 92 |         $.fn.showFormErrorValidator = function(fieldname, errors) {
 | 
        
           |  |  | 93 |             var field = $(fieldname);
 | 
        
           |  |  | 94 |             if(field) {
 | 
        
           |  |  | 95 |                 $(field).addClass('is-invalid');
 | 
        
           |  |  | 96 |   | 
        
           |  |  | 97 |   | 
        
           |  |  | 98 |                 var error = $('<span id="' + fieldname +'-error" class="error invalid-feedback">' + errors + '</div>');
 | 
        
           |  |  | 99 |                 if(element.parent('.btn-file').length) {
 | 
        
           |  |  | 100 |                     error.insertAfter(element.parent().parent());
 | 
        
           |  |  | 101 |                 } else if(element.parent('.toggle').length) {
 | 
        
           |  |  | 102 |                     error.insertAfter(element.parent().parent());
 | 
        
           |  |  | 103 |                 } else {
 | 
        
           |  |  | 104 |                     error.insertAfter(element.parent());
 | 
        
           |  |  | 105 |                 }
 | 
        
           |  |  | 106 |             }
 | 
        
           |  |  | 107 |         };
 | 
        
           |  |  | 108 |   | 
        
           |  |  | 109 |         var allowEdit       = $allowEdit;
 | 
        
           |  |  | 110 |         var allowTimeline   = $allowTimeline;
 | 
        
           |  |  | 111 |         var allowChangePassword = $allowChangePassword;
 | 
        
           |  |  | 112 |         var allowUnblock = $allowUnblock;
 | 
        
           |  |  | 113 |   | 
        
           |  |  | 114 |   | 
        
           |  |  | 115 |         var gridTable = $('#gridTable').dataTable( {
 | 
        
           |  |  | 116 |             'processing': true,
 | 
        
           |  |  | 117 |             'serverSide': true,
 | 
        
           |  |  | 118 |             'searching': true,
 | 
        
           |  |  | 119 |             'order': [[ 0, 'asc' ]],
 | 
        
           |  |  | 120 |             'ordering':  true,
 | 
        
           |  |  | 121 |             'ordenable' : true,
 | 
        
           |  |  | 122 |             'responsive': true,
 | 
        
           |  |  | 123 |             'select' : false,
 | 
        
           |  |  | 124 |         	'paging': true,
 | 
        
           |  |  | 125 |             'pagingType': 'simple_numbers',
 | 
        
           |  |  | 126 |   | 
        
           |  |  | 127 |   | 
        
           |  |  | 128 |     		'ajax': {
 | 
        
           |  |  | 129 |     			'url' : '$routeDatatable',
 | 
        
           |  |  | 130 |     			'type' : 'get',
 | 
        
           |  |  | 131 |   | 
        
           |  |  | 132 |                 'beforeSend': function (request) {
 | 
        
           |  |  | 133 |                   NProgress.start();
 | 
        
           |  |  | 134 |                 },
 | 
        
           |  |  | 135 |                 'dataFilter': function(response) {
 | 
        
           |  |  | 136 |                     var response = jQuery.parseJSON( response );
 | 
        
           |  |  | 137 |   | 
        
           |  |  | 138 |                     var json                = {};
 | 
        
           |  |  | 139 |                     json.recordsTotal       = 0;
 | 
        
           |  |  | 140 |                     json.recordsFiltered    = 0;
 | 
        
           |  |  | 141 |                     json.data               = [];
 | 
        
           |  |  | 142 |   | 
        
           |  |  | 143 |                     if(response.success) {
 | 
        
           |  |  | 144 |   | 
        
           |  |  | 145 |   | 
        
           |  |  | 146 |                         json.recordsTotal       = response.data.total;
 | 
        
           |  |  | 147 |                         json.recordsFiltered    = response.data.total;
 | 
        
           |  |  | 148 |                         json.data               = response.data.items;
 | 
        
           |  |  | 149 |                     } else {
 | 
        
           |  |  | 150 |                         $.fn.showError(response.data)
 | 
        
           |  |  | 151 |                     }
 | 
        
           |  |  | 152 |   | 
        
           |  |  | 153 |                     return JSON.stringify( json );
 | 
        
           |  |  | 154 |                 }
 | 
        
           |  |  | 155 |     		},
 | 
        
           |  |  | 156 |             'language' : {
 | 
        
           |  |  | 157 |                 'sProcessing':     'LABEL_DATATABLE_SPROCESSING',
 | 
        
           |  |  | 158 |                 'sLengthMenu':     'LABEL_DATATABLE_SLENGTHMENU',
 | 
        
           |  |  | 159 |                 'sZeroRecords':    'LABEL_DATATABLE_SZERORECORDS',
 | 
        
           |  |  | 160 |                 'sEmptyTable':     'LABEL_DATATABLE_SEMPTYTABLE',
 | 
        
           |  |  | 161 |                 'sInfo':           'LABEL_DATATABLE_SINFO',
 | 
        
           |  |  | 162 |                 'sInfoEmpty':      'LABEL_DATATABLE_SINFOEMPTY',
 | 
        
           |  |  | 163 |                 'sInfoFiltered':   'LABEL_DATATABLE_SINFOFILTERED',
 | 
        
           |  |  | 164 |                 'sInfoPostFix':    '',
 | 
        
           |  |  | 165 |                 'sSearch':         'LABEL_DATATABLE_SSEARCH',
 | 
        
           |  |  | 166 |                 'sUrl':            '',
 | 
        
           |  |  | 167 |                 'sInfoThousands':  ',',
 | 
        
           |  |  | 168 |                 'sLoadingRecords': 'LABEL_DATATABLE_SLOADINGRECORDS',
 | 
        
           |  |  | 169 |                 'oPaginate': {
 | 
        
           |  |  | 170 |                     'sFirst':    'LABEL_DATATABLE_SFIRST',
 | 
        
           |  |  | 171 |                     'sLast':     'LABEL_DATATABLE_SLAST',
 | 
        
           |  |  | 172 |                     'sNext':     'LABEL_DATATABLE_SNEXT',
 | 
        
           |  |  | 173 |                     'sPrevious': 'LABEL_DATATABLE_SPREVIOUS'
 | 
        
           |  |  | 174 |                 },
 | 
        
           |  |  | 175 |                 'oAria': {
 | 
        
           |  |  | 176 |                     'sSortAscending':  ': LABEL_DATATABLE_SSORTASCENDING',
 | 
        
           |  |  | 177 |                     'sSortDescending': ':LABEL_DATATABLE_SSORTDESCENDING'
 | 
        
           |  |  | 178 |                 },
 | 
        
           |  |  | 179 |             },
 | 
        
           |  |  | 180 |             'drawCallback': function( settings ) {
 | 
        
           |  |  | 181 |                 NProgress.done();
 | 
        
           |  |  | 182 |                 $('button.btn-unblock').confirmation({
 | 
        
           |  |  | 183 |                     rootSelector: 'button.btn-unblock',
 | 
        
           |  |  | 184 |                     title : 'LABEL_ARE_YOU_SURE',
 | 
        
           |  |  | 185 |                     singleton : true,
 | 
        
           |  |  | 186 |                     btnOkLabel: 'LABEL_YES',
 | 
        
           |  |  | 187 |                     btnCancelLabel: 'LABEL_NO',
 | 
        
           |  |  | 188 |                     onConfirm: function(value) {
 | 
        
           |  |  | 189 |                         action = $(this).data('href');
 | 
        
           |  |  | 190 |                         NProgress.start();
 | 
        
           |  |  | 191 |                         $.ajax({
 | 
        
           |  |  | 192 |                             'dataType'  : 'json',
 | 
        
           |  |  | 193 |                             'accept'    : 'application/json',
 | 
        
           |  |  | 194 |                             'method'    : 'post',
 | 
        
           |  |  | 195 |                             'url'       :  action,
 | 
        
           |  |  | 196 |                         }).done(function(response) {
 | 
        
           |  |  | 197 |                             if(response['success']) {
 | 
        
           |  |  | 198 |                                 $.fn.showSuccess(response['data']);
 | 
        
           |  |  | 199 |                                 gridTable.api().ajax.reload(null, false);
 | 
        
           |  |  | 200 |                             } else {
 | 
        
           |  |  | 201 |                                 $.fn.showError(response['data']);
 | 
        
           |  |  | 202 |                             }
 | 
        
           |  |  | 203 |                         }).fail(function( jqXHR, textStatus, errorThrown) {
 | 
        
           |  |  | 204 |                             $.fn.showError(textStatus);
 | 
        
           |  |  | 205 |                         }).always(function() {
 | 
        
           |  |  | 206 |                             NProgress.done();
 | 
        
           |  |  | 207 |                         });
 | 
        
           |  |  | 208 |                     },
 | 
        
           |  |  | 209 |                 });
 | 
        
           |  |  | 210 |             },
 | 
        
           |  |  | 211 |             'aoColumns': [
 | 
        
           |  |  | 212 |                 { 'mDataProp': 'first_name' },
 | 
        
           |  |  | 213 |                 { 'mDataProp': 'last_name' },
 | 
        
           |  |  | 214 |                 { 'mDataProp': 'email' },
 | 
        
           |  |  | 215 |                 { 'mDataProp': 'details' },
 | 
        
           |  |  | 216 |                 { 'mDataProp': 'actions' },
 | 
        
           |  |  | 217 |     	    ],
 | 
        
           |  |  | 218 |             'columnDefs': [
 | 
        
           |  |  | 219 |                 {
 | 
        
           |  |  | 220 |                     'targets': -2,
 | 
        
           |  |  | 221 |                     'orderable': false,
 | 
        
           |  |  | 222 |                     'render' : function ( data, type, row ) {
 | 
        
           |  |  | 223 |                         s = '';
 | 
        
           |  |  | 224 |                         s = s + 'LABEL_TOTAL_ASIGNED : ' + data['total_asigned'] + '<br>';
 | 
        
           |  |  | 225 |                         s = s + 'LABEL_TOTAL_WITHOUT_STARTING : ' + data['total_without_starting'] + '<br>';
 | 
        
           |  |  | 226 |                         s = s + 'LABEL_TOTAL_STARTED : ' + data['total_started'] + '<br>';
 | 
        
           |  |  | 227 |                         s = s + 'LABEL_TOTAL_COMPLETED : ' + data['total_completed'] + '<br>';
 | 
        
           |  |  | 228 |   | 
        
           |  |  | 229 |                         return s;
 | 
        
           |  |  | 230 |                     }
 | 
        
           |  |  | 231 |                 },
 | 
        
           |  |  | 232 |   | 
        
           |  |  | 233 |   | 
        
           |  |  | 234 |                 {
 | 
        
           |  |  | 235 |                     'targets': -1,
 | 
        
           |  |  | 236 |                     'orderable': false,
 | 
        
           |  |  | 237 |                     'render' : function ( data, type, row ) {
 | 
        
           |  |  | 238 |                         s = '';
 | 
        
           |  |  | 239 |   | 
        
           |  |  | 240 |                         if(allowEdit && data['link_edit']  ) {
 | 
        
           |  |  | 241 |                             s = s + '<button class="btn btn-primary btn-sm btn-edit" style="margin-top: 5px" data-href="' + data['link_edit']+ '" data-toggle="tooltip" title="LABEL_EDIT"><i class="fa fa-pencil"></i> LABEL_EDIT </button><br>';
 | 
        
           |  |  | 242 |                         }
 | 
        
           |  |  | 243 |                         if(allowTimeline && data['link_timeline']  ) {
 | 
        
           |  |  | 244 |                             s = s + '<button class="btn btn-info btn-sm btn-timeline" style="margin-top: 5px" data-href="' + data['link_timeline']+ '" data-toggle="tooltip" title="LABEL_TIMELINE"><i class="fa fa-th-list"></i> LABEL_ACTIVITIES</button><br>';
 | 
        
           |  |  | 245 |                         }
 | 
        
           |  |  | 246 |                         if(allowChangePassword && data['link_change_password']) {
 | 
        
           |  |  | 247 |                             s = s + '<button class="btn btn-success btn-sm btn-change-password" style="margin-top: 5px" data-href="' + data['link_change_password']+ '" data-toggle="tooltip" title="LABEL_CHANGE_PASSWORD"><i class="fa fa-key"></i> LABEL_PASSWORD </button><br>';
 | 
        
           |  |  | 248 |                         }
 | 
        
           |  |  | 249 |                         if(allowUnblock && data['link_unblock']) {
 | 
        
           |  |  | 250 |                             s = s + '<button class="btn btn-info btn-sm  btn-unblock" style="margin-top: 5px" data-href="' + data['link_unblock']+ '" data-toggle="tooltip" title="LABEL_UNBLOCK"><i class="fa fa-unlock"></i> LABEL_UNBLOCK </button><br>';
 | 
        
           |  |  | 251 |                         }
 | 
        
           |  |  | 252 |   | 
        
           |  |  | 253 |   | 
        
           |  |  | 254 |   | 
        
           |  |  | 255 |                         return s;
 | 
        
           |  |  | 256 |                     }
 | 
        
           |  |  | 257 |                 }
 | 
        
           |  |  | 258 |               ],
 | 
        
           |  |  | 259 |         });
 | 
        
           |  |  | 260 |   | 
        
           |  |  | 261 |     var validatorEdit  = $('#form-extend-user').validate({
 | 
        
           |  |  | 262 |         debug: true,
 | 
        
           |  |  | 263 |         onclick: false,
 | 
        
           |  |  | 264 |         onkeyup: false,
 | 
        
           |  |  | 265 |         ignore: [],
 | 
        
           |  |  | 266 |         rules: {
 | 
        
           |  |  | 267 |             'company_id': {
 | 
        
           |  |  | 268 |                 required: false,
 | 
        
           |  |  | 269 |             },
 | 
        
           |  |  | 270 |             'function_id': {
 | 
        
           |  |  | 271 |                 required: false,
 | 
        
           |  |  | 272 |             },
 | 
        
           |  |  | 273 |             'group_id': {
 | 
        
           |  |  | 274 |                 required: false,
 | 
        
           |  |  | 275 |             },
 | 
        
           |  |  | 276 |             'institution_id': {
 | 
        
           |  |  | 277 |                 required: false,
 | 
        
           |  |  | 278 |             },
 | 
        
           |  |  | 279 |             'program_id': {
 | 
        
           |  |  | 280 |                 required: false,
 | 
        
           |  |  | 281 |             },
 | 
        
           |  |  | 282 |             'partner_id': {
 | 
        
           |  |  | 283 |                 required: false,
 | 
        
           |  |  | 284 |             },
 | 
        
           |  |  | 285 |             'sector_id': {
 | 
        
           |  |  | 286 |                 required: false,
 | 
        
           |  |  | 287 |             },
 | 
        
           |  |  | 288 |             'student_type_id': {
 | 
        
           |  |  | 289 |                 required: false,
 | 
        
           |  |  | 290 |             },
 | 
        
           |  |  | 291 |         },
 | 
        
           |  |  | 292 |         submitHandler: function(form)
 | 
        
           |  |  | 293 |         {
 | 
        
           |  |  | 294 |   | 
        
           |  |  | 295 |             $('input[type="submit"]').prop('disabled', true);
 | 
        
           |  |  | 296 |   | 
        
           |  |  | 297 |             $.ajax({
 | 
        
           |  |  | 298 |                 'dataType'  : 'json',
 | 
        
           |  |  | 299 |                 'accept'    : 'application/json',
 | 
        
           |  |  | 300 |                 'method'    : 'post',
 | 
        
           |  |  | 301 |                 'url'       :  $('#form-extend-user').attr('action'),
 | 
        
           |  |  | 302 |                 'data'      :  $('#form-extend-user').serialize(),
 | 
        
           |  |  | 303 |             }).done(function(response) {
 | 
        
           |  |  | 304 |                 if(response['success']) {
 | 
        
           |  |  | 305 |                     $.fn.showSuccess(response['data']);
 | 
        
           |  |  | 306 |   | 
        
           |  |  | 307 |   | 
        
           |  |  | 308 |                     $('#modalExtendUser').modal('hide');
 | 
        
           |  |  | 309 |                     gridTable.api().ajax.reload(null, false);
 | 
        
           |  |  | 310 |                 } else {
 | 
        
           |  |  | 311 |                     validatorEdit.resetForm();
 | 
        
           |  |  | 312 |                     if(jQuery.type(response['data']) == 'string') {
 | 
        
           |  |  | 313 |                         $.fn.showError(response['data']);
 | 
        
           |  |  | 314 |                     } else  {
 | 
        
           |  |  | 315 |                         $.each(response['data'], function( fieldname, errors ) {
 | 
        
           |  |  | 316 |                             $.fn.showFormErrorValidator('#form-extend-user #' + fieldname, errors);
 | 
        
           |  |  | 317 |                         });
 | 
        
           |  |  | 318 |                     }
 | 
        
           |  |  | 319 |                 }
 | 
        
           |  |  | 320 |             }).fail(function( jqXHR, textStatus, errorThrown) {
 | 
        
           |  |  | 321 |                 $.fn.showError(textStatus);
 | 
        
           |  |  | 322 |             }).always(function() {
 | 
        
           |  |  | 323 |                 NProgress.done();
 | 
        
           |  |  | 324 |             });
 | 
        
           |  |  | 325 |             return false;
 | 
        
           |  |  | 326 |         },
 | 
        
           |  |  | 327 |         invalidHandler: function(form, validator) {
 | 
        
           |  |  | 328 |   | 
        
           |  |  | 329 |         }
 | 
        
           |  |  | 330 |     });
 | 
        
           |  |  | 331 |   | 
        
           |  |  | 332 |   | 
        
           |  |  | 333 |         $('body').on('click', 'button.btn-edit', function(e) {
 | 
        
           |  |  | 334 |             e.preventDefault();
 | 
        
           |  |  | 335 |   | 
        
           |  |  | 336 |             var url = $(this).data('href');
 | 
        
           |  |  | 337 |             $.ajax({
 | 
        
           |  |  | 338 |                 'dataType'  : 'json',
 | 
        
           |  |  | 339 |                 'accept'    : 'application/json',
 | 
        
           |  |  | 340 |                 'method'    : 'get',
 | 
        
           |  |  | 341 |                 'url'       :  url,
 | 
        
           |  |  | 342 |             }).done(function(response) {
 | 
        
           |  |  | 343 |                 if(response['success']) {
 | 
        
           |  |  | 344 |                     $('#form-extend-user').attr('action',url);
 | 
        
           |  |  | 345 |                     $('#form-extend-user #first_name').val(response['data']['first_name']);
 | 
        
           |  |  | 346 |                     $('#form-extend-user #last_name').val(response['data']['last_name']);
 | 
        
           |  |  | 347 |                     $('#form-extend-user #email').val(response['data']['email']);
 | 
        
           |  |  | 348 |                     $('#form-extend-user #company_id').val(response['data']['company_id']);
 | 
        
           |  |  | 349 |                     $('#form-extend-user #function_id').val(response['data']['function_id']);
 | 
        
           |  |  | 350 |                     $('#form-extend-user #group_id').val(response['data']['group_id']);
 | 
        
           |  |  | 351 |                     $('#form-extend-user #institution_id').val(response['data']['institution_id']);
 | 
        
           |  |  | 352 |                     $('#form-extend-user #program_id').val(response['data']['program_id']);
 | 
        
           |  |  | 353 |                     $('#form-extend-user #partner_id').val(response['data']['partner_id']);
 | 
        
           |  |  | 354 |                     $('#form-extend-user #sector_id').val(response['data']['sector_id']);
 | 
        
           |  |  | 355 |                     $('#form-extend-user #student_type_id').val(response['data']['student_type_id']);
 | 
        
           |  |  | 356 |   | 
        
           |  |  | 357 |   | 
        
           |  |  | 358 |   | 
        
           |  |  | 359 |                     $('#modalExtendUser').modal('show');
 | 
        
           |  |  | 360 |                 } else {
 | 
        
           |  |  | 361 |                     validatorEdit.resetForm();
 | 
        
           |  |  | 362 |                     if(jQuery.type(response['data']) == 'string') {
 | 
        
           |  |  | 363 |                         $.fn.showError(response['data']);
 | 
        
           |  |  | 364 |                     } else  {
 | 
        
           |  |  | 365 |                         $.each(response['data'], function( fieldname, errors ) {
 | 
        
           |  |  | 366 |                             $.fn.showFormErrorValidator('#form-extend-user #' + fieldname, errors);
 | 
        
           |  |  | 367 |                         });
 | 
        
           |  |  | 368 |                     }
 | 
        
           |  |  | 369 |                 }
 | 
        
           |  |  | 370 |             }).fail(function( jqXHR, textStatus, errorThrown) {
 | 
        
           |  |  | 371 |                 $.fn.showError(textStatus);
 | 
        
           |  |  | 372 |             }).always(function() {
 | 
        
           |  |  | 373 |                 NProgress.done();
 | 
        
           |  |  | 374 |             });
 | 
        
           |  |  | 375 |         });
 | 
        
           |  |  | 376 |   | 
        
           |  |  | 377 |         $('body').on('click', 'button.btn-timeline', function(e) {
 | 
        
           |  |  | 378 |             e.preventDefault();
 | 
        
           |  |  | 379 |   | 
        
           |  |  | 380 |             var url = $(this).data('href');
 | 
        
           |  |  | 381 |             $.ajax({
 | 
        
           |  |  | 382 |                 'dataType'  : 'json',
 | 
        
           |  |  | 383 |                 'accept'    : 'application/json',
 | 
        
           |  |  | 384 |                 'method'    : 'get',
 | 
        
           |  |  | 385 |                 'url'       :  url,
 | 
        
           |  |  | 386 |             }).done(function(response) {
 | 
        
           |  |  | 387 |                 if(response['success']) {
 | 
        
           |  |  | 388 |   | 
        
           |  |  | 389 |                     $('div.timeline').empty();
 | 
        
           |  |  | 390 |   | 
        
           |  |  | 391 |                     $.fn.renderTimeLine(response['data']);
 | 
        
           |  |  | 392 |   | 
        
           |  |  | 393 |                     $('#modalTimeline').modal('show');
 | 
        
           |  |  | 394 |                 } else {
 | 
        
           |  |  | 395 |                     $.fn.showError(response['data']);
 | 
        
           |  |  | 396 |                 }
 | 
        
           |  |  | 397 |             }).fail(function( jqXHR, textStatus, errorThrown) {
 | 
        
           |  |  | 398 |                 $.fn.showError(textStatus);
 | 
        
           |  |  | 399 |             }).always(function() {
 | 
        
           |  |  | 400 |                 NProgress.done();
 | 
        
           |  |  | 401 |             });
 | 
        
           |  |  | 402 |         });
 | 
        
           |  |  | 403 |   | 
        
           |  |  | 404 |   | 
        
           |  |  | 405 |         $('body').on('click', 'button.btn-cancel', function(e) {
 | 
        
           |  |  | 406 |             e.preventDefault();
 | 
        
           |  |  | 407 |             $('#modalExtendUser').modal('hide');
 | 
        
           |  |  | 408 |             $('#modalTimeline').modal('hide');
 | 
        
           |  |  | 409 |             $('#modalChangePassword').modal('hide');
 | 
        
           |  |  | 410 |         });
 | 
        
           |  |  | 411 |   | 
        
           |  |  | 412 |   | 
        
           |  |  | 413 |   | 
        
           |  |  | 414 |   | 
        
           |  |  | 415 |         $('body').on('click', 'button.btn-refresh', function(e) {
 | 
        
           |  |  | 416 |             e.preventDefault();
 | 
        
           |  |  | 417 |             gridTable.api().ajax.reload(null, false);
 | 
        
           |  |  | 418 |         });
 | 
        
           |  |  | 419 |   | 
        
           |  |  | 420 |         $.fn.renderTimeLine = function(data) {
 | 
        
           |  |  | 421 |   | 
        
           |  |  | 422 |             $.each(data['current']['items'],function(index, record) {
 | 
        
           |  |  | 423 |   | 
        
           |  |  | 424 |                 switch(record['activity'])
 | 
        
           |  |  | 425 |                 {
 | 
        
           |  |  | 426 |                     case '$activityApprovedTest' :
 | 
        
           |  |  | 427 |                         activity = 'LABEL_TIMELINE_ACTIVITY_APPROVED_TEST';
 | 
        
           |  |  | 428 |                         image = '/img/microlearning/approved-test.svg';
 | 
        
           |  |  | 429 |                         break;
 | 
        
           |  |  | 430 |   | 
        
           |  |  | 431 |                     case '$activityCompletedCapsule' :
 | 
        
           |  |  | 432 |                         activity = 'LABEL_TIMELINE_ACTIVITY_COMPLETED_CAPSULE';
 | 
        
           |  |  | 433 |                         image = '/img/microlearning/completed-capsule.svg';
 | 
        
           |  |  | 434 |                         break;
 | 
        
           |  |  | 435 |   | 
        
           |  |  | 436 |                     case '$activityCompletedTopic' :
 | 
        
           |  |  | 437 |                         activity = 'LABEL_TIMELINE_ACTIVITY_COMPLETED_TOPIC';
 | 
        
           |  |  | 438 |                         image = '/img/microlearning/completed-topic.svg';
 | 
        
           |  |  | 439 |                         break;
 | 
        
           |  |  | 440 |   | 
        
           |  |  | 441 |                     case '$activityRetakeATest' :
 | 
        
           |  |  | 442 |                         activity = 'LABEL_TIMELINE_ACTIVITY_RETAKE_A_TEST';
 | 
        
           |  |  | 443 |                         image = '/img/microlearning/retake-a-test.svg';
 | 
        
           |  |  | 444 |                         break;
 | 
        
           |  |  | 445 |   | 
        
           |  |  | 446 |                     case '$activitySignin' :
 | 
        
           |  |  | 447 |                         activity = 'LABEL_TIMELINE_ACTIVITY_SIGNIN';
 | 
        
           |  |  | 448 |                         image = '/img/microlearning/sign-in.svg';
 | 
        
           |  |  | 449 |                         break;
 | 
        
           |  |  | 450 |   | 
        
           |  |  | 451 |                     case '$activitySignout' :
 | 
        
           |  |  | 452 |                         activity = 'LABEL_TIMELINE_ACTIVITY_SIGNOUT';
 | 
        
           |  |  | 453 |                         image = '/img/microlearning/sign-out.svg';
 | 
        
           |  |  | 454 |                         break;
 | 
        
           |  |  | 455 |   | 
        
           |  |  | 456 |                     case '$activityStartCapsule' :
 | 
        
           |  |  | 457 |                         activity = 'LABEL_TIMELINE_ACTIVITY_START_CAPSULE';
 | 
        
           |  |  | 458 |                         image = '/img/microlearning/start-capsule.svg';
 | 
        
           |  |  | 459 |                         break;
 | 
        
           |  |  | 460 |   | 
        
           |  |  | 461 |                     case '$activityStartTopic' :
 | 
        
           |  |  | 462 |                         activity = 'LABEL_TIMELINE_ACTIVITY_START_TOPIC';
 | 
        
           |  |  | 463 |                         image = '/img/microlearning/start-topic.svg';
 | 
        
           |  |  | 464 |                         break;
 | 
        
           |  |  | 465 |   | 
        
           |  |  | 466 |                     case '$activityTakeATest' :
 | 
        
           |  |  | 467 |                         activity = 'LABEL_TIMELINE_ACTIVITY_TAKE_A_TEST';
 | 
        
           |  |  | 468 |                         image = '/img/microlearning/take-a-test.svg';
 | 
        
           |  |  | 469 |                         break;
 | 
        
           |  |  | 470 |   | 
        
           |  |  | 471 |                     case '$activityViewSlide' :
 | 
        
           |  |  | 472 |                         activity = 'LABEL_TIMELINE_ACTIVITY_VIEW_SLIDE';
 | 
        
           |  |  | 473 |                         image = '/img/microlearning/view-slide.svg';
 | 
        
           |  |  | 474 |                         break;
 | 
        
           |  |  | 475 |   | 
        
           |  |  | 476 |                     default :
 | 
        
           |  |  | 477 |                         activity = '';
 | 
        
           |  |  | 478 |                         break;
 | 
        
           |  |  | 479 |                 }
 | 
        
           |  |  | 480 |   | 
        
           |  |  | 481 |                 if(activity) {
 | 
        
           |  |  | 482 |   | 
        
           |  |  | 483 |   | 
        
           |  |  | 484 |                     var s = '<div>';
 | 
        
           |  |  | 485 |                     s = s + '<img src="' + image + '" style="width: 32px; height: auto" />';
 | 
        
           |  |  | 486 |                     s = s + '<div class="timeline-item">';
 | 
        
           |  |  | 487 |                     s = s + '<span class="time"><i class="fas fa-clock"></i> ' + record['added_on'] +'</span>';
 | 
        
           |  |  | 488 |                     s = s + '<h3 class="timeline-header">' + activity + '</h3>';
 | 
        
           |  |  | 489 |   | 
        
           |  |  | 490 |                     if(record['topic'] || record['capsule'] || record['slide']) {
 | 
        
           |  |  | 491 |                         s = s + '<div class="timeline-body">';
 | 
        
           |  |  | 492 |   | 
        
           |  |  | 493 |                         if(record['topic']) {
 | 
        
           |  |  | 494 |                             s = s + 'LABEL_TOPIC : ' + record['topic'] + '<br>';
 | 
        
           |  |  | 495 |                         }
 | 
        
           |  |  | 496 |                         if(record['capsule']) {
 | 
        
           |  |  | 497 |                             s = s + ' LABEL_CAPSULE : ' + record['capsule'] + '<br>';
 | 
        
           |  |  | 498 |                         }
 | 
        
           |  |  | 499 |                         if(record['slide']) {
 | 
        
           |  |  | 500 |                             s = s + ' LABEL_SLIDE : ' + record['slide'] + '<br>';
 | 
        
           |  |  | 501 |                         }
 | 
        
           |  |  | 502 |                         s = s + '</div>';
 | 
        
           |  |  | 503 |                     }
 | 
        
           |  |  | 504 |   | 
        
           |  |  | 505 |                     s = s + '</div>';
 | 
        
           |  |  | 506 |                     s = s + '</div>';
 | 
        
           |  |  | 507 |   | 
        
           |  |  | 508 |                     $('div.timeline').append(s);
 | 
        
           |  |  | 509 |                 }
 | 
        
           |  |  | 510 |   | 
        
           |  |  | 511 |             });
 | 
        
           |  |  | 512 |         }
 | 
        
           |  |  | 513 |   | 
        
           |  |  | 514 |   | 
        
           |  |  | 515 |  var validatorChangePassword = $('#form-change-password').validate({
 | 
        
           |  |  | 516 |         debug: true,
 | 
        
           |  |  | 517 |         onclick: false,
 | 
        
           |  |  | 518 |         onkeyup: false,
 | 
        
           |  |  | 519 |         ignore: [':hidden'],
 | 
        
           |  |  | 520 |             rules: {
 | 
        
           |  |  | 521 |   | 
        
           |  |  | 522 |                 'password': {
 | 
        
           |  |  | 523 |                     required: true,
 | 
        
           |  |  | 524 |                     minlength: 6,
 | 
        
           |  |  | 525 |                     maxlength: 16,
 | 
        
           |  |  | 526 |                     passwordStrengthCheck: true,
 | 
        
           |  |  | 527 |                 },
 | 
        
           |  |  | 528 |                 'confirmation' : {
 | 
        
           |  |  | 529 |                     required: true,
 | 
        
           |  |  | 530 |                     minlength: 6,
 | 
        
           |  |  | 531 |                     maxlength: 16,
 | 
        
           |  |  | 532 |                     equalTo: '#form-change-password #password'
 | 
        
           |  |  | 533 |                 },
 | 
        
           |  |  | 534 |             },
 | 
        
           |  |  | 535 |             submitHandler: function(form)
 | 
        
           |  |  | 536 |             {
 | 
        
           |  |  | 537 |                 NProgress.start();
 | 
        
           |  |  | 538 |                 $.ajax({
 | 
        
           |  |  | 539 |                     'dataType'  : 'json',
 | 
        
           |  |  | 540 |                     'accept'    : 'application/json',
 | 
        
           |  |  | 541 |                     'method'    : 'post',
 | 
        
           |  |  | 542 |                     'url'       : $('#form-change-password').attr('action'),
 | 
        
           |  |  | 543 |                     'data'      : $('#form-change-password').serialize()
 | 
        
           |  |  | 544 |                  }).done(function(response) {
 | 
        
           |  |  | 545 |                     if(response.success) {
 | 
        
           |  |  | 546 |                         $.fn.showSuccess(response.data);
 | 
        
           |  |  | 547 |   | 
        
           |  |  | 548 |                         $('#modalChangePassword').modal('hide');
 | 
        
           |  |  | 549 |                          gridTable.api().ajax.reload(null, false);
 | 
        
           |  |  | 550 |                     } else {
 | 
        
           |  |  | 551 |                         if(jQuery.type(response.data) == 'string') {
 | 
        
           |  |  | 552 |                             $.fn.showError(response.data)
 | 
        
           |  |  | 553 |                         } else  {
 | 
        
           |  |  | 554 |                             $.each(response.data, function( fieldname, errors ) {
 | 
        
           |  |  | 555 |                                 $.fn.showFormErrorValidator('#form-change-password #' + fieldname, errors);
 | 
        
           |  |  | 556 |                             });
 | 
        
           |  |  | 557 |                         }
 | 
        
           |  |  | 558 |                     }
 | 
        
           |  |  | 559 |                 }).fail(function( jqXHR, textStatus, errorThrown) {
 | 
        
           |  |  | 560 |                     $.fn.showError(textStatus)
 | 
        
           |  |  | 561 |   | 
        
           |  |  | 562 |                 }).always(function() {
 | 
        
           |  |  | 563 |                     NProgress.done();
 | 
        
           |  |  | 564 |                 })
 | 
        
           |  |  | 565 |             },
 | 
        
           |  |  | 566 |             invalidHandler: function(form, validator) {
 | 
        
           |  |  | 567 |             }
 | 
        
           |  |  | 568 |         });
 | 
        
           |  |  | 569 |   | 
        
           |  |  | 570 |         $('body').on('click', 'button.btn-change-password', function(e) {
 | 
        
           |  |  | 571 |             e.preventDefault();
 | 
        
           |  |  | 572 |   | 
        
           |  |  | 573 |             NProgress.start();
 | 
        
           |  |  | 574 |             var action = $(this).data('href');
 | 
        
           |  |  | 575 |   | 
        
           |  |  | 576 |             $.ajax({
 | 
        
           |  |  | 577 |                 'dataType'  : 'json',
 | 
        
           |  |  | 578 |                 'accept'    : 'application/json',
 | 
        
           |  |  | 579 |                 'method'    : 'get',
 | 
        
           |  |  | 580 |                 'url'       :  action,
 | 
        
           |  |  | 581 |             }).done(function(response) {
 | 
        
           |  |  | 582 |                 if(response['success']) {
 | 
        
           |  |  | 583 |   | 
        
           |  |  | 584 |                     $('#form-change-password').attr('action', action);
 | 
        
           |  |  | 585 |                     $('#form-change-password #first_name').val(response['data']['first_name']);
 | 
        
           |  |  | 586 |                     $('#form-change-password #last_name').val(response['data']['last_name']);
 | 
        
           |  |  | 587 |                     $('#form-change-password #email').val(response['data']['email']);
 | 
        
           |  |  | 588 |                     $('#form-change-password #password').val('');
 | 
        
           |  |  | 589 |                     $('#form-change-password #confirmation').val('');
 | 
        
           |  |  | 590 |                     validatorChangePassword.resetForm();
 | 
        
           |  |  | 591 |   | 
        
           |  |  | 592 |                     $('#modalChangePassword').modal('show');
 | 
        
           |  |  | 593 |                 } else {
 | 
        
           |  |  | 594 |                     $.fn.showError(response['data']);
 | 
        
           |  |  | 595 |                 }
 | 
        
           |  |  | 596 |             }).fail(function( jqXHR, textStatus, errorThrown) {
 | 
        
           |  |  | 597 |                 $.fn.showError(textStatus);
 | 
        
           |  |  | 598 |             }).always(function() {
 | 
        
           |  |  | 599 |                 NProgress.done();
 | 
        
           |  |  | 600 |             });
 | 
        
           |  |  | 601 |   | 
        
           |  |  | 602 |         });
 | 
        
           |  |  | 603 |   | 
        
           |  |  | 604 |   | 
        
           |  |  | 605 |   | 
        
           |  |  | 606 |     });
 | 
        
           |  |  | 607 | JS;
 | 
        
           |  |  | 608 | $this->inlineScript()->captureEnd();
 | 
        
           |  |  | 609 | ?>
 | 
        
           |  |  | 610 |   | 
        
           |  |  | 611 |   | 
        
           |  |  | 612 | <!-- Content Header (Page header) -->
 | 
        
           |  |  | 613 | <section class="content-header">
 | 
        
           |  |  | 614 | 	<div class="container-fluid">
 | 
        
           |  |  | 615 |     	<div class="row mb-2">
 | 
        
           |  |  | 616 |         	<div class="col-sm-12">
 | 
        
           |  |  | 617 |             	<h1>LABEL_STUDENTS</h1>
 | 
        
           |  |  | 618 | 			</div>
 | 
        
           |  |  | 619 | 		</div>
 | 
        
           |  |  | 620 | 	</div><!-- /.container-fluid -->
 | 
        
           |  |  | 621 | </section>
 | 
        
           |  |  | 622 |   | 
        
           |  |  | 623 | <section class="content">
 | 
        
           |  |  | 624 | 	<div class="container-fluid">
 | 
        
           |  |  | 625 |     	<div class="row">
 | 
        
           |  |  | 626 |         	<div class="col-12">
 | 
        
           |  |  | 627 | 				<div class="card">
 | 
        
           |  |  | 628 | 					<div class="card-header">
 | 
        
           |  |  | 629 | 					</div>
 | 
        
           |  |  | 630 | 					<div class="card-body">
 | 
        
           |  |  | 631 |         	    		<table id="gridTable" class="table table-striped table-hover">
 | 
        
           |  |  | 632 |                       		<thead>
 | 
        
           |  |  | 633 |         						<tr>
 | 
        
           |  |  | 634 |                                 	<th>LABEL_FIRST_NAME</th>
 | 
        
           |  |  | 635 |                                 	<th>LABEL_LAST_NAME</th>
 | 
        
           |  |  | 636 |                                 	<th>LABEL_EMAIL</th>
 | 
        
           |  |  | 637 |                                   	<th>LABEL_CAPSULES</th>
 | 
        
           |  |  | 638 |                                   	<th>LABEL_ACTIONS</th>
 | 
        
           |  |  | 639 |                                 </tr>
 | 
        
           |  |  | 640 |                        		</thead>
 | 
        
           |  |  | 641 |                          	<tbody>
 | 
        
           |  |  | 642 |                          	</tbody>
 | 
        
           |  |  | 643 |                     	</table>
 | 
        
           |  |  | 644 |                    	</div>
 | 
        
           |  |  | 645 |                    	<div class="card-footer clearfix">
 | 
        
           |  |  | 646 |                  	</div>
 | 
        
           |  |  | 647 |           		</div>
 | 
        
           |  |  | 648 |            	</div>
 | 
        
           |  |  | 649 |         </div>
 | 
        
           |  |  | 650 |  	</div>
 | 
        
           |  |  | 651 | </section>
 | 
        
           |  |  | 652 |   | 
        
           |  |  | 653 |   | 
        
           |  |  | 654 | <!-- The Modal -->
 | 
        
           |  |  | 655 | <div class="modal" id="modalExtendUser">
 | 
        
           |  |  | 656 | 	<div class="modal-dialog  modal-xl">
 | 
        
           |  |  | 657 |     	<div class="modal-content">
 | 
        
           |  |  | 658 |   | 
        
           |  |  | 659 |             <!-- Modal Header -->
 | 
        
           |  |  | 660 |       		<div class="modal-header">
 | 
        
           |  |  | 661 |         		<h4 class="modal-title">LABEL_EDIT</h4>
 | 
        
           |  |  | 662 |         		<button type="button" class="close" data-dismiss="modal">×</button>
 | 
        
           |  |  | 663 |       		</div>
 | 
        
           |  |  | 664 |   | 
        
           |  |  | 665 |             <!-- Modal body -->
 | 
        
           |  |  | 666 |       		<div class="modal-body">
 | 
        
           |  |  | 667 |        			 <?php
 | 
        
           |  |  | 668 |                     $form = $this->formExtendUser;
 | 
        
           |  |  | 669 |             		$form->setAttributes([
 | 
        
           |  |  | 670 |                         'method'    => 'post',
 | 
        
           |  |  | 671 |                         'name'      => 'form-extend-user',
 | 
        
           |  |  | 672 |                         'id'        => 'form-extend-user'
 | 
        
           |  |  | 673 |                     ]);
 | 
        
           |  |  | 674 |   | 
        
           |  |  | 675 |                     $form->prepare();
 | 
        
           |  |  | 676 |                     echo $this->form()->openTag($form);
 | 
        
           |  |  | 677 |   | 
        
           |  |  | 678 |                     ?>
 | 
        
           |  |  | 679 |   | 
        
           |  |  | 680 |                    	<div class="form-group">
 | 
        
           |  |  | 681 |       					<label>LABEL_FIRST_NAME</label>
 | 
        
           |  |  | 682 |       					<input type="text" readonly="readonly" name="first_name" id="first_name" class="form-control" >
 | 
        
           |  |  | 683 |       				</div>
 | 
        
           |  |  | 684 |       				<div class="form-group">
 | 
        
           |  |  | 685 |       					<label>LABEL_LAST_NAME</label>
 | 
        
           |  |  | 686 |       					<input type="text" readonly="readonly" name="last_name" id="last_name" class="form-control" >
 | 
        
           |  |  | 687 |       				</div>
 | 
        
           |  |  | 688 |       				<div class="form-group">
 | 
        
           |  |  | 689 |       					<label>LABEL_EMAIL</label>
 | 
        
           |  |  | 690 |       					<input type="text" readonly="readonly" name="email" id="email" class="form-control" >
 | 
        
           |  |  | 691 |       				</div>
 | 
        
           |  |  | 692 |   | 
        
           |  |  | 693 |                     <?php
 | 
        
           |  |  | 694 |                     $fields = [
 | 
        
           |  |  | 695 |                         [
 | 
        
           |  |  | 696 |                             'label' => 'LABEL_COMPANIES',
 | 
        
           |  |  | 697 |                             'name' => 'company_id',
 | 
        
           |  |  | 698 |                         ],
 | 
        
           |  |  | 699 |                         [
 | 
        
           |  |  | 700 |                             'label' => 'LABEL_FUNCTIONS',
 | 
        
           |  |  | 701 |                             'name' => 'function_id',
 | 
        
           |  |  | 702 |                         ],
 | 
        
           |  |  | 703 |                         [
 | 
        
           |  |  | 704 |                             'label' => 'LABEL_GROUPS',
 | 
        
           |  |  | 705 |                             'name' => 'group_id',
 | 
        
           |  |  | 706 |                         ],
 | 
        
           |  |  | 707 |                         [
 | 
        
           |  |  | 708 |                             'label' => 'LABEL_INSTITUTIONS',
 | 
        
           |  |  | 709 |                             'name' => 'institution_id',
 | 
        
           |  |  | 710 |                         ],
 | 
        
           |  |  | 711 |                         [
 | 
        
           |  |  | 712 |                             'label' => 'LABEL_PROGRAMS',
 | 
        
           |  |  | 713 |                             'name' => 'program_id',
 | 
        
           |  |  | 714 |                         ],
 | 
        
           |  |  | 715 |                         [
 | 
        
           |  |  | 716 |                             'label' => 'LABEL_PARTNERS',
 | 
        
           |  |  | 717 |                             'name' => 'partner_id',
 | 
        
           |  |  | 718 |                         ],
 | 
        
           |  |  | 719 |                         [
 | 
        
           |  |  | 720 |                             'label' => 'LABEL_SECTORS',
 | 
        
           |  |  | 721 |                             'name' => 'sector_id',
 | 
        
           |  |  | 722 |                         ],
 | 
        
           |  |  | 723 |                         [
 | 
        
           |  |  | 724 |                             'label' => 'LABEL_STUDENT_TYPES',
 | 
        
           |  |  | 725 |                             'name' => 'student_type_id',
 | 
        
           |  |  | 726 |                         ],
 | 
        
           |  |  | 727 |                     ];
 | 
        
           |  |  | 728 |   | 
        
           |  |  | 729 |                     $column = 0;
 | 
        
           |  |  | 730 |                     foreach($fields as $field) :
 | 
        
           |  |  | 731 |                         if($column == 0) {
 | 
        
           |  |  | 732 |                             echo '<div class="row">';
 | 
        
           |  |  | 733 |   | 
        
           |  |  | 734 |                         }
 | 
        
           |  |  | 735 |                         $column++;
 | 
        
           |  |  | 736 |   | 
        
           |  |  | 737 |                     ?>
 | 
        
           |  |  | 738 |   | 
        
           |  |  | 739 |   | 
        
           |  |  | 740 |                              <div class="col-md-6 col-sm-12">
 | 
        
           |  |  | 741 |     					<div class="form-group">
 | 
        
           |  |  | 742 |         					<?php
 | 
        
           |  |  | 743 |                             $element = $form->get( $field['name'] );
 | 
        
           |  |  | 744 |                             $element->setOptions(['label' => $field['label'] ]);
 | 
        
           |  |  | 745 |                             $element->setAttributes(['class' => 'form-control']);
 | 
        
           |  |  | 746 |   | 
        
           |  |  | 747 |                             echo $this->formLabel($element);
 | 
        
           |  |  | 748 |                             echo $this->formSelect($element);
 | 
        
           |  |  | 749 |                             ?>
 | 
        
           |  |  | 750 | 						</div>
 | 
        
           |  |  | 751 | 						</div>
 | 
        
           |  |  | 752 | 						<?php
 | 
        
           |  |  | 753 | 						if($column == 2) {
 | 
        
           |  |  | 754 | 						    $column = 0;
 | 
        
           |  |  | 755 | 						    echo '</div>';
 | 
        
           |  |  | 756 | 						}
 | 
        
           |  |  | 757 | 						?>
 | 
        
           |  |  | 758 | 					<?php endforeach; ?>
 | 
        
           |  |  | 759 | 						<?php if($column) {
 | 
        
           |  |  | 760 | 						    echo '</div>';
 | 
        
           |  |  | 761 | 						}
 | 
        
           |  |  | 762 | 						?>
 | 
        
           |  |  | 763 |   | 
        
           |  |  | 764 |   | 
        
           |  |  | 765 |         				<div class="form-group">
 | 
        
           |  |  | 766 |                     		<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
 | 
        
           |  |  | 767 |                     		<button type="button" class="btn btn-light btn-cancel">LABEL_CANCEL</button>
 | 
        
           |  |  | 768 |                    		</div>
 | 
        
           |  |  | 769 |      	      		<?php echo $this->form()->closeTag($form); ?>
 | 
        
           |  |  | 770 |       		</div>
 | 
        
           |  |  | 771 |   | 
        
           |  |  | 772 |             <!-- Modal footer -->
 | 
        
           |  |  | 773 |       		<div class="modal-footer">
 | 
        
           |  |  | 774 |         		<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
 | 
        
           |  |  | 775 |       		</div>
 | 
        
           |  |  | 776 |   | 
        
           |  |  | 777 |     	</div>
 | 
        
           |  |  | 778 | 	</div>
 | 
        
           |  |  | 779 | </div>
 | 
        
           |  |  | 780 |   | 
        
           |  |  | 781 | <!-- The Modal -->
 | 
        
           |  |  | 782 | <div class="modal" id="modalTimeline">
 | 
        
           |  |  | 783 | 	<div class="modal-dialog  modal-xl">
 | 
        
           |  |  | 784 |     	<div class="modal-content">
 | 
        
           |  |  | 785 |   | 
        
           |  |  | 786 |             <!-- Modal Header -->
 | 
        
           |  |  | 787 |       		<div class="modal-header">
 | 
        
           |  |  | 788 |         		<h4 class="modal-title">LABEL_TIMELINE</h4>
 | 
        
           |  |  | 789 |         		<button type="button" class="close" data-dismiss="modal">×</button>
 | 
        
           |  |  | 790 |       		</div>
 | 
        
           |  |  | 791 |   | 
        
           |  |  | 792 |             <!-- Modal body -->
 | 
        
           |  |  | 793 |       		<div class="modal-body">
 | 
        
           |  |  | 794 |        			<div class="row">
 | 
        
           |  |  | 795 |                   	<div class="col-md-12">
 | 
        
           |  |  | 796 |                    		<div class="timeline">
 | 
        
           |  |  | 797 |                    		</div>
 | 
        
           |  |  | 798 |                    	</div>
 | 
        
           |  |  | 799 |                	</div>
 | 
        
           |  |  | 800 |       		</div>
 | 
        
           |  |  | 801 |   | 
        
           |  |  | 802 |             <!-- Modal footer -->
 | 
        
           |  |  | 803 |       		<div class="modal-footer">
 | 
        
           |  |  | 804 |         		<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
 | 
        
           |  |  | 805 |       		</div>
 | 
        
           |  |  | 806 |   | 
        
           |  |  | 807 |     	</div>
 | 
        
           |  |  | 808 | 	</div>
 | 
        
           |  |  | 809 | </div>
 | 
        
           |  |  | 810 |   | 
        
           |  |  | 811 | <!-- The Modal -->
 | 
        
           |  |  | 812 | <div class="modal" id="modalChangePassword">
 | 
        
           |  |  | 813 | 	<div class="modal-dialog">
 | 
        
           |  |  | 814 |     	<div class="modal-content">
 | 
        
           |  |  | 815 |   | 
        
           |  |  | 816 |             <!-- Modal Header -->
 | 
        
           |  |  | 817 |       		<div class="modal-header">
 | 
        
           |  |  | 818 |         		<h4 class="modal-title">LABEL_USERS</h4>
 | 
        
           |  |  | 819 |         		<button type="button" class="close" data-dismiss="modal">×</button>
 | 
        
           |  |  | 820 |       		</div>
 | 
        
           |  |  | 821 |   | 
        
           |  |  | 822 |             <!-- Modal body -->
 | 
        
           |  |  | 823 |       		<div class="modal-body">
 | 
        
           |  |  | 824 |        			 <?php
 | 
        
           |  |  | 825 |                     $form = $this->formChangePassword;
 | 
        
           |  |  | 826 |             		$form->setAttributes([
 | 
        
           |  |  | 827 |                         'method'    => 'post',
 | 
        
           |  |  | 828 |                         'name'      => 'form-change-password',
 | 
        
           |  |  | 829 |                         'id'        => 'form-change-password'
 | 
        
           |  |  | 830 |                     ]);
 | 
        
           |  |  | 831 |   | 
        
           |  |  | 832 |                     $form->prepare();
 | 
        
           |  |  | 833 |                     echo $this->form()->openTag($form);
 | 
        
           |  |  | 834 |                     ?>
 | 
        
           |  |  | 835 |                         <div class="form-group">
 | 
        
           |  |  | 836 |         					<?php
 | 
        
           |  |  | 837 |                             $element = $form->get('first_name');
 | 
        
           |  |  | 838 |                             $element->setOptions(['label' => 'LABEL_FIRST_NAME']);
 | 
        
           |  |  | 839 |                             $element->setAttributes(['class' => 'form-control', 'readonly' => 'readonly']);
 | 
        
           |  |  | 840 |   | 
        
           |  |  | 841 |                             echo $this->formLabel($element);
 | 
        
           |  |  | 842 |                             echo $this->formText($element);
 | 
        
           |  |  | 843 |                             ?>
 | 
        
           |  |  | 844 | 						</div>
 | 
        
           |  |  | 845 | 						<div class="form-group">
 | 
        
           |  |  | 846 |         					<?php
 | 
        
           |  |  | 847 |                             $element = $form->get('last_name');
 | 
        
           |  |  | 848 |                             $element->setOptions(['label' => 'LABEL_LAST_NAME']);
 | 
        
           |  |  | 849 |                             $element->setAttributes(['class' => 'form-control', 'readonly' => 'readonly']);
 | 
        
           |  |  | 850 |   | 
        
           |  |  | 851 |                             echo $this->formLabel($element);
 | 
        
           |  |  | 852 |                             echo $this->formText($element);
 | 
        
           |  |  | 853 |                             ?>
 | 
        
           |  |  | 854 | 						</div>
 | 
        
           |  |  | 855 | 						<div class="form-group">
 | 
        
           |  |  | 856 |         					<?php
 | 
        
           |  |  | 857 |                             $element = $form->get('email');
 | 
        
           |  |  | 858 |                             $element->setOptions(['label' => 'LABEL_EMAIL']);
 | 
        
           |  |  | 859 |                             $element->setAttributes(['class' => 'form-control', 'readonly' => 'readonly']);
 | 
        
           |  |  | 860 |   | 
        
           |  |  | 861 |                             echo $this->formLabel($element);
 | 
        
           |  |  | 862 |                             echo $this->formText($element);
 | 
        
           |  |  | 863 |                             ?>
 | 
        
           |  |  | 864 | 						</div>
 | 
        
           |  |  | 865 |     					<div class="form-group">
 | 
        
           |  |  | 866 |         					<?php
 | 
        
           |  |  | 867 |                             $element = $form->get('password');
 | 
        
           |  |  | 868 |                             $element->setOptions(['label' => 'LABEL_PASSWORD']);
 | 
        
           |  |  | 869 |                             $element->setAttributes(['class' => 'form-control']);
 | 
        
           |  |  | 870 |   | 
        
           |  |  | 871 |                             echo $this->formLabel($element);
 | 
        
           |  |  | 872 |                             echo $this->formPassword($element);
 | 
        
           |  |  | 873 |                             ?>
 | 
        
           |  |  | 874 | 						</div>
 | 
        
           |  |  | 875 | 						<div class="form-group">
 | 
        
           |  |  | 876 |                     	<?php
 | 
        
           |  |  | 877 |                             $element = $form->get('confirmation');
 | 
        
           |  |  | 878 |                             $element->setOptions(['label' => 'LABEL_CONFIRMATION']);
 | 
        
           |  |  | 879 |                             $element->setAttributes(['class' => 'form-control']);
 | 
        
           |  |  | 880 |   | 
        
           |  |  | 881 |                             echo $this->formLabel($element);
 | 
        
           |  |  | 882 |                             echo $this->formPassword($element);
 | 
        
           |  |  | 883 |                         ?>
 | 
        
           |  |  | 884 | 						</div>
 | 
        
           |  |  | 885 |   | 
        
           |  |  | 886 |   | 
        
           |  |  | 887 |         				<div class="form-group">
 | 
        
           |  |  | 888 |                     		<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
 | 
        
           |  |  | 889 |                     		<button type="button" class="btn btn-light btn-cancel-modal">LABEL_CANCEL</button>
 | 
        
           |  |  | 890 |                    		</div>
 | 
        
           |  |  | 891 |      	      		<?php echo $this->form()->closeTag($form); ?>
 | 
        
           |  |  | 892 |       		</div>
 | 
        
           |  |  | 893 |   | 
        
           |  |  | 894 |             <!-- Modal footer -->
 | 
        
           |  |  | 895 |       		<div class="modal-footer">
 | 
        
           |  |  | 896 |         		<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
 | 
        
           |  |  | 897 |       		</div>
 | 
        
           |  |  | 898 |   | 
        
           |  |  | 899 |     	</div>
 | 
        
           |  |  | 900 | 	</div>
 | 
        
           |  |  | 901 | </div>
 | 
        
           |  |  | 902 |   | 
        
           |  |  | 903 |   |