Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev Autor Línea Nro. Línea
251 geraldo 1
<?php
2
$acl = $this->viewModel()->getRoot()->getVariable('acl');
3
$currentUser = $this->currentUserHelper();
4
 
5
$roleName = $currentUser->getUserTypeId();
6
 
261 geraldo 7
$routeAdd = $this->url('self-evaluation/forms/add');
262 geraldo 8
$routeDatatable = $this->url('self-evaluation/reviews');
251 geraldo 9
$routeDashboard = $this->url('dashboard');
10
 
261 geraldo 11
$allowEdit = $acl->isAllowed($roleName, 'self-evaluation/forms/edit') ? 1 : 0;
251 geraldo 12
 
13
 
14
$this->inlineScript()->appendFile($this->basePath('plugins/ckeditor/ckeditor.js'));
15
 
16
 
17
$this->headLink()->appendStylesheet($this->basePath('plugins/nprogress/nprogress.css'));
18
$this->inlineScript()->appendFile($this->basePath('plugins/nprogress/nprogress.js'));
19
 
20
 
21
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/jquery.validate.js'));
22
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/additional-methods.js'));
23
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-validation/localization/messages_es.js'));
24
 
25
$this->headLink()->appendStylesheet($this->basePath('plugins/datatables-bs4/css/dataTables.bootstrap4.min.css'));
26
$this->headLink()->appendStylesheet($this->basePath('plugins/datatables-responsive/css/responsive.bootstrap4.min.css'));
27
 
28
$this->inlineScript()->appendFile($this->basePath('plugins/datatables/jquery.dataTables.min.js'));
29
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-bs4/js/dataTables.bootstrap4.min.js'));
30
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/dataTables.responsive.min.js'));
31
$this->inlineScript()->appendFile($this->basePath('plugins/datatables-responsive/js/responsive.bootstrap4.min.js'));
32
 
33
 
34
$this->headLink()->appendStylesheet($this->basePath('plugins/select2/css/select2.min.css'));
35
$this->headLink()->appendStylesheet($this->basePath('plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css'));
36
 
37
$this->inlineScript()->appendFile($this->basePath('plugins/select2/js/select2.full.min.js'));
38
 
39
$this->inlineScript()->appendFile($this->basePath('plugins/moment/moment-with-locales.min.js'));
40
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-datetimepicker/css/bootstrap-datetimepicker.css'));
41
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js'));
42
 
43
 
44
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap4-toggle/css/bootstrap4-toggle.min.css'));
45
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap4-toggle/js/bootstrap4-toggle.min.js'));
46
 
47
$this->inlineScript()->appendFile($this->basePath('plugins/bootstrap-confirmation/dist/bootstrap-confirmation.js'));
48
$this->headLink()->appendStylesheet($this->basePath('plugins/bootstrap-checkbox/awesome-bootstrap-checkbox.css'));
49
$this->inlineScript()->appendFile($this->basePath('plugins/jquery-input-number/input-number-format.jquery.js'));
261 geraldo 50
 
251 geraldo 51
// bootbox Alert //
52
$this->inlineScript()->appendFile($this->basePath('plugins/bootbox/bootbox.min.js'));
261 geraldo 53
 
251 geraldo 54
// JsRender //
55
$this->inlineScript()->appendFile($this->basePath('plugins/jsrender/jsrender.min.js'));
56
 
261 geraldo 57
// Page Styles
58
$this->headLink()->appendStylesheet($this->basePath('css/pages/self-evaluation.css'));
251 geraldo 59
 
306 geraldo 60
 
307 geraldo 61
$pending = \LeadersLinked\Model\CompanySelfEvaluationTest::STATUS_PENDING;
308 geraldo 62
$review = \LeadersLinked\Model\CompanySelfEvaluationTest::STATUS_REVIEW;
307 geraldo 63
$completed = \LeadersLinked\Model\CompanySelfEvaluationTest::STATUS_COMPLETED;
306 geraldo 64
 
