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