| 14934 |
stevensc |
1 |
<?php
|
| 1 |
www |
2 |
$acl = $this->viewModel()->getRoot()->getVariable('acl');
|
|
|
3 |
$currentUser = $this->currentUserHelper();
|
|
|
4 |
|
|
|
5 |
$roleName = $currentUser->getUserTypeId();
|
|
|
6 |
|
|
|
7 |
|
|
|
8 |
$routeAdd = $this->url('microlearning/content/topics/add');
|
|
|
9 |
$routeDatatable = $this->url('microlearning/content/topics');
|
|
|
10 |
|
|
|
11 |
$allowAdd = $acl->isAllowed($roleName, 'microlearning/content/topics/add') ? 1 : 0;
|
|
|
12 |
$allowEdit = $acl->isAllowed($roleName, 'microlearning/content/topics/edit') ? 1 : 0;
|
|
|
13 |
$allowDelete = $acl->isAllowed($roleName, 'microlearning/content/topics/delete') ? 1 : 0;
|
|
|
14 |
|
|
|
15 |
|
| 16822 |
efrain |
16 |
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/nprogress/nprogress.css'));
|
|
|
17 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/nprogress/nprogress.js'));
|
| 1 |
www |
18 |
|
| 16822 |
efrain |
19 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/ckeditor/ckeditor.js'));
|
| 1 |
www |
20 |
|
|
|
21 |
|
| 16822 |
efrain |
22 |
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/bootstrap-fileinput/css/fileinput.min.css'));
|
|
|
23 |
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/bootstrap-fileinput/themes/explorer-fas/theme.css'));
|
| 1 |
www |
24 |
|
| 16843 |
efrain |
25 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap-fileinput/js/plugins/piexif.js'));
|
|
|
26 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap-fileinput/js/plugins/sortable.js'));
|
| 16822 |
efrain |
27 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap-fileinput/js/fileinput.js'));
|
|
|
28 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap-fileinput/js/locales/es.js'));
|
|
|
29 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap-fileinput/themes/fas/theme.js'));
|
|
|
30 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap-fileinput/themes/explorer-fas/theme.js'));
|
| 1 |
www |
31 |
|
|
|
32 |
|
|
|
33 |
|
| 16929 |
efrain |
34 |
|
|
|
35 |
|
|
|
36 |
|
| 16822 |
efrain |
37 |
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/datatables.net-bs5/dataTables.bootstrap5.css'));
|
|
|
38 |
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/datatables.net-bs5-responsive/responsive.bootstrap5.css'));
|
| 16905 |
efrain |
39 |
|
| 16822 |
efrain |
40 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net/jquery.dataTables.js'));
|
|
|
41 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net-bs5/dataTables.bootstrap5.js'));
|
|
|
42 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net-bs5-responsive/dataTables.responsive.min.js'));
|
|
|
43 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/datatables.net-bs5-responsive/responsive.bootstrap5.min.js'));
|
| 1 |
www |
44 |
|
|
|
45 |
|
| 16822 |
efrain |
46 |
$this->headLink()->appendStylesheet($this->basePath('assets/vendors/bootstrap4-toggle/css/bootstrap4-toggle.min.css'));
|
|
|
47 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap4-toggle/js/bootstrap4-toggle.min.js'));
|
| 1 |
www |
48 |
|
|
|
49 |
|
|
|
50 |
|
|
|
51 |
|
|
|
52 |
|
| 16822 |
efrain |
53 |
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-input-number/input-number-format.jquery.js'));
|
|
|
54 |
|
|
|
55 |
|
| 1 |
www |
56 |
$status_active = \LeadersLinked\Model\Degree::STATUS_ACTIVE;
|
|
|
57 |
|
| 4697 |
nelberth |
58 |
|
|
|
59 |
|
| 4737 |
nelberth |
60 |
|
| 1 |
www |
61 |
$this->inlineScript()->captureStart();
|
|
|
62 |
echo <<<JS
|
|
|
63 |
jQuery( document ).ready(function( $ ) {
|
|
|
64 |
|
|
|
65 |
$.validator.setDefaults({
|
|
|
66 |
debug: true,
|
|
|
67 |
highlight: function(element) {
|
|
|
68 |
$(element).addClass('is-invalid');
|
|
|
69 |
},
|
|
|
70 |
unhighlight: function(element) {
|
|
|
71 |
$(element).removeClass('is-invalid');
|
|
|
72 |
},
|
|
|
73 |
errorElement: 'span',
|
|
|
74 |
errorClass: 'error invalid-feedback',
|
|
|
75 |
errorPlacement: function(error, element) {
|
|
|
76 |
if(element.parent('.btn-file').length) {
|
|
|
77 |
error.insertAfter(element.parent().parent());
|
|
|
78 |
} else if(element.parent('.toggle').length) {
|
|
|
79 |
error.insertAfter(element.parent().parent());
|
|
|
80 |
} else {
|
|
|
81 |
error.insertAfter(element.parent());
|
|
|
82 |
}
|
|
|
83 |
}
|
|
|
84 |
});
|
|
|
85 |
|
|
|
86 |
|
|
|
87 |
|
|
|
88 |
|
|
|
89 |
|
|
|
90 |
|
|
|
91 |
var allowEdit = $allowEdit;
|
|
|
92 |
var allowDelete = $allowDelete;
|
|
|
93 |
|
|
|
94 |
var gridTable = $('#gridTable').dataTable( {
|
|
|
95 |
'processing': true,
|
|
|
96 |
'serverSide': true,
|
|
|
97 |
'searching': true,
|
|
|
98 |
'order': [[ 0, 'asc' ]],
|
|
|
99 |
'ordering': true,
|
|
|
100 |
'ordenable' : true,
|
|
|
101 |
'responsive': true,
|
|
|
102 |
'select' : false,
|
|
|
103 |
'paging': true,
|
|
|
104 |
'pagingType': 'simple_numbers',
|
|
|
105 |
'ajax': {
|
|
|
106 |
'url' : '$routeDatatable',
|
|
|
107 |
'type' : 'get',
|
|
|
108 |
'beforeSend': function (request) {
|
|
|
109 |
NProgress.start();
|
|
|
110 |
},
|
|
|
111 |
'dataFilter': function(response) {
|
|
|
112 |
var response = jQuery.parseJSON( response );
|
|
|
113 |
|
|
|
114 |
var json = {};
|
|
|
115 |
json.recordsTotal = 0;
|
|
|
116 |
json.recordsFiltered = 0;
|
|
|
117 |
json.data = [];
|
|
|
118 |
|
|
|
119 |
|
|
|
120 |
if(response.success) {
|
|
|
121 |
json.recordsTotal = response.data.total;
|
|
|
122 |
json.recordsFiltered = response.data.total;
|
|
|
123 |
json.data = response.data.items;
|
|
|
124 |
} else {
|
|
|
125 |
$.fn.showError(response.data)
|
|
|
126 |
}
|
|
|
127 |
|
|
|
128 |
return JSON.stringify( json );
|
|
|
129 |
}
|
|
|
130 |
},
|
|
|
131 |
'language' : {
|
|
|
132 |
'sProcessing': 'LABEL_DATATABLE_SPROCESSING',
|
|
|
133 |
'sLengthMenu': 'LABEL_DATATABLE_SLENGTHMENU',
|
|
|
134 |
'sZeroRecords': 'LABEL_DATATABLE_SZERORECORDS',
|
|
|
135 |
'sEmptyTable': 'LABEL_DATATABLE_SEMPTYTABLE',
|
|
|
136 |
'sInfo': 'LABEL_DATATABLE_SINFO',
|
|
|
137 |
'sInfoEmpty': 'LABEL_DATATABLE_SINFOEMPTY',
|
|
|
138 |
'sInfoFiltered': 'LABEL_DATATABLE_SINFOFILTERED',
|
|
|
139 |
'sInfoPostFix': '',
|
|
|
140 |
'sSearch': 'LABEL_DATATABLE_SSEARCH',
|
|
|
141 |
'sUrl': '',
|
|
|
142 |
'sInfoThousands': ',',
|
|
|
143 |
'sLoadingRecords': 'LABEL_DATATABLE_SLOADINGRECORDS',
|
|
|
144 |
'oPaginate': {
|
|
|
145 |
'sFirst': 'LABEL_DATATABLE_SFIRST',
|
|
|
146 |
'sLast': 'LABEL_DATATABLE_SLAST',
|
|
|
147 |
'sNext': 'LABEL_DATATABLE_SNEXT',
|
|
|
148 |
'sPrevious': 'LABEL_DATATABLE_SPREVIOUS'
|
|
|
149 |
},
|
|
|
150 |
'oAria': {
|
|
|
151 |
'sSortAscending': ': LABEL_DATATABLE_SSORTASCENDING',
|
|
|
152 |
'sSortDescending': ':LABEL_DATATABLE_SSORTDESCENDING'
|
|
|
153 |
},
|
|
|
154 |
},
|
|
|
155 |
'drawCallback': function( settings ) {
|
|
|
156 |
NProgress.done();
|
| 16822 |
efrain |
157 |
|
| 1 |
www |
158 |
},
|
|
|
159 |
'aoColumns': [
|
|
|
160 |
{ 'mDataProp': 'name' },
|
|
|
161 |
{ 'mDataProp': 'status' },
|
|
|
162 |
{ 'mDataProp': 'image' },
|
|
|
163 |
{ 'mDataProp': 'actions' },
|
|
|
164 |
],
|
|
|
165 |
'columnDefs': [
|
|
|
166 |
{
|
|
|
167 |
'targets': 0,
|
|
|
168 |
'className' : 'text-vertical-middle',
|
|
|
169 |
},
|
|
|
170 |
{
|
|
|
171 |
'targets': -2,
|
|
|
172 |
'orderable': false,
|
|
|
173 |
'render' : function ( data, type, row ) {
|
|
|
174 |
s = ' ';
|
|
|
175 |
|
|
|
176 |
if( data ) {
|
|
|
177 |
s = s + ' <img class="btn-view-image-app" data-href="' + data + '" data-toggle="tooltip" src="'+data+'" title="LABEL_VIEW" style="width: 40px; object-fit: cover; height: 40px;" /> '
|
|
|
178 |
} else {
|
|
|
179 |
s = s + ' LABEL_IMAGE: <br>';
|
|
|
180 |
}
|
|
|
181 |
|
|
|
182 |
|
|
|
183 |
return s;
|
|
|
184 |
}
|
|
|
185 |
},
|
|
|
186 |
|
|
|
187 |
|
|
|
188 |
{
|
|
|
189 |
'targets': -1,
|
|
|
190 |
'orderable': false,
|
|
|
191 |
'render' : function ( data, type, row ) {
|
|
|
192 |
s = '';
|
|
|
193 |
|
|
|
194 |
if(allowEdit && data['link_edit'] ) {
|
| 16906 |
efrain |
195 |
s = s + '<button class="btn btn-info btn-sm btn-edit" data-href="' + data['link_edit']+ '" data-toggle="tooltip" title="LABEL_EDIT"><i class="fa fa-pen"></i> LABEL_EDIT </button> ';
|
| 1 |
www |
196 |
}
|
|
|
197 |
if(allowDelete && data['link_delete'] ) {
|
|
|
198 |
s = s + '<button class="btn btn-danger btn-sm btn-delete" data-href="' + data['link_delete']+ '" data-toggle="tooltip" title="LABEL_DELETE"><i class="fa fa-trash"></i> LABEL_DELETE </button> ';
|
|
|
199 |
}
|
|
|
200 |
return s;
|
|
|
201 |
}
|
|
|
202 |
}
|
|
|
203 |
],
|
|
|
204 |
});
|
|
|
205 |
|
|
|
206 |
|
| 16905 |
efrain |
207 |
var validatorAdd = $('#form-add').validate({
|
| 1 |
www |
208 |
debug: true,
|
|
|
209 |
onclick: false,
|
|
|
210 |
onkeyup: false,
|
|
|
211 |
ignore: [],
|
|
|
212 |
rules: {
|
|
|
213 |
'name': {
|
|
|
214 |
required: true,
|
|
|
215 |
maxlength: 128,
|
|
|
216 |
},
|
|
|
217 |
'description': {
|
|
|
218 |
updateCkeditor:function() {
|
|
|
219 |
CKEDITOR.instances.description_add.updateElement();
|
|
|
220 |
},
|
|
|
221 |
required: true
|
|
|
222 |
},
|
|
|
223 |
'file': {
|
|
|
224 |
required: true,
|
| 16891 |
efrain |
225 |
extension: 'jpg|jpeg|png',
|
|
|
226 |
accept: 'image/jpg,image/jpeg,image/png'
|
| 1 |
www |
227 |
},
|
|
|
228 |
'order' : {
|
|
|
229 |
required: true,
|
|
|
230 |
digits: true,
|
|
|
231 |
min: 1,
|
|
|
232 |
max: 250
|
|
|
233 |
},
|
|
|
234 |
'status' : {
|
|
|
235 |
required: true,
|
|
|
236 |
},
|
|
|
237 |
},
|
|
|
238 |
submitHandler: function(form)
|
|
|
239 |
{
|
|
|
240 |
var formdata = false;
|
|
|
241 |
if (window.FormData){
|
|
|
242 |
formdata = new FormData(form); //form[0]);
|
|
|
243 |
}
|
| 5709 |
nelberth |
244 |
|
|
|
245 |
|
|
|
246 |
$('.info_noticia').prop('disabled', true);
|
| 5703 |
nelberth |
247 |
NProgress.start();
|
| 1 |
www |
248 |
$.ajax({
|
|
|
249 |
'dataType' : 'json',
|
|
|
250 |
'accept' : 'application/json',
|
|
|
251 |
'method' : 'post',
|
| 16905 |
efrain |
252 |
'url' : $('#form-add').attr('action'),
|
| 1 |
www |
253 |
'data' : formdata,
|
|
|
254 |
'processData': false,
|
|
|
255 |
'contentType': false,
|
|
|
256 |
}).done(function(response) {
|
| 5542 |
nelberth |
257 |
console.log(response)
|
|
|
258 |
if(response['success']) {
|
| 1 |
www |
259 |
$.fn.showSuccess(response['data']);
|
| 16891 |
efrain |
260 |
|
|
|
261 |
$('#row-add').hide();
|
|
|
262 |
$('#row-edit').hide();
|
|
|
263 |
$('#row-listing').show();
|
|
|
264 |
|
|
|
265 |
|
| 1 |
www |
266 |
gridTable.api().ajax.reload(null, false);
|
|
|
267 |
} else {
|
|
|
268 |
validatorAdd.resetForm();
|
|
|
269 |
if(jQuery.type(response['data']) == 'string') {
|
|
|
270 |
$.fn.showError(response['data']);
|
|
|
271 |
} else {
|
|
|
272 |
$.each(response['data'], function( fieldname, errors ) {
|
| 16905 |
efrain |
273 |
$.fn.showFormErrorValidator('#form-add #' + fieldname, errors);
|
| 1 |
www |
274 |
});
|
|
|
275 |
}
|
|
|
276 |
}
|
|
|
277 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
| 5709 |
nelberth |
278 |
|
| 16891 |
efrain |
279 |
|
| 1 |
www |
280 |
$.fn.showError(textStatus);
|
|
|
281 |
}).always(function() {
|
| 16891 |
efrain |
282 |
|
| 1 |
www |
283 |
NProgress.done();
|
|
|
284 |
});
|
|
|
285 |
return false;
|
|
|
286 |
},
|
|
|
287 |
invalidHandler: function(form, validator) {
|
|
|
288 |
|
|
|
289 |
}
|
|
|
290 |
});
|
|
|
291 |
|
| 16905 |
efrain |
292 |
var validatorEdit = $('#form-edit').validate({
|
| 1 |
www |
293 |
debug: true,
|
|
|
294 |
onclick: false,
|
|
|
295 |
onkeyup: false,
|
|
|
296 |
ignore: [],
|
|
|
297 |
rules: {
|
|
|
298 |
'name': {
|
|
|
299 |
required: true,
|
|
|
300 |
maxlength: 128,
|
|
|
301 |
},
|
|
|
302 |
'description': {
|
|
|
303 |
updateCkeditor:function() {
|
|
|
304 |
CKEDITOR.instances.description_edit.updateElement();
|
|
|
305 |
},
|
|
|
306 |
required: true
|
|
|
307 |
},
|
|
|
308 |
'file': {
|
| 16945 |
efrain |
309 |
required: false,
|
| 16891 |
efrain |
310 |
extension: 'jpg|jpeg|png',
|
|
|
311 |
accept: 'image/jpg,image/jpeg,image/png'
|
| 1 |
www |
312 |
},
|
|
|
313 |
'order' : {
|
|
|
314 |
required: true,
|
|
|
315 |
digits: true,
|
|
|
316 |
min: 1,
|
|
|
317 |
max: 250
|
|
|
318 |
},
|
|
|
319 |
'status' : {
|
|
|
320 |
required: true,
|
|
|
321 |
},
|
|
|
322 |
|
|
|
323 |
},
|
|
|
324 |
submitHandler: function(form)
|
|
|
325 |
{
|
|
|
326 |
var formdata = false;
|
|
|
327 |
if (window.FormData){
|
|
|
328 |
formdata = new FormData(form); //form[0]);
|
|
|
329 |
}
|
|
|
330 |
|
| 16891 |
efrain |
331 |
|
| 5982 |
nelberth |
332 |
NProgress.start();
|
| 1 |
www |
333 |
$.ajax({
|
|
|
334 |
'dataType' : 'json',
|
|
|
335 |
'accept' : 'application/json',
|
|
|
336 |
'method' : 'post',
|
| 16905 |
efrain |
337 |
'url' : $('#form-edit').attr('action'),
|
| 1 |
www |
338 |
'data' : formdata,
|
|
|
339 |
'processData': false,
|
|
|
340 |
'contentType': false,
|
|
|
341 |
}).done(function(response) {
|
|
|
342 |
if(response['success']) {
|
|
|
343 |
$.fn.showSuccess(response['data']);
|
|
|
344 |
|
| 16891 |
efrain |
345 |
|
| 1 |
www |
346 |
gridTable.api().ajax.reload(null, false);
|
| 16891 |
efrain |
347 |
|
|
|
348 |
|
|
|
349 |
$('#row-add').hide();
|
|
|
350 |
$('#row-edit').hide();
|
|
|
351 |
$('#row-listing').show();
|
|
|
352 |
|
| 1 |
www |
353 |
} else {
|
| 16891 |
efrain |
354 |
validatorEdit.resetForm();
|
| 1 |
www |
355 |
if(jQuery.type(response['data']) == 'string') {
|
|
|
356 |
$.fn.showError(response['data']);
|
|
|
357 |
} else {
|
|
|
358 |
$.each(response['data'], function( fieldname, errors ) {
|
| 16905 |
efrain |
359 |
$.fn.showFormErrorValidator('#form-edit #' + fieldname, errors);
|
| 1 |
www |
360 |
});
|
|
|
361 |
}
|
|
|
362 |
}
|
|
|
363 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
364 |
$.fn.showError(textStatus);
|
|
|
365 |
}).always(function() {
|
| 7060 |
nelberth |
366 |
|
| 16891 |
efrain |
367 |
|
| 1 |
www |
368 |
NProgress.done();
|
|
|
369 |
});
|
|
|
370 |
return false;
|
|
|
371 |
},
|
|
|
372 |
invalidHandler: function(form, validator) {
|
|
|
373 |
|
|
|
374 |
}
|
|
|
375 |
});
|
|
|
376 |
|
| 16822 |
efrain |
377 |
$('body').on('click', 'button.btn-delete', function(e) {
|
|
|
378 |
e.preventDefault();
|
|
|
379 |
var action = $(this).data('href');
|
| 1 |
www |
380 |
|
| 16822 |
efrain |
381 |
|
|
|
382 |
swal.fire({
|
|
|
383 |
title: 'LABEL_ARE_YOU_SURE',
|
|
|
384 |
icon: 'question',
|
|
|
385 |
cancelButtonText: 'LABEL_NO',
|
|
|
386 |
showCancelButton: true,
|
|
|
387 |
confirmButtonText: 'LABEL_YES'
|
|
|
388 |
}).then((result) => {
|
|
|
389 |
if (result.isConfirmed) {
|
|
|
390 |
|
|
|
391 |
NProgress.start();
|
|
|
392 |
$.ajax({
|
|
|
393 |
'dataType' : 'json',
|
|
|
394 |
'accept' : 'application/json',
|
|
|
395 |
'method' : 'post',
|
|
|
396 |
'url' : action,
|
|
|
397 |
}).done(function(response) {
|
|
|
398 |
if(response['success']) {
|
|
|
399 |
$.fn.showSuccess(response['data']);
|
|
|
400 |
gridTable.api().ajax.reload(null, false);
|
|
|
401 |
} else {
|
|
|
402 |
$.fn.showError(response['data']);
|
|
|
403 |
}
|
|
|
404 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
405 |
$.fn.showError(textStatus);
|
|
|
406 |
}).always(function() {
|
|
|
407 |
NProgress.done();
|
|
|
408 |
});
|
|
|
409 |
}
|
|
|
410 |
});
|
|
|
411 |
});
|
|
|
412 |
|
| 1 |
www |
413 |
|
|
|
414 |
$('body').on('click', '.btn-view-image-app', function(e) {
|
|
|
415 |
e.preventDefault();
|
|
|
416 |
|
|
|
417 |
$('#image-app').attr('src', $(this).data('href'));
|
| 16891 |
efrain |
418 |
$('#modalPreviewImage').modal('show');
|
| 1 |
www |
419 |
return false;
|
|
|
420 |
});
|
|
|
421 |
|
| 16905 |
efrain |
422 |
$('#form-add #order').inputNumberFormat({decimal: 0});
|
| 5741 |
nelberth |
423 |
|
| 1 |
www |
424 |
|
|
|
425 |
|
|
|
426 |
$('body').on('click', 'button.btn-add', function(e) {
|
|
|
427 |
e.preventDefault();
|
| 17093 |
stevensc |
428 |
NProgress.start();
|
| 1 |
www |
429 |
|
| 17093 |
stevensc |
430 |
$.ajax({
|
|
|
431 |
'dataType': 'json',
|
|
|
432 |
'method': 'get',
|
|
|
433 |
'url': '$routeAdd',
|
|
|
434 |
}).done(function(response) {
|
|
|
435 |
if (response['success']) {
|
|
|
436 |
|
| 17113 |
stevensc |
437 |
$('#table-capsules tbody').empty();
|
| 17093 |
stevensc |
438 |
|
| 17107 |
stevensc |
439 |
$('#capsule_uuid').children().not(':first').remove();
|
| 17093 |
stevensc |
440 |
$.each(response['data']['capsules'], function(index, element) {
|
| 17107 |
stevensc |
441 |
$('#capsule_uuid').append($('<option>', {
|
| 17115 |
stevensc |
442 |
value: element.id,
|
| 17093 |
stevensc |
443 |
text: element.name
|
|
|
444 |
}));
|
|
|
445 |
});
|
| 1 |
www |
446 |
|
| 17093 |
stevensc |
447 |
$('#form-add #name').val('');
|
|
|
448 |
$('#form-add #order').val('1');
|
|
|
449 |
$('#form-add #name').val('');
|
|
|
450 |
|
|
|
451 |
$('#form-add #status').val('');
|
|
|
452 |
$('#form-add #file').fileinput('reset');
|
|
|
453 |
$('#form-add #file').val('');
|
|
|
454 |
|
| 1 |
www |
455 |
|
| 17093 |
stevensc |
456 |
|
|
|
457 |
CKEDITOR.instances.description_add.setData('');
|
|
|
458 |
validatorAdd.resetForm();
|
|
|
459 |
|
|
|
460 |
$('#row-edit').hide();
|
|
|
461 |
$('#row-listing').hide();
|
|
|
462 |
$('#row-add').show();
|
|
|
463 |
} else {
|
|
|
464 |
$.fn.showError(response['data']);
|
|
|
465 |
}
|
|
|
466 |
}).fail(function(jqXHR, textStatus, errorThrown) {
|
|
|
467 |
$.fn.showError(textStatus);
|
|
|
468 |
}).always(function() {
|
|
|
469 |
NProgress.done();
|
|
|
470 |
});
|
| 16891 |
efrain |
471 |
|
| 17093 |
stevensc |
472 |
|
|
|
473 |
|
|
|
474 |
|
| 5646 |
nelberth |
475 |
return false;
|
|
|
476 |
});
|
|
|
477 |
|
| 16891 |
efrain |
478 |
|
| 1 |
www |
479 |
|
| 16905 |
efrain |
480 |
$('#form-edit #order').inputNumberFormat({decimal: 0});
|
| 1 |
www |
481 |
|
| 16905 |
efrain |
482 |
$('#form-add #file').fileinput({
|
| 16891 |
efrain |
483 |
theme: 'fa',
|
|
|
484 |
language: 'es',
|
|
|
485 |
showUpload: false,
|
|
|
486 |
dropZoneEnabled: false,
|
|
|
487 |
maxFileCount: 1,
|
| 16928 |
efrain |
488 |
msgPlaceholder: 'LABEL_RECOMMENDED_SIZE $image_size',
|
| 16891 |
efrain |
489 |
allowedFileExtensions: ['jpeg', 'jpg', 'png'],
|
|
|
490 |
});
|
|
|
491 |
|
| 16905 |
efrain |
492 |
$('#form-edit #file').fileinput({
|
| 16891 |
efrain |
493 |
theme: 'fa',
|
|
|
494 |
language: 'es',
|
|
|
495 |
showUpload: false,
|
|
|
496 |
dropZoneEnabled: false,
|
|
|
497 |
maxFileCount: 1,
|
| 16928 |
efrain |
498 |
msgPlaceholder: 'LABEL_RECOMMENDED_SIZE $image_size',
|
| 16891 |
efrain |
499 |
allowedFileExtensions: ['jpeg', 'jpg', 'png'],
|
|
|
500 |
});
|
| 8591 |
nelberth |
501 |
|
| 1 |
www |
502 |
$('body').on('click', 'button.btn-edit', function(e) {
|
|
|
503 |
e.preventDefault();
|
| 6015 |
nelberth |
504 |
|
| 1 |
www |
505 |
var url = $(this).data('href');
|
| 5900 |
nelberth |
506 |
NProgress.start();
|
| 1 |
www |
507 |
$.ajax({
|
|
|
508 |
'dataType' : 'json',
|
|
|
509 |
'accept' : 'application/json',
|
|
|
510 |
'method' : 'get',
|
|
|
511 |
'url' : url,
|
|
|
512 |
}).done(function(response) {
|
|
|
513 |
if(response['success']) {
|
| 5913 |
nelberth |
514 |
console.log(response['data'])
|
| 16905 |
efrain |
515 |
$('#form-edit')[0].reset();
|
| 1 |
www |
516 |
|
| 16905 |
efrain |
517 |
$('#form-edit').attr('action',url);
|
|
|
518 |
$('#form-edit #name').val(response['data']['name']);
|
|
|
519 |
$('#form-edit #order').val(response['data']['order']);
|
| 17113 |
stevensc |
520 |
$('#form-edit #capsule_uuid').children().not(':first').remove();
|
| 1 |
www |
521 |
|
| 17113 |
stevensc |
522 |
$.each(response['data']['capsules'], function(index, element) {
|
|
|
523 |
$('#form-edit #capsule_uuid').append($('<option>', {
|
| 17115 |
stevensc |
524 |
value: element.id,
|
| 17113 |
stevensc |
525 |
text: element.name
|
|
|
526 |
}));
|
|
|
527 |
|
|
|
528 |
if(element.checked ) {
|
|
|
529 |
let data = {
|
| 17115 |
stevensc |
530 |
id : element.id,
|
| 17113 |
stevensc |
531 |
name : element.name,
|
|
|
532 |
};
|
|
|
533 |
|
|
|
534 |
$('#table-capsules tbody').append(
|
|
|
535 |
$('#trCapsuleTemplate').render( data )
|
|
|
536 |
);
|
|
|
537 |
}
|
|
|
538 |
});
|
|
|
539 |
|
| 16905 |
efrain |
540 |
$('#form-edit #status').val(response['data']['status']);
|
|
|
541 |
$('#form-edit #file').fileinput('reset');
|
|
|
542 |
$('#form-edit #file').val('');
|
| 1 |
www |
543 |
|
|
|
544 |
CKEDITOR.instances.description_edit.setData(response['data']['description']);
|
|
|
545 |
validatorEdit.resetForm();
|
| 16891 |
efrain |
546 |
|
|
|
547 |
$('#row-add').hide();
|
|
|
548 |
$('#row-listing').hide();
|
|
|
549 |
$('#row-edit').show();
|
|
|
550 |
|
| 1 |
www |
551 |
} else {
|
|
|
552 |
validatorEdit.resetForm();
|
|
|
553 |
if(jQuery.type(response['data']) == 'string') {
|
|
|
554 |
$.fn.showError(response['data']);
|
|
|
555 |
} else {
|
|
|
556 |
$.each(response['data'], function( fieldname, errors ) {
|
| 16905 |
efrain |
557 |
$.fn.showFormErrorValidator('#form-edit #' + fieldname, errors);
|
| 1 |
www |
558 |
});
|
|
|
559 |
}
|
|
|
560 |
}
|
|
|
561 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
562 |
$.fn.showError(textStatus);
|
|
|
563 |
}).always(function() {
|
|
|
564 |
NProgress.done();
|
|
|
565 |
});
|
|
|
566 |
});
|
|
|
567 |
|
|
|
568 |
$('body').on('click', 'button.btn-cancel', function(e) {
|
|
|
569 |
e.preventDefault();
|
| 16891 |
efrain |
570 |
$('#row-add').hide();
|
|
|
571 |
$('#row-edit').hide();
|
|
|
572 |
$('#row-listing').show();
|
|
|
573 |
|
| 1 |
www |
574 |
});
|
|
|
575 |
|
|
|
576 |
$('body').on('click', 'button.btn-refresh', function(e) {
|
|
|
577 |
e.preventDefault();
|
|
|
578 |
gridTable.api().ajax.reload(null, false);
|
|
|
579 |
});
|
| 17113 |
stevensc |
580 |
|
|
|
581 |
$('#btn-select-behavior').click(function(e) {
|
|
|
582 |
e.preventDefault();
|
|
|
583 |
|
|
|
584 |
var id = $('#capsule_uuid option:selected').val();
|
|
|
585 |
|
|
|
586 |
if(!id) {
|
|
|
587 |
return false;
|
|
|
588 |
}
|
|
|
589 |
|
|
|
590 |
var name = $('#capsule_uuid option:selected').text();
|
|
|
591 |
var key = '#tr_behavior_id_' + id ;
|
|
|
592 |
var element = $(key)
|
|
|
593 |
|
|
|
594 |
if(element.length > 0) {
|
|
|
595 |
$.fn.showError( 'ERROR_BEHAVIOR_WAS_PREVIOUSLY_ADDED');
|
|
|
596 |
return false;
|
|
|
597 |
}
|
|
|
598 |
|
|
|
599 |
|
|
|
600 |
if(name.length > 50) {
|
|
|
601 |
name = name.substr(0, 50) + '...';
|
|
|
602 |
}
|
|
|
603 |
|
|
|
604 |
let data = {
|
|
|
605 |
uuid : uuid,
|
|
|
606 |
name : name,
|
|
|
607 |
};
|
|
|
608 |
|
|
|
609 |
$('#table-capsules tbody').append(
|
|
|
610 |
$('#trCapsuleTemplate').render( data )
|
|
|
611 |
);
|
|
|
612 |
|
|
|
613 |
return false;
|
|
|
614 |
});
|
| 17119 |
stevensc |
615 |
|
| 17120 |
stevensc |
616 |
/* $('#capsule_uuid').select2({
|
| 17119 |
stevensc |
617 |
theme: 'bootstrap-5',
|
|
|
618 |
width: '100%',
|
| 17120 |
stevensc |
619 |
}); */
|
| 17119 |
stevensc |
620 |
|
|
|
621 |
console.log($('#capsule_uuid'));
|
| 1 |
www |
622 |
|
| 8290 |
stevensc |
623 |
CKEDITOR.replace('description_add', {
|
|
|
624 |
toolbar: [
|
|
|
625 |
{ name: 'editing', items: ['Scayt'] },
|
|
|
626 |
{ name: 'links', items: ['Link', 'Unlink'] },
|
|
|
627 |
{ name: 'paragraph', items: ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote'] },
|
|
|
628 |
{ name: 'basicstyles', items: ['Bold', 'Italic', 'Strike', 'RemoveFormat'] },
|
|
|
629 |
'/',
|
|
|
630 |
{ name: 'insert', items: ['Image', 'Table', 'HorizontalRule', 'SpecialChar'] },
|
|
|
631 |
{ name: 'styles', items: ['Styles', 'Format'] },
|
|
|
632 |
{ name: 'tools', items: ['Maximize'] }
|
|
|
633 |
],
|
|
|
634 |
removePlugins: 'elementspath,Anchor',
|
|
|
635 |
heigth: 100
|
|
|
636 |
});
|
| 17113 |
stevensc |
637 |
|
| 8290 |
stevensc |
638 |
CKEDITOR.replace('description_edit', {
|
|
|
639 |
toolbar: [
|
|
|
640 |
{ name: 'editing', items: ['Scayt'] },
|
|
|
641 |
{ name: 'links', items: ['Link', 'Unlink'] },
|
|
|
642 |
{ name: 'paragraph', items: ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote'] },
|
|
|
643 |
{ name: 'basicstyles', items: ['Bold', 'Italic', 'Strike', 'RemoveFormat'] },
|
|
|
644 |
'/',
|
|
|
645 |
{ name: 'insert', items: ['Image', 'Table', 'HorizontalRule', 'SpecialChar'] },
|
|
|
646 |
{ name: 'styles', items: ['Styles', 'Format'] },
|
|
|
647 |
{ name: 'tools', items: ['Maximize'] }
|
|
|
648 |
],
|
|
|
649 |
removePlugins: 'elementspath,Anchor',
|
|
|
650 |
heigth: 100
|
|
|
651 |
});
|
| 1 |
www |
652 |
});
|
|
|
653 |
JS;
|
|
|
654 |
$this->inlineScript()->captureEnd();
|
|
|
655 |
?>
|
|
|
656 |
|
| 16891 |
efrain |
657 |
<div class="container">
|
|
|
658 |
<div class="card" id="row-listing">
|
|
|
659 |
<div class="card-header">
|
|
|
660 |
<h6 class="card-title">LABEL_TOPICS</h6>
|
|
|
661 |
</div>
|
|
|
662 |
<div class="card-body">
|
|
|
663 |
<div class="row">
|
|
|
664 |
<div class="col-12 mt-3">
|
|
|
665 |
|
|
|
666 |
<table id="gridTable" class="table table-bordered">
|
| 14934 |
stevensc |
667 |
<thead>
|
|
|
668 |
<tr>
|
|
|
669 |
<th>LABEL_NAME</th>
|
|
|
670 |
<th>LABEL_STATUS</th>
|
|
|
671 |
<th>LABEL_DETAILS</th>
|
|
|
672 |
<th>LABEL_ACTIONS</th>
|
|
|
673 |
</tr>
|
|
|
674 |
</thead>
|
|
|
675 |
<tbody>
|
|
|
676 |
</tbody>
|
|
|
677 |
</table>
|
| 16891 |
efrain |
678 |
|
|
|
679 |
</div>
|
|
|
680 |
</div>
|
|
|
681 |
</div>
|
|
|
682 |
<div class="card-footer text-right">
|
| 16992 |
efrain |
683 |
<button type="button" class="btn btn-info btn-refresh"><i class="fa fa-sync"></i> LABEL_REFRESH </button>
|
| 16891 |
efrain |
684 |
<?php if ($allowAdd) : ?>
|
|
|
685 |
<button type="button" class="btn btn-primary btn-add"><i class="fa fa-plus"></i> LABEL_ADD </button>
|
|
|
686 |
<?php endif; ?>
|
|
|
687 |
</div>
|
| 14934 |
stevensc |
688 |
</div>
|
| 16891 |
efrain |
689 |
|
|
|
690 |
<div class="card" id="row-add" style="display:none">
|
|
|
691 |
<div class="card-header">
|
|
|
692 |
<h6 class="card-title">LABEL_ADD_TOPIC</h6>
|
|
|
693 |
</div>
|
|
|
694 |
<?php
|
| 14934 |
stevensc |
695 |
$form = $this->formAdd;
|
|
|
696 |
$form->setAttributes([
|
|
|
697 |
'method' => 'post',
|
|
|
698 |
'action' => $routeAdd,
|
| 16905 |
efrain |
699 |
'name' => 'form-add',
|
|
|
700 |
'id' => 'form-add',
|
| 14934 |
stevensc |
701 |
]);
|
| 5678 |
nelberth |
702 |
|
| 14934 |
stevensc |
703 |
$form->prepare();
|
|
|
704 |
echo $this->form()->openTag($form);
|
|
|
705 |
?>
|
| 16891 |
efrain |
706 |
<div class="card-body">
|
|
|
707 |
<div class="row">
|
|
|
708 |
<div class="col-12 mt-3">
|
|
|
709 |
<?php
|
|
|
710 |
$element = $form->get('name');
|
|
|
711 |
|
|
|
712 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
713 |
$element->setOptions(['label' => 'LABEL_NAME']);
|
|
|
714 |
echo $this->formLabel($element);
|
|
|
715 |
echo $this->formText($element);
|
|
|
716 |
?>
|
|
|
717 |
</div>
|
|
|
718 |
</div>
|
|
|
719 |
|
|
|
720 |
|
|
|
721 |
<div class="row">
|
|
|
722 |
<div class="col-12 mt-3">
|
|
|
723 |
<?php
|
|
|
724 |
$element = $form->get('description');
|
|
|
725 |
$element->setAttributes(['id' => 'description_add', 'class' => 'form-control', 'rows' => '2', 'class' => 'form-control']);
|
|
|
726 |
$element->setOptions(['label' => 'LABEL_DESCRIPTION']);
|
|
|
727 |
echo $this->formLabel($element);
|
|
|
728 |
echo $this->formTextArea($element);
|
|
|
729 |
?>
|
|
|
730 |
</div>
|
|
|
731 |
</div>
|
|
|
732 |
|
|
|
733 |
<div class="row">
|
|
|
734 |
<div class="col-12 mt-3">
|
|
|
735 |
<?php
|
|
|
736 |
$element = $form->get('order');
|
|
|
737 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
738 |
$element->setOptions(['label' => 'LABEL_ORDER']);
|
|
|
739 |
echo $this->formLabel($element);
|
|
|
740 |
echo $this->formText($element);
|
|
|
741 |
?>
|
|
|
742 |
</div>
|
|
|
743 |
</div>
|
|
|
744 |
|
|
|
745 |
|
|
|
746 |
|
|
|
747 |
<div class="row">
|
|
|
748 |
<div class="col-12 mt-3">
|
|
|
749 |
<?php
|
|
|
750 |
$element = $form->get('status');
|
|
|
751 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
752 |
$element->setOptions(['label' => 'LABEL_STATUS']);
|
|
|
753 |
echo $this->formLabel($element);
|
|
|
754 |
echo $this->formSelect($element);
|
|
|
755 |
|
|
|
756 |
?>
|
|
|
757 |
</div>
|
|
|
758 |
</div>
|
|
|
759 |
|
|
|
760 |
|
|
|
761 |
<div class="row">
|
|
|
762 |
<div class="col-12 mt-3">
|
|
|
763 |
<?php
|
|
|
764 |
$element = $form->get('file');
|
|
|
765 |
$element->setOptions(['label' => 'LABEL_IMAGE']);
|
|
|
766 |
$element->setAttributes(['class' => 'form-control']);
|
| 16905 |
efrain |
767 |
$element->setAttributes(['accept' => 'image/jpg,image/jpeg,image/png']);
|
| 16891 |
efrain |
768 |
echo $this->formLabel($element);
|
|
|
769 |
echo $this->formFile($element);
|
|
|
770 |
?>
|
|
|
771 |
</div>
|
|
|
772 |
</div>
|
| 17093 |
stevensc |
773 |
|
| 17110 |
stevensc |
774 |
<div class="row">
|
| 17113 |
stevensc |
775 |
<div class="col-8 mt-3">
|
| 17115 |
stevensc |
776 |
<select name="capsule_uuid" id="capsule_uuid">
|
| 17113 |
stevensc |
777 |
<option value="">LABEL_SELECT</option>
|
|
|
778 |
</select>
|
|
|
779 |
</div>
|
|
|
780 |
<div class="col-4 mt-3">
|
| 17114 |
stevensc |
781 |
<button type="button" class="btn btn-primary" id="btn-select-capsule" data-toggle="tooltip" title="LABEL_ADD LABEL_CAPSULE">LABEL_ADD LABEL_CAPSULE</button>
|
| 17113 |
stevensc |
782 |
</div>
|
|
|
783 |
</div>
|
|
|
784 |
|
| 16891 |
efrain |
785 |
</div>
|
|
|
786 |
<div class="card-footer text-right">
|
|
|
787 |
<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
|
|
|
788 |
<button type="button" class="btn btn-light btn-cancel">LABEL_CANCEL</button>
|
|
|
789 |
</div>
|
|
|
790 |
<?php echo $this->form()->closeTag($form); ?>
|
| 14934 |
stevensc |
791 |
</div>
|
| 16891 |
efrain |
792 |
|
|
|
793 |
|
|
|
794 |
<div class="card" id="row-edit" style="display:none">
|
|
|
795 |
|
|
|
796 |
<div class="card-header">
|
|
|
797 |
<h6 class="card-title">LABEL_EDIT_TOPIC</h6>
|
|
|
798 |
</div>
|
|
|
799 |
<?php
|
| 14934 |
stevensc |
800 |
$form = $this->formEdit;
|
|
|
801 |
$form->setAttributes([
|
|
|
802 |
'method' => 'post',
|
| 16905 |
efrain |
803 |
'name' => 'form-edit',
|
|
|
804 |
'id' => 'form-edit'
|
| 14934 |
stevensc |
805 |
]);
|
| 5895 |
nelberth |
806 |
|
| 14934 |
stevensc |
807 |
$form->prepare();
|
|
|
808 |
echo $this->form()->openTag($form);
|
|
|
809 |
?>
|
| 16891 |
efrain |
810 |
|
|
|
811 |
<div class="card-body">
|
| 1 |
www |
812 |
|
| 16891 |
efrain |
813 |
<div class="row">
|
|
|
814 |
<div class="col-12 mt-3">
|
| 14934 |
stevensc |
815 |
<?php
|
|
|
816 |
$element = $form->get('description');
|
|
|
817 |
$element->setAttributes(['id' => 'description_edit', 'rows' => '2', 'class' => 'form-control', 'class' => 'form-control']);
|
|
|
818 |
$element->setOptions(['label' => 'LABEL_DESCRIPTION']);
|
|
|
819 |
echo $this->formLabel($element);
|
|
|
820 |
echo $this->formTextArea($element);
|
|
|
821 |
?>
|
| 16891 |
efrain |
822 |
</div>
|
| 14934 |
stevensc |
823 |
</div>
|
| 16891 |
efrain |
824 |
|
|
|
825 |
<div class="row">
|
|
|
826 |
<div class="col-12 mt-3">
|
| 14934 |
stevensc |
827 |
<?php
|
|
|
828 |
$element = $form->get('order');
|
|
|
829 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
830 |
$element->setOptions(['label' => 'LABEL_ORDER']);
|
|
|
831 |
echo $this->formLabel($element);
|
|
|
832 |
echo $this->formText($element);
|
|
|
833 |
?>
|
| 16891 |
efrain |
834 |
</div>
|
| 14934 |
stevensc |
835 |
</div>
|
| 1 |
www |
836 |
|
| 14934 |
stevensc |
837 |
|
| 16891 |
efrain |
838 |
|
|
|
839 |
<div class="row">
|
|
|
840 |
<div class="col-12 mt-3">
|
| 14934 |
stevensc |
841 |
<?php
|
|
|
842 |
$element = $form->get('status');
|
|
|
843 |
$element->setAttributes(['class' => 'form-control']);
|
|
|
844 |
$element->setOptions(['label' => 'LABEL_STATUS']);
|
|
|
845 |
echo $this->formLabel($element);
|
|
|
846 |
echo $this->formSelect($element);
|
|
|
847 |
?>
|
| 16891 |
efrain |
848 |
</div>
|
| 14934 |
stevensc |
849 |
</div>
|
|
|
850 |
|
| 16891 |
efrain |
851 |
<div class="row">
|
|
|
852 |
<div class="col-12 mt-3">
|
|
|
853 |
<?php
|
|
|
854 |
$element = $form->get('file');
|
|
|
855 |
$element->setOptions(['label' => 'LABEL_IMAGE']);
|
|
|
856 |
$element->setAttributes(['class' => 'form-control']);
|
| 16905 |
efrain |
857 |
$element->setAttributes(['accept' => 'image/jpg,image/jpeg,image/png']);
|
| 16891 |
efrain |
858 |
echo $this->formLabel($element);
|
|
|
859 |
echo $this->formFile($element);
|
|
|
860 |
?>
|
|
|
861 |
</div>
|
|
|
862 |
</div>
|
|
|
863 |
|
|
|
864 |
|
|
|
865 |
</div>
|
|
|
866 |
|
|
|
867 |
<div class="card-footer text-right">
|
|
|
868 |
<button type="submit" class="btn btn-primary">LABEL_SAVE</button>
|
|
|
869 |
<button type="button" class="btn btn-light btn-cancel">LABEL_CANCEL</button>
|
|
|
870 |
</div>
|
|
|
871 |
<?php echo $this->form()->closeTag($form); ?>
|
| 14934 |
stevensc |
872 |
</div>
|
| 16891 |
efrain |
873 |
</div>
|
| 14934 |
stevensc |
874 |
|
|
|
875 |
|
| 1 |
www |
876 |
|
|
|
877 |
<!-- The Modal -->
|
| 16891 |
efrain |
878 |
<div class="modal" id="modalPreviewImage">
|
| 1 |
www |
879 |
<div class="modal-dialog ">
|
| 14934 |
stevensc |
880 |
<div class="modal-content">
|
| 1 |
www |
881 |
|
| 14934 |
stevensc |
882 |
<!-- Modal Header -->
|
|
|
883 |
<div class="modal-header">
|
| 16845 |
efrain |
884 |
<h6 class="modal-title">LABEL_IMAGE</h6>
|
| 16822 |
efrain |
885 |
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="btn-close"></button>
|
| 14934 |
stevensc |
886 |
</div>
|
| 1 |
www |
887 |
|
| 14934 |
stevensc |
888 |
<!-- Modal body -->
|
|
|
889 |
<div class="modal-body text-center">
|
| 1 |
www |
890 |
<img src="" class="img img-responsive" style="width: 300px; height: auto" id="image-app" />
|
| 14934 |
stevensc |
891 |
</div>
|
|
|
892 |
|
|
|
893 |
<!-- Modal footer -->
|
| 16891 |
efrain |
894 |
<div class="modal-footer text-right">
|
| 16822 |
efrain |
895 |
<button type="button" class="btn btn-light" data-bs-dismiss="modal">LABEL_CLOSE</button>
|
| 14934 |
stevensc |
896 |
</div>
|
|
|
897 |
</div>
|
| 1 |
www |
898 |
</div>
|
| 17113 |
stevensc |
899 |
</div>
|
|
|
900 |
|
|
|
901 |
<script id="trCapsuleTemplate" type="text/x-jsrender">
|
| 17115 |
stevensc |
902 |
<tr id="tr_capsule_id_{{:id}}">
|
| 17113 |
stevensc |
903 |
|
|
|
904 |
<td class="text-left">
|
| 17115 |
stevensc |
905 |
<input type="hidden" class="capsule_uuid" name="capsule_uuid[]" value="{{:id}}" />
|
| 17113 |
stevensc |
906 |
{{:name}}
|
|
|
907 |
</td>
|
|
|
908 |
<td>
|
| 17115 |
stevensc |
909 |
<button class="btn btn-default btn-remove-capsule" data-id="{{:id}}" data-toggle="tooltip" data-original-title="LABEL_DELETE"><i class="fa fa-ban" aria-hidden="true"></i> LABEL_DELETE</button>
|
| 17113 |
stevensc |
910 |
</td>
|
|
|
911 |
</tr>
|
|
|
912 |
</script>
|