251 geraldo 65
$this->inlineScript()->captureStart();
66
echo <<<JS
339 geraldo 67
const classFormGenerator = function() {
251 geraldo 68
    this.id = 0,
69
        this.table = '',
70
        this.name = '',
71
        this.text = '',
72
        this.status = 'a',
73
        this.sections = [],
74
        this.clear = function() {
75
            this.sections = [];
76
            this.render();
77
        },
78
        /**
79
         * Render array sections
80
         */
81
        this.renderSection = function(slug_section) {
82
            var s = '';
83
            for (i = 0; i < this.sections.length; i++) {
84
                if (slug_section != this.sections[i].slug_section) {
85
                    continue;
86
                }
87
                for (j = 0; j < this.sections[i].questions.length; j++) {
88
                    this.sections[i].questions[j].position = j;
89
                    if (this.sections[i].questions[j].type == 'simple' || this.sections[i].questions[j].type == 'multiple' || this.sections[i].questions[j].type == 'rating-open') {
90
                        this.sections[i].questions[j].options.sort(function(a, b) {
91
                            if (a.position > b.position) {
92
                                return 1;
93
                            }
94
                            if (a.position < b.position) {
95
                                return -1;
96
                            }
97
                            return 0;
98
                        });
99
                        for (k = 0; k < this.sections[i].questions[j].options.length; k++) {
100
                            this.sections[i].questions[j].options[k].position = j;
101
                        }
102
                    }
103
                }
104
            }
105
            $('[data-toggle="tooltip"]').tooltip();
106
        },
107
        this.render = function() {
108
            this.sections.sort(function(a, b) {
109
                if (a.position > b.position) {
110
                    return 1;
111
                }
112
                if (a.position < b.position) {
113
                    return -1;
114
                }
115
                return 0;
116
            });
117
            var s = '';
118
            for (i = 0; i < this.sections.length; i++) {
119
                this.sections[i].position = i;
120
                this.sections[i].questions.sort(function(a, b) {
121
                    if (a.position > b.position) {
122
                        return 1;
123
                    }
124
                    if (a.position < b.position) {
125
                        return -1;
126
                    }
127
                    return 0;
128
                });
129
                for (j = 0; j < this.sections[i].questions.length; j++) {
130
                    this.sections[i].questions[j].position = j;
131
                    if (this.sections[i].questions[j].type == 'simple' || this.sections[i].questions[j].type == 'multiple' || this.sections[i].questions[j].type == 'rating-open') {
132
                        this.sections[i].questions[j].options.sort(function(a, b) {
133
                            if (a.position > b.position) {
134
                                return 1;
135
                            }
136
                            if (a.position < b.position) {
137
                                return -1;
138
                            }
139
                            return 0;
140
                        });
141
                        for (k = 0; k < this.sections[i].questions[j].options.length; k++) {
142
                            this.sections[i].questions[j].options[k].position = j;
143
                        }
144
                    }
145
                }
146
            }
147
            $('[data-toggle="tooltip"]').tooltip();
266 geraldo 148
        };
352 geraldo 149
    /**
150
     * Add element to question array
151
     */
152
    this.editQuestion = function(slug_section, slug_question, status) {
153
        var renderTable = false;
154
        for (i = 0; i < this.sections.length; i++) {
155
            if (slug_section == this.sections[i].slug_section) {
156
                for (j = 0; j < this.sections[i].questions.length; j++) {
157
                    if (slug_question == this.sections[i].questions[j].slug_question) {
158
                        this.sections[i].questions[j].status = status;
395 geraldo 159
                        this.renderSection(slug_section);
394 geraldo 160
                        return true;
345 geraldo 161
                    }
162
                }
163
            }
352 geraldo 164
        }
165
    };
339 geraldo 166
}
251 geraldo 167
jQuery(document).ready(function($) {
168
    var objFormGenerator = new classFormGenerator();
169
    objFormGenerator.render();
170
    var allowEdit = $allowEdit;
171
    /**
172
     * Get rows and set data table
173
     */
174
    var tableForm = $('#gridTable').dataTable({
175
        'processing': true,
176
        'serverSide': true,
177
        'searching': true,
178
        'order': [
179
            [0, 'asc']
180
        ],
181
        'ordering': true,
182
        'ordenable': true,
183
        'responsive': true,
184
        'select': false,
185
        'paging': true,
186
        'pagingType': 'simple_numbers',
187
        'ajax': {
188
            'url': '$routeDatatable',
189
            'type': 'get',
190
            'beforeSend': function(request) {
191
                NProgress.start();
192
            },
193
            'dataFilter': function(response) {
194
                var response = jQuery.parseJSON(response);
195
                var json = {};
196
                json.recordsTotal = 0;
197
                json.recordsFiltered = 0;
198
                json.data = [];
199
                if (response.success) {
200
                    json.recordsTotal = response.data.total;
201
                    json.recordsFiltered = response.data.total;
202
                    json.data = response.data.items;
203
                } else {
204
                    $.fn.showError(response.data)
205
                }
206
                return JSON.stringify(json);
207
            }
208
        },
209
        'language': {
210
            'sProcessing': 'LABEL_DATATABLE_SPROCESSING',
211
            'sLengthMenu': 'LABEL_DATATABLE_SLENGTHMENU',
212
            'sZeroRecords': 'LABEL_DATATABLE_SZERORECORDS',
213
            'sEmptyTable': 'LABEL_DATATABLE_SEMPTYTABLE',
214
            'sInfo': 'LABEL_DATATABLE_SINFO',
215
            'sInfoEmpty': 'LABEL_DATATABLE_SINFOEMPTY',
216
            'sInfoFiltered': 'LABEL_DATATABLE_SINFOFILTERED',
217
            'sInfoPostFix': '',
218
            'sSearch': 'LABEL_DATATABLE_SSEARCH',
219
            'sUrl': '',
220
            'sInfoThousands': ',',
221
            'sLoadingRecords': 'LABEL_DATATABLE_SLOADINGRECORDS',
222
            'oPaginate': {
223
                'sFirst': 'LABEL_DATATABLE_SFIRST',
224
                'sLast': 'LABEL_DATATABLE_SLAST',
225
                'sNext': 'LABEL_DATATABLE_SNEXT',
226
                'sPrevious': 'LABEL_DATATABLE_SPREVIOUS'
227
            },
228
            'oAria': {
229
                'sSortAscending': ': LABEL_DATATABLE_SSORTASCENDING',
230
                'sSortDescending': ':LABEL_DATATABLE_SSORTDESCENDING'
231
            },
232
        },
233
        'drawCallback': function(settings) {
234
            NProgress.done();
235
            $('button.btn-delete').confirmation({
236
                rootSelector: 'button.btn-delete',
237
                title: 'LABEL_ARE_YOU_SURE',
238
                singleton: true,
239
                btnOkLabel: 'LABEL_YES',
240
                btnCancelLabel: 'LABEL_NO',
241
                onConfirm: function(value) {
242
                    action = $(this).data('href');
243
                    NProgress.start();
244
                    $.ajax({
245
                        'dataType': 'json',
246
                        'accept': 'application/json',
247
                        'method': 'post',
248
                        'url': action,
249
                    }).done(function(response) {
250
                        if (response['success']) {
251
                            $.fn.showSuccess(response['data']);
252
                            tableForm.fnDraw();
253
                        } else {
254
                            $.fn.showError(response['data']);
255
                        }
256
                    }).fail(function(jqXHR, textStatus, errorThrown) {
257
                        $.fn.showError(textStatus);
258
                    }).always(function() {
259
                        NProgress.done();
260
                    });
261
                },
262
            });
263
        },
339 geraldo 264
        'aoColumns': [{
294 geraldo 265
                'mDataProp': 'user'
339 geraldo 266
            }, {
251 geraldo 267
                'mDataProp': 'name'
268
            },
269
            {
270
                'mDataProp': 'language'
271
            },
272
            {
273
                'mDataProp': 'status'
274
            },
275
            {
294 geraldo 276
                'mDataProp': 'link_edit'
251 geraldo 277
            },
278
        ],
339 geraldo 279
        'columnDefs': [{
251 geraldo 280
                'targets': 0,
281
                'className': 'text-vertical-middle',
339 geraldo 282
            }, {
294 geraldo 283
                'targets': 1,
284
                'className': 'text-vertical-middle',
251 geraldo 285
            },
286
            {
294 geraldo 287
                'targets': -1,
251 geraldo 288
                'className': 'text-vertical-middle',
289
            },
290
            {
292 geraldo 291
                'targets': -2,
292
                'orderable': false,
293
                'className': 'text-center',
293 geraldo 294
                'className': 'text-vertical-middle',
251 geraldo 295
            },
296
            {
297
                'targets': -1,
298
                'orderable': false,
299
                'render': function(data, type, row) {
300
                    s = '';
301
                    if (allowEdit) {
293 geraldo 302
                        s = s + '<button class="btn btn-primary btn-edit-form" data-href="' + data + '" data-toggle="tooltip" title="LABEL_EDIT"><i class="fa fa-pencil"></i> LABEL_EDIT </button>&nbsp;';
251 geraldo 303
                    }
304
                    return s;
305
                }
306
            }
307
        ],
308
    });
309
    /**
391 geraldo 310
     * Clicked edit question
311
     */
312
    $('body').on('click', 'button.btn-add-status', function(e) {
313
        e.preventDefault();
393 geraldo 314
        objFormGenerator.editQuestion(
315
            $(this).data('section'),
316
            $(this).data('question'),
317
            true
318
        );
397 geraldo 319
        renderSectionData(objFormGenerator.sections);
391 geraldo 320
    });
321
    /**
322
     * Clicked edit question
323
     */
324
    $('body').on('click', 'button.btn-remove-status', function(e) {
325
        e.preventDefault();
393 geraldo 326
        objFormGenerator.editQuestion(
327
            $(this).data('section'),
328
            $(this).data('question'),
329
            false
330
        );
397 geraldo 331
        renderSectionData(objFormGenerator.sections);
391 geraldo 332
    });
333
    /**
251 geraldo 334
     * Clicked on edit form
335
     */
336
    $('body').on('click', 'button.btn-edit-form', function(e) {
337
        e.preventDefault();
338
        form_id = $(this).data('id')
339
        var action = $(this).data('href');
340
        $.ajax({
341
            'dataType': 'json',
342
            'accept': 'application/json',
343
            'method': 'get',
344
            'url': action,
345
        }).done(function(response) {
346
            if (response['success']) {
347
                $('#form-main').attr('action', action);
348
                $('#form-main #form-id').val(response['data']['id']),
387 geraldo 349
                    $('#name').html(response['data']['name']);
366 geraldo 350
                $('#form-status').val(response['data']['status']);
316 geraldo 351
                $('#text').html(response['data']['text']);
352
                $('#user').html(response['data']['user']);
251 geraldo 353
                /*-------------Render Sections -------*/
354
                objFormGenerator.clear();
355
                objFormGenerator.sections = response['data']['content'] || [];
356
                objFormGenerator.render();
357
                renderSectionData(objFormGenerator.sections);
254 geraldo 358
                $('#row-forms').hide();
251 geraldo 359
                $('#row-edit').show();
360
            } else {
361
                $.fn.showError(response['message'] || 'ERROR_UNKNOWN');
362
            }
363
        }).fail(function(jqXHR, textStatus, errorThrown) {
364
            $.fn.showError(textStatus);
365
        });
366
    });
351 geraldo 367
    $('button.btn-form-save-close').click(function(e) {
352 geraldo 368
        var formContinue = parseInt($('#form-main #form-continue').val());
369
        var data = {
370
            'status': $('#form-main #form-status').val(),
371
            'content': JSON.stringify(objFormGenerator.sections)
372
        }
373
        $.ajax({
374
            'dataType': 'json',
375
            'method': 'post',
376
            'url': $('#form-main').attr('action'),
377
            'data': data,
378
        }).done(function(response) {
379
            if (response['success']) {
380
                $.fn.showSuccess(response['data']);
381
                $('#row-edit').hide();
382
                $('#row-forms').show();
383
                /*---------- Reset Form -------- */
384
                $('#form-main')[0].reset();
385
                /*--------Reset Sections ----------*/
386
                clearSectionData();
387
                /* ------- Refresh Table -----------*/
388
                tableForm.fnDraw();
389
            } else {
390
                $.fn.showError(response['message'] || 'ERROR_UNKNOWN');
391
            }
392
        }).fail(function(jqXHR, textStatus, errorThrown) {
393
            $.fn.showError(textStatus);
394
        });
395
        return false;
351 geraldo 396
    });
251 geraldo 397
    /**
398
     * Clicked cancel new/edit Form
399
     */
400
    $('button.btn-edit-cancel').click(function(e) {
401
        e.preventDefault();
402
        $('#row-edit').hide();
254 geraldo 403
        $('#row-forms').show();
251 geraldo 404
    });
405
    /**
339 geraldo 406
     * Get Answers
407
     */
408
    const getAnswer = (type, options, answer) => {
409
        if (type == 'open' || type == 'rating-range') {
328 geraldo 410
            return answer;
251 geraldo 411
        }
339 geraldo 412
        if (type == 'multiple') {
352 geraldo 413
            let opt = '';
339 geraldo 414
            opt += removeTags(options.filter((opt) => answer.includes(opt.slug_option))[0].text) + ' ';
332 geraldo 415
            return opt;
330 geraldo 416
        }
338 geraldo 417
        return removeTags(options.filter((opt) => opt.slug_option == answer)[0].text);
251 geraldo 418
    }
419
    /**
341 geraldo 420
     * Get Status
421
     */
400 geraldo 422
    const getStatus = (options, answer, type) => {
407 geraldo 423
        let status;
409 geraldo 424
        status = type == 'multiple' ?
425
            options.filter((opt) => answer.includes(opt.slug_option) && opt.correct == '1') :
410 geraldo 426
            options.filter((opt) => opt.slug_option == answer && opt.correct == '1');
409 geraldo 427
        return status.length != 0 ? '<font color="green">LABEL_CORRECT</font>' : '<font color="red">LABEL_FAIL</red>';
400 geraldo 428
    }
341 geraldo 429
    /**
251 geraldo 430
     * Remove Html Tags
431
     */
339 geraldo 432
    const removeTags = (str) => str.toString().replace(/(<([^>]+)>)/ig, '')
251 geraldo 433
    /**
434
     * Render Sections data
435
     */
398 geraldo 436
    const renderSectionData = (data) => $("#rows").html($("#sectionTemplate").render(data, {
323 geraldo 437
        removeTags: removeTags,
341 geraldo 438
        getAnswer: getAnswer,
385 geraldo 439
        getStatus: getStatus
398 geraldo 440
    }));
251 geraldo 441
    /**
442
     * Clear Div Section data
443
     */
444
    const clearSectionData = () => $("#rows").html('');
445
    /**
446
     * Clicked refresh button
447
     */
448
    $('button.btn-refresh').click(function(e) {
449
        tableForm.fnDraw();
450
    });
451
});
452
JS;
453
$this->inlineScript()->captureEnd();
454
?>
455
 
456
<!-- Content Header (Page header) -->
457
<section class="content-header">
389 geraldo 458
    <div class="container-fluid">
459
        <div class="row mb-2">
460
            <div class="col-sm-12">
461
                <h1>LABEL_REVIEWS</h1>
462
            </div>
463
        </div>
464
    </div>
465
    <!-- /.container-fluid -->
251 geraldo 466
</section>
314 geraldo 467
<section class="content" style="padding: 13px;">
389 geraldo 468
    <div class="container-fluid" id="row-forms">
469
        <div class="row">
470
            <div class="col-12">
471
                <div class="card">
472
                    <div class="card-body">
473
                        <table id="gridTable" class="table   table-hover">
474
                            <thead>
475
                                <tr>
476
                                    <th>LABEL_USER</th>
477
                                    <th>LABEL_NAME</th>
478
                                    <th>LABEL_LANGUAGE</th>
479
                                    <th>LABEL_STATUS</th>
480
                                    <th>LABEL_ACTIONS</th>
481
                                </tr>
482
                            </thead>
483
                            <tbody></tbody>
484
                        </table>
485
                    </div>
486
                    <div class="card-footer clearfix">
487
                        <div style="float:right;">
488
                            <button type="button" class="btn btn-info btn-refresh"><i class="fa fa-refresh"></i> LABEL_REFRESH </button>
489
                        </div>
490
                    </div>
491
                </div>
251 geraldo 492
            </div>
389 geraldo 493
        </div>
494
    </div>
495
    <!-- Create/Edit Form -->
496
    <div class="row" id="row-edit" style="display: none">
497
        <div class="col-xs-12 col-md-12">
498
            <form action="#" name="form-main" id="form-main">
499
                <div class="form-group">
500
                    <label for="form-status">LABEL_USER:</label>
501
                    <div id="user"></div>
502
                </div>
503
                <div class="form-group">
504
                    <label for="form-status">LABEL_FORM:</label>
505
                    <div id="name"></div>
506
                </div>
507
                <div class="form-group">
508
                    <label for="form-status">LABEL_DESCRIPTION:</label>
509
                    <div id="text"></div>
510
                </div>
511
                <div class="form-group">
512
                    <label for="form-status">LABEL_STATUS:</label>
513
                    <select name="form-status" id="form-status" class="form-control">
514
                        <option value="<?php echo $pending; ?>">LABEL_PENDING</option>
515
                        <option value="<?php echo $review; ?>">LABEL_REVIEW</option>
516
                        <option value="<?php echo $completed; ?>">LABEL_COMPLETED</option>
517
                    </select>
518
                </div>
519
                <div class="row">
520
                    <div class="col-xs-12 col-md-12">
521
                        <div class="panel-group" id="rows"></div>
522
                    </div>
523
                </div>
524
                <div class="form-group">
525
                    <button type="button" class="btn btn-primary btn-form-save-close">LABEL_SAVE</button>
526
                    <button type="button" class="btn btn-secondary btn-edit-cancel">LABEL_CANCEL</button>
527
                </div>
528
            </form>
529
        </div>
530
    </div>
531
    <!-- Create/Edit Form-->
251 geraldo 532
 
533
    <!---Template Sections --->
534
    <script id="sectionTemplate" type="text/x-jsrender">
389 geraldo 535
        <div class="panel panel-default" id="panel-{{:slug_section}}">
369 geraldo 536
   <div class="panel-heading">
537
      <h4 class="panel-title">
538
         <a class="accordion-toggle" data-toggle="collapse" aria-expanded="true" data-parent="#panel-{{:slug_section}}" href="#collapse-{{:slug_section}}">
539
         <span class="section-name{{:slug_section}}">
540
         {{:name}}
541
         </span>
542
         </a>
543
      </h4>
544
   </div>
545
   <div id="collapse-{{:slug_section}}" class="panel-collapse in collapse show">
546
      <div class="panel-body">
547
         <div class="table-responsive">
548
            <table class="table table-bordered">
549
               <thead>
550
                  <tr>
399 geraldo 551
                     <th style="width: 30%;">LABEL_QUESTION</th>
374 geraldo 552
                     <th style="width: 35%;">LABEL_ANSWER</th>
399 geraldo 553
                     <th style="width: 10%;">LABEL_STATUS</th>
374 geraldo 554
                     <th style="width: 25%;">LABEL_ACTIONS</th>
369 geraldo 555
                  </tr>
556
               </thead>
557
               {{for questions}}
558
               <tbody>
559
                  <tr class="tr-question">
560
                     <td class="text-left">{{:~removeTags(text)}} </td>
561
                     <td>{{:~getAnswer(type,options,answer)}}</td>
562
                     <td>
563
                        {{if type == 'simple'  || type=='multiple' }}
403 geraldo 564
                        {{:~getStatus( options,answer,type)}}
369 geraldo 565
                        {{else}}
399 geraldo 566
 
567
                        {{if status}}
568
                                    <font color="green">LABEL_CORRECT</font>
569
                                    {{else}}
570
                                    <font color="red">LABEL_FAIL</font>
571
                                    {{/if}}
572
 
573
 
574
                        {{/if}}
575
 
576
                     </td>
577
                     <td>
578
                        {{if type != 'simple'  && type !='multiple' }}
579
 
369 geraldo 580
                        {{if status}}
390 geraldo 581
                        <button class="btn btn-danger btn-remove-status"  data-section="{{:slug_section}}" data-question="{{:slug_question}}">
372 geraldo 582
                        <i class="fa fa-times" aria-hidden="true"></i> LABEL_TO_CHECK LABEL_FAIL
369 geraldo 583
                        </button>
377 geraldo 584
                        {{else}}
390 geraldo 585
                        <button class="btn btn-success btn-add-status" data-section="{{:slug_section}}" data-question="{{:slug_question}}" >
372 geraldo 586
                        <i class="fa fa-check" aria-hidden="true"></i> LABEL_TO_CHECK LABEL_CORRECT
369 geraldo 587
                        </button>
588
                        {{/if}}
399 geraldo 589
 
369 geraldo 590
                        {{/if}}
591
                     </td>
592
                  </tr>
593
               </tbody>
594
               {{/for}}
595
            </table>
596
         </div>
597
      </div>
598
   </div>
599
</div>
251 geraldo 600
    </script>
601
 
602
    <!-- End Template Sections-->
603
 
604
</section>