Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 253 | Rev 255 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 253 Rev 254
Línea 145... Línea 145...
145
                    }
145
                    }
146
                }
146
                }
147
            }
147
            }
148
            $('[data-toggle="tooltip"]').tooltip();
148
            $('[data-toggle="tooltip"]').tooltip();
149
        },
149
        },
-
 
150
        /**
-
 
151
         * Add element to section array 
-
 
152
         */
-
 
153
        this.addSection = function(name, text, value) {
-
 
154
            var d = new Date();
-
 
155
            var slug = 'section' + d.getTime();
-
 
156
            var position = 0;
-
 
157
            $.each(this.sections, function(index, section) {
-
 
158
                if (position < section.position) {
-
 
159
                    position = section.position;
-
 
160
                }
-
 
161
            });
-
 
162
            position++;
-
 
163
            var section = {
-
 
164
                'slug_section': slug,
-
 
165
                'name': name,
-
 
166
                'text': text,
-
 
167
                'value': value,
-
 
168
                'position': position,
-
 
169
                'questions': [],
-
 
170
                'status': 0
-
 
171
            }
-
 
172
            this.sections.push(section);
-
 
173
        },
-
 
174
         /**
-
 
175
         * Edit element to section array 
-
 
176
         */
-
 
177
        this.editSection = function(slug, name, text, value) {
-
 
178
            var renderTable = false;
-
 
179
            for (i = 0; i < this.sections.length; i++) {
-
 
180
                if (slug == this.sections[i].slug_section) {
-
 
181
                    this.sections[i].name = name;
-
 
182
                    this.sections[i].text = text;
-
 
183
                    this.sections[i].value = value;
-
 
184
                    renderTable = true;
-
 
185
                    break;
-
 
186
                }
-
 
187
            }
-
 
188
            if (renderTable) {
-
 
189
                this.renderSection(slug);
-
 
190
            }
-
 
191
        },
-
 
192
         /**
-
 
193
         * Remove element to section array
-
 
194
         */
-
 
195
        this.deleteSection = function(slug) {
-
 
196
            var renderTable = false;
-
 
197
            for (i = 0; i < this.sections.length; i++) {
-
 
198
                if (slug == this.sections[i].slug_section) {
-
 
199
                    this.sections.splice(i, 1);
-
 
200
                    renderTable = true;
-
 
201
                    break;
-
 
202
                }
-
 
203
            }
-
 
204
            if (renderTable) {
-
 
205
                $('#panel' + slug).remove();
-
 
206
            }
-
 
207
        },
-
 
208
         /**
-
 
209
         * Add element to question array
-
 
210
         */
-
 
211
        this.addQuestion = function(slug_section, text, value, type, maxlength, multiline, range) {
-
 
212
            var d = new Date();
-
 
213
            var slug_question = 'question' + d.getTime();
-
 
214
            var position = 0;
-
 
215
            var renderTable = false;
-
 
216
            for (i = 0; i < this.sections.length; i++) {
-
 
217
                if (slug_section == this.sections[i].slug_section) {
-
 
218
                    $.each(this.sections[i].questions, function(index, question) {
-
 
219
                        if (position < question.position) {
-
 
220
                            position = question.position;
-
 
221
                        }
-
 
222
                    });
-
 
223
                    position++;
-
 
224
                    var question = {
-
 
225
                        'slug_section': slug_section,
-
 
226
                        'slug_question': slug_question,
-
 
227
                        'text': text,
-
 
228
                        'value': value,
-
 
229
                        'type': type,
-
 
230
                        'position': position,
-
 
231
                        'maxlength': maxlength,
-
 
232
                        'multiline': multiline,
-
 
233
                        'range': range,
-
 
234
                        'options': [],
-
 
235
                        'answer': type=='multiple' ? [] : ''
-
 
236
                    }
-
 
237
                    this.sections[i].questions.push(question);
-
 
238
                    renderTable = true;
-
 
239
                    break;
-
 
240
                }
-
 
241
            }
-
 
242
            if (renderTable) {
-
 
243
                this.renderSection(slug_section);
-
 
244
            }
-
 
245
        },
150
         /**
246
         /**
151
         * Add element to question array
247
         * Add element to question array
152
         */
248
         */
153
        this.editQuestion = function(slug_section, slug_question, text, value, type, maxlength, multiline, range) {
249
        this.editQuestion = function(slug_section, slug_question, text, value, type, maxlength, multiline, range) {
154
            var renderTable = false;
250
            var renderTable = false;
Línea 189... Línea 285...
189
                }
285
                }
190
            }
286
            }
191
            if (renderTable) {
287
            if (renderTable) {
192
                this.renderSection(slug_section);
288
                this.renderSection(slug_section);
193
            }
289
            }
-
 
290
        },
-
 
291
        /**
-
 
292
         * Remove element to question array
-
 
293
         */
-
 
294
        this.deleteQuestion = function(slug_section, slug_question) {
-
 
295
            var renderTable = false;
-
 
296
            for (i = 0; i < this.sections.length; i++) {
-
 
297
                if (slug_section == this.sections[i].slug_section) {
-
 
298
                    for (j = 0; j < this.sections[i].questions.length; j++) {
-
 
299
                        if (slug_question == this.sections[i].questions[j].slug_question) {
-
 
300
                            this.sections[i].questions.splice(j, 1);
-
 
301
                            renderTable = true;
-
 
302
                            break;
-
 
303
                        }
-
 
304
                    }
-
 
305
                }
-
 
306
                if (renderTable) {
-
 
307
                    break;
-
 
308
                }
-
 
309
            }
-
 
310
            if (renderTable) {
-
 
311
                this.renderSection(slug_section);
-
 
312
            }
-
 
313
        },
-
 
314
        /**
-
 
315
         * Add element to option array
-
 
316
         */
-
 
317
        this.addOption = function(slug_section, slug_question, text, correct, value) {
-
 
318
            var d = new Date();
-
 
319
            var slug_option = 'option' + d.getTime();
-
 
320
            var position = 0;
-
 
321
            var renderTable = false;
-
 
322
            for (i = 0; i < this.sections.length; i++) {
-
 
323
                if (slug_section == this.sections[i].slug_section) {
-
 
324
                    for (j = 0; j < this.sections[i].questions.length; j++) {
-
 
325
                        if (slug_question == this.sections[i].questions[j].slug_question) {
-
 
326
                            $.each(this.sections[i].questions[j].options, function(index, option) {
-
 
327
                                if (position < option.position) {
-
 
328
                                    position = option.position;
-
 
329
                                }
-
 
330
                            });
-
 
331
                            position++;
-
 
332
                            var option = {
-
 
333
                                'slug_section': slug_section,
-
 
334
                                'slug_question': slug_question,
-
 
335
                                'slug_option': slug_option,
-
 
336
                                'text': text,
-
 
337
                                'correct': correct,
-
 
338
                                'value': value,
-
 
339
                                'checked': false
-
 
340
                            }
-
 
341
                            this.sections[i].questions[j].options.push(option);
-
 
342
                            renderTable = true;
-
 
343
                            break;
-
 
344
                        }
-
 
345
                        if (renderTable) {
-
 
346
                            break;
-
 
347
                        }
-
 
348
                    }
-
 
349
                }
-
 
350
            }
-
 
351
            if (renderTable) {
-
 
352
                this.renderSection(slug_section);
-
 
353
            }
-
 
354
        },
-
 
355
        /**
-
 
356
         * Edit element to option array
-
 
357
         */
-
 
358
        this.editOption = function(slug_section, slug_question, option_slug, text, correct, value) {
-
 
359
            var renderTable = false;
-
 
360
            for (i = 0; i < this.sections.length; i++) {
-
 
361
                if (slug_section == this.sections[i].slug_section) {
-
 
362
                    for (j = 0; j < this.sections[i].questions.length; j++) {
-
 
363
                        if (slug_question == this.sections[i].questions[j].slug_question) {
-
 
364
                            for (k = 0; k < this.sections[i].questions[j].options.length; k++) {
-
 
365
                                if (option_slug == this.sections[i].questions[j].options[k].slug_option) {
-
 
366
                                    this.sections[i].questions[j].options[k].text = text;
-
 
367
                                    this.sections[i].questions[j].options[k].correct = correct;
-
 
368
                                    this.sections[i].questions[j].options[k].value = value;
-
 
369
                                    renderTable = true;
-
 
370
                                    break;
-
 
371
                                }
-
 
372
                            }
-
 
373
                        }
-
 
374
                        if (renderTable) {
-
 
375
                            break;
-
 
376
                        }
-
 
377
                    }
-
 
378
                }
-
 
379
                if (renderTable) {
-
 
380
                    break;
-
 
381
                }
-
 
382
            }
-
 
383
            if (renderTable) {
-
 
384
                this.renderSection(slug_section);
-
 
385
            }
-
 
386
        },
-
 
387
        /**
-
 
388
         * Remove element to option array
-
 
389
         */
-
 
390
        this.deleteOption = function(slug_section, slug_question, option_slug) {
-
 
391
            var renderTable = false;
-
 
392
            for (i = 0; i < this.sections.length; i++) {
-
 
393
                if (slug_section == this.sections[i].slug_section) {
-
 
394
                    for (j = 0; j < this.sections[i].questions.length; j++) {
-
 
395
                        if (slug_question == this.sections[i].questions[j].slug_question) {
-
 
396
                            for (k = 0; k < this.sections[i].questions[j].options.length; k++) {
-
 
397
                                if (option_slug == this.sections[i].questions[j].options[k].slug_option) {
-
 
398
                                    this.sections[i].questions[j].options.splice(k, 1);
-
 
399
                                    renderTable = true;
-
 
400
                                    break;
-
 
401
                                }
-
 
402
                            }
-
 
403
                        }
-
 
404
                        if (renderTable) {
-
 
405
                            break;
-
 
406
                        }
-
 
407
                    }
-
 
408
                }
-
 
409
                if (renderTable) {
-
 
410
                    break;
-
 
411
                }
-
 
412
            }
-
 
413
            if (renderTable) {
-
 
414
                this.renderSection(slug_section);
-
 
415
            }
194
        }
416
        }
195
 
-
 
196
        
-
 
197
}
417
}
Línea 198... Línea 418...
198
 
418
 
199
function htmlEntities(str) {
419
function htmlEntities(str) {
200
    return String(str).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
420
    return String(str).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
Línea 377... Línea 597...
377
                objFormGenerator.clear();
597
                objFormGenerator.clear();
378
                objFormGenerator.sections = response['data']['content'] || [];
598
                objFormGenerator.sections = response['data']['content'] || [];
379
                objFormGenerator.render();
599
                objFormGenerator.render();
380
                renderSectionData(objFormGenerator.sections);
600
                renderSectionData(objFormGenerator.sections);
Línea 381... Línea 601...
381
                
601
                
382
                $('#row-reviews').hide();
602
                $('#row-forms').hide();
383
                $('#row-edit').show();
603
                $('#row-edit').show();
Línea 384... Línea 604...
384
                $('#form-main #form-name').focus();
604
                $('#form-main #form-name').focus();
385
 
605
 
Línea 582... Línea 802...
582
                            $('#form-main').attr('action',response['action_edit']);
802
                            $('#form-main').attr('action',response['action_edit']);
583
                            $('#form-main #form-id').val(response['id']);
803
                            $('#form-main #form-id').val(response['id']);
584
                            $('#form-main #form-continue').val(0);
804
                            $('#form-main #form-continue').val(0);
585
                        } else {
805
                        } else {
586
                            $('#row-edit').hide();
806
                            $('#row-edit').hide();
587
                            $('#row-reviews').show();
807
                            $('#row-forms').show();
588
                        /*---------- Reset Form -------- */
808
                        /*---------- Reset Form -------- */
589
                        $('#form-main')[0].reset();
809
                        $('#form-main')[0].reset();
590
                        /*--------Reset Ckeditor ----------*/
810
                        /*--------Reset Ckeditor ----------*/
591
                        CKEDITOR.instances['form-text'].setData('');
811
                        CKEDITOR.instances['form-text'].setData('');
592
                        CKEDITOR.instances['form-description'].setData('');
812
                        CKEDITOR.instances['form-description'].setData('');
Línea 604... Línea 824...
604
                });
824
                });
605
                return false;
825
                return false;
606
            }
826
            }
607
        }
827
        }
608
    });
828
    });
-
 
829
    //IMPORTANT: update CKEDITOR textarea with actual content before submit
-
 
830
    $("#form-section").on('submit', function() {
-
 
831
        for (var instanceName in CKEDITOR.instances) {
-
 
832
            CKEDITOR.instances[instanceName].updateElement();
-
 
833
        }
609
 
834
    })
-
 
835
    /**
-
 
836
     * Validate rules form section
-
 
837
     */
-
 
838
    var validatorFormSection = $("#form-section").validate({
-
 
839
        ignore: [],
-
 
840
        errorClass: 'help-block',
-
 
841
        errorElement: 'span',
-
 
842
        rules: {
-
 
843
            'section-name': {
-
 
844
                required: true,
-
 
845
                minlength: 2,
-
 
846
                maxlength: 50
-
 
847
            },
-
 
848
            'section-text': {
-
 
849
                required: false,
-
 
850
            },
-
 
851
            'section-value': {
-
 
852
                required: true,
-
 
853
                number: true,
-
 
854
                min: 1
-
 
855
            },
-
 
856
        },
-
 
857
        highlight: function(element) {
-
 
858
            $(element).closest('.form-group').addClass('has-error');
-
 
859
        },
-
 
860
        unhighlight: function(element) {
-
 
861
            $(element).closest('.form-group').removeClass('has-error');
-
 
862
        },
-
 
863
        errorPlacement: function(error, element) {
-
 
864
            if (element.attr("data-error-container")) {
-
 
865
                error.appendTo(element.attr("data-error-container"));
-
 
866
            } else {
-
 
867
                error.insertAfter(element);
-
 
868
            }
-
 
869
        },
-
 
870
        invalidHandler: function(form, validator) {
-
 
871
            if (!validator.numberOfInvalids())
-
 
872
                return;
-
 
873
            $('html, body').animate({
-
 
874
                scrollTop: $(validator.errorList[0].element).offset().top - 100
-
 
875
            }, 1000);
-
 
876
        },
-
 
877
        submitHandler: function(form) {
-
 
878
            // do other things for a valid form
-
 
879
            //form.submit();
-
 
880
            var slug = $('#form-section #section-slug').val();
-
 
881
            if (slug) {
-
 
882
                objFormGenerator.editSection(
-
 
883
                    $('#form-section #section-slug').val(),
-
 
884
                    $('#form-section #section-name').val(),
-
 
885
                    $('#form-section #section-text').val(),
-
 
886
                    $('#form-section #section-value').val()
-
 
887
                );
-
 
888
            } else {
-
 
889
                objFormGenerator.addSection(
-
 
890
                    $('#form-section #section-name').val(),
-
 
891
                    $('#form-section #section-text').val(),
-
 
892
                    $('#form-section #section-value').val()
-
 
893
                );
-
 
894
            }
-
 
895
            renderSectionData(objFormGenerator.sections);
-
 
896
            $('#modal-section').modal('hide');
-
 
897
            return false;
-
 
898
        }
-
 
899
    });
-
 
900
    //IMPORTANT: update CKEDITOR textarea with actual content before submit
-
 
901
    $("#form-question").on('submit', function() {
-
 
902
        for (var instanceName in CKEDITOR.instances) {
-
 
903
            CKEDITOR.instances[instanceName].updateElement();
-
 
904
        }
610
    
905
    })
-
 
906
    /**
-
 
907
     * Validate rules form Questions
-
 
908
     */
-
 
909
    var validatorFormQuestion = $("#form-question").validate({
-
 
910
        ignore: [],
-
 
911
        errorClass: 'help-block',
-
 
912
        errorElement: 'span',
-
 
913
        rules: {
-
 
914
            'question-text': {
-
 
915
                required: true,
-
 
916
            },
-
 
917
            'question-value': {
-
 
918
                required: true,
-
 
919
                number: true,
-
 
920
                min: 1
-
 
921
            },
-
 
922
            'question-type': {
-
 
923
                required: true,
-
 
924
            },
-
 
925
            'question-max-length': {
-
 
926
                required: true,
-
 
927
                digits: true,
-
 
928
                min: 0
-
 
929
            },
-
 
930
            'question-range': {
-
 
931
                required: true,
-
 
932
                number: true,
-
 
933
                min: 1
-
 
934
            },
-
 
935
        },
-
 
936
        highlight: function(element) {
-
 
937
            $(element).closest('.form-group').addClass('has-error');
-
 
938
        },
-
 
939
        unhighlight: function(element) {
-
 
940
            $(element).closest('.form-group').removeClass('has-error');
-
 
941
        },
-
 
942
        errorPlacement: function(error, element) {
-
 
943
            if (element.attr("data-error-container")) {
-
 
944
                error.appendTo(element.attr("data-error-container"));
-
 
945
            } else {
-
 
946
                error.insertAfter(element);
-
 
947
            }
-
 
948
        },
-
 
949
        invalidHandler: function(form, validator) {
-
 
950
            if (!validator.numberOfInvalids())
-
 
951
                return;
-
 
952
            $('html, body').animate({
-
 
953
                scrollTop: $(validator.errorList[0].element).offset().top - 100
-
 
954
            }, 1000);
-
 
955
        },
-
 
956
        submitHandler: function(form) {
-
 
957
            if ($('#form-question #question-slug').val()) {
-
 
958
                objFormGenerator.editQuestion(
-
 
959
                    $('#form-question #question-section').val(),
-
 
960
                    $('#form-question #question-slug').val(),
-
 
961
                    $('#form-question #question-text').val(),
-
 
962
                    $('#form-question #question-value').val(),
-
 
963
                    $('#form-question #question-type').val(),
-
 
964
                    $('#form-question #question-max-length').val(),
-
 
965
                    $('#form-question #question-multiline').val(),
-
 
966
                    $('#form-question #question-range').val()
-
 
967
                );
-
 
968
            } else {
-
 
969
                objFormGenerator.addQuestion(
-
 
970
                    $('#form-question #question-section').val(),
-
 
971
                    $('#form-question #question-text').val(),
-
 
972
                    $('#form-question #question-value').val(),
-
 
973
                    $('#form-question #question-type').val(),
-
 
974
                    $('#form-question #question-max-length').val(),
-
 
975
                    $('#form-question #question-multiline').val(),
-
 
976
                    $('#form-question #question-range').val()
-
 
977
                );
-
 
978
            }
-
 
979
            renderSectionData(objFormGenerator.sections);
-
 
980
            $('#modal-question').modal('hide');
-
 
981
            return false;
-
 
982
        }
-
 
983
    });
-
 
984
    //IMPORTANT: update CKEDITOR textarea with actual content before submit
-
 
985
    $("#form-option").on('submit', function() {
-
 
986
        for (var instanceName in CKEDITOR.instances) {
-
 
987
            CKEDITOR.instances[instanceName].updateElement();
-
 
988
        }
611
    
989
    })
-
 
990
    /**
-
 
991
     * Validate rules form options
-
 
992
     */
-
 
993
    var validatorFormOption = $("#form-option").validate({
-
 
994
        ignore: [],
-
 
995
        errorClass: 'help-block',
-
 
996
        errorElement: 'span',
-
 
997
        rules: {
-
 
998
            'option-text': {
-
 
999
                required: true,
-
 
1000
            },
-
 
1001
            'option-value': {
-
 
1002
                required: true,
-
 
1003
                number: true,
-
 
1004
                min: 1
-
 
1005
            }
-
 
1006
        },
-
 
1007
        highlight: function(element) {
-
 
1008
            $(element).closest('.form-group').addClass('has-error');
-
 
1009
        },
-
 
1010
        unhighlight: function(element) {
-
 
1011
            $(element).closest('.form-group').removeClass('has-error');
-
 
1012
        },
-
 
1013
        errorPlacement: function(error, element) {
-
 
1014
            if (element.attr("data-error-container")) {
-
 
1015
                error.appendTo(element.attr("data-error-container"));
-
 
1016
            } else {
-
 
1017
                error.insertAfter(element);
-
 
1018
            }
-
 
1019
        },
-
 
1020
        invalidHandler: function(form, validator) {
-
 
1021
            if (!validator.numberOfInvalids())
-
 
1022
                return;
-
 
1023
            $('html, body').animate({
-
 
1024
                scrollTop: $(validator.errorList[0].element).offset().top - 100
-
 
1025
            }, 1000);
-
 
1026
        },
-
 
1027
        submitHandler: function(form) {
-
 
1028
            if ($('#form-option #option-slug').val()) {
-
 
1029
                objFormGenerator.editOption(
-
 
1030
                    $('#form-option #option-section').val(),
-
 
1031
                    $('#form-option #option-question').val(),
-
 
1032
                    $('#form-option #option-slug').val(),
-
 
1033
                    $('#form-option #option-text').val(),
-
 
1034
                    $('#form-option #option-correct').val(),
-
 
1035
                    $('#form-option #option-value').val()
-
 
1036
                );
-
 
1037
            } else {
-
 
1038
                objFormGenerator.addOption(
-
 
1039
                    $('#form-option #option-section').val(),
-
 
1040
                    $('#form-option #option-question').val(),
-
 
1041
                    $('#form-option #option-text').val(),
-
 
1042
                    $('#form-option #option-correct').val(),
-
 
1043
                    $('#form-option #option-value').val()
-
 
1044
                );
-
 
1045
            }
-
 
1046
            renderSectionData(objFormGenerator.sections);
-
 
1047
            $('#modal-option').modal('hide');
-
 
1048
            return false;
-
 
1049
        }
-
 
1050
    });
-
 
1051
    /**
-
 
1052
     * Clicked on add new section
-
 
1053
     */
-
 
1054
    $('body').on('click', 'button[id="btn-add-section"]', function(e) {
-
 
1055
        e.preventDefault();
-
 
1056
        validatorFormSection.resetForm();
-
 
1057
        $('#form-section #section-slug').val('');
-
 
1058
        $('#form-section #section-name').val('');
-
 
1059
        CKEDITOR.instances['section-text'].setData('');
-
 
1060
        $('#form-section #section-value').val('0');
-
 
1061
        $('#modal-section h4[class="modal-title"]').html('LABEL_ADD LABEL_SECTION');
-
 
1062
        $('#modal-section').modal('show');
-
 
1063
    });
-
 
1064
    /**
-
 
1065
     * Clicked on edit section
-
 
1066
     */
-
 
1067
    $('body').on('click', 'button.btn-edit-section', function(e) {
-
 
1068
        e.preventDefault();
-
 
1069
        var slug = $(this).data('section');
-
 
1070
        var section;
-
 
1071
        var showForm = false;
-
 
1072
        for (i = 0; i < objFormGenerator.sections.length; i++) {
-
 
1073
            section = objFormGenerator.sections[i];
-
 
1074
            if (slug == section.slug_section) {
-
 
1075
                validatorFormSection.resetForm();
-
 
1076
                $('#form-section #section-slug').val(section.slug_section);
-
 
1077
                $('#form-section #section-name').val(section.name);
-
 
1078
                CKEDITOR.instances['section-text'].setData(section.text);
-
 
1079
                $('#form-section #section-value').val(section.value);
-
 
1080
                showForm = true;
-
 
1081
                break;
-
 
1082
            }
-
 
1083
        }
-
 
1084
        if (showForm) {
-
 
1085
            $('#modal-section h4[class="modal-title"]').html('LABEL_EDIT LABEL_SECTION');
-
 
1086
            $('#modal-section').modal('show');
-
 
1087
        }
-
 
1088
    });
-
 
1089
    /**
-
 
1090
     * Clicked on remove section
-
 
1091
     */
-
 
1092
    $('body').on('click', 'button.btn-delete-section', function(e) {
-
 
1093
        e.preventDefault();
-
 
1094
        var slug = $(this).data('section');
-
 
1095
        bootbox.confirm({
-
 
1096
            title: "LABEL_DELETE LABEL_SECTION",
-
 
1097
            message: "LABEL_QUESTION_DELETE",
-
 
1098
            buttons: {
-
 
1099
                cancel: {
-
 
1100
                    label: '<i class="fa fa-times"></i> LABEL_CANCEL'
-
 
1101
                },
-
 
1102
                confirm: {
-
 
1103
                    label: '<i class="fa fa-check"></i> LABEL_ACCEPT'
-
 
1104
                }
-
 
1105
            },
-
 
1106
            callback: function(result) {
-
 
1107
                if (result) {
-
 
1108
                    objFormGenerator.deleteSection(slug);
-
 
1109
                    renderSectionData(objFormGenerator.sections);
-
 
1110
                }
-
 
1111
            }
-
 
1112
        });
-
 
1113
    });
-
 
1114
    /**
-
 
1115
     * Clicked add new question
-
 
1116
     */
-
 
1117
    $('body').on('click', 'button.btn-add-question', function(e) {
-
 
1118
        e.preventDefault();
-
 
1119
        validatorFormQuestion.resetForm();
-
 
1120
        var slug = $(this).data('section');
-
 
1121
        $('#form-question #question-section').val(slug);
-
 
1122
        $('#form-question #question-slug').val('');
-
 
1123
        CKEDITOR.instances['question-text'].setData('');
-
 
1124
        $('#form-question #question-value').val('0');
-
 
1125
        $('#form-question #question-type').val($('#form-question #question-type option:first').val());
-
 
1126
        $('#form-question #question-max-length').val('0');
-
 
1127
        $('#form-question #question-max-length').parent().show();
-
 
1128
        $('#form-question #question-multiline').val('0');
-
 
1129
        $('#form-question #question-multiline').parent().show();
-
 
1130
        $('#form-question #question-range').val('10');
-
 
1131
        $('#form-question #question-range').parent().hide();
-
 
1132
        $('#modal-question h4[class="modal-title"]').html('LABEL_ADD LABEL_QUESTION');
-
 
1133
        $('#modal-question').modal('show');
-
 
1134
    });
-
 
1135
    /**
-
 
1136
     * Clicked edit question
-
 
1137
     */
-
 
1138
    $('body').on('click', 'button.btn-edit-question', function(e) {
-
 
1139
        e.preventDefault();
-
 
1140
        var slug_section = $(this).data('section');
-
 
1141
        var slug = $(this).data('question');
-
 
1142
        var showForm = false;
-
 
1143
        for (i = 0; i < objFormGenerator.sections.length; i++) {
-
 
1144
            if (slug_section == objFormGenerator.sections[i].slug_section) {
-
 
1145
                for (j = 0; j < objFormGenerator.sections[i].questions.length; j++) {
-
 
1146
                    if (slug == objFormGenerator.sections[i].questions[j].slug_question) {
-
 
1147
                        validatorFormQuestion.resetForm();
-
 
1148
                        $('#form-question #question-section').val(objFormGenerator.sections[i].slug_section);
-
 
1149
                        $('#form-question #question-slug').val(objFormGenerator.sections[i].questions[j].slug_question);
-
 
1150
                        CKEDITOR.instances['question-text'].setData(objFormGenerator.sections[i].questions[j].text);
-
 
1151
                        $('#form-question #question-value').val(objFormGenerator.sections[i].questions[j].value);
-
 
1152
                        $('#form-question #question-type').val(objFormGenerator.sections[i].questions[j].type);
-
 
1153
                        if (objFormGenerator.sections[i].questions[j].type == 'open') {
-
 
1154
                            $('#form-question #question-max-length').val(objFormGenerator.sections[i].questions[j].maxlength);
-
 
1155
                            $('#form-question #question-max-length').parent().show();
-
 
1156
                            $('#form-question #question-multiline').val(objFormGenerator.sections[i].questions[j].multiline);
-
 
1157
                            $('#form-question #question-multiline').parent().show();
-
 
1158
                        } else {
-
 
1159
                            $('#form-question #question-max-length').val('0');
-
 
1160
                            $('#form-question #question-max-length').parent().hide();
-
 
1161
                            $('#form-question #question-multiline').val('0');
-
 
1162
                            $('#form-question #question-multiline').parent().hide();
-
 
1163
                        }
-
 
1164
                        if (objFormGenerator.sections[i].questions[j].type == 'rating-range') {
-
 
1165
                            $('#form-question #question-range').val(objFormGenerator.sections[i].questions[j].range);
-
 
1166
                            $('#form-question #question-range').parent().show();
-
 
1167
                        } else {
-
 
1168
                            $('#form-question #question-range').val('10');
-
 
1169
                            $('#form-question #question-range').parent().hide();
-
 
1170
                        }
-
 
1171
                        showForm = true;
-
 
1172
                        break;
-
 
1173
                    }
-
 
1174
                }
-
 
1175
                break;
-
 
1176
            }
-
 
1177
        }
-
 
1178
        if (showForm) {
-
 
1179
            $('#modal-question h4[class="modal-title"]').html('LABEL_EDIT LABEL_QUESTION');
-
 
1180
            $('#modal-question').modal('show');
-
 
1181
        }
-
 
1182
    });
-
 
1183
    /**
-
 
1184
     * Clicked remove question
-
 
1185
     */
-
 
1186
    $('body').on('click', 'button.btn-delete-question', function(e) {
-
 
1187
        e.preventDefault();
-
 
1188
        var slug_section = $(this).data('section');
-
 
1189
        var slug = $(this).data('question');
-
 
1190
        bootbox.confirm({
-
 
1191
            title: "LABEL_DELETE LABEL_QUESTION",
-
 
1192
            message: "LABEL_QUESTION_DELETE",
-
 
1193
            buttons: {
-
 
1194
                cancel: {
-
 
1195
                    label: '<i class="fa fa-times"></i> LABEL_CANCEL'
-
 
1196
                },
-
 
1197
                confirm: {
-
 
1198
                    label: '<i class="fa fa-check"></i> LABEL_ACCEPT'
-
 
1199
                }
-
 
1200
            },
-
 
1201
            callback: function(result) {
-
 
1202
                if (result) {
-
 
1203
                    objFormGenerator.deleteQuestion(slug_section, slug);
-
 
1204
                    renderSectionData(objFormGenerator.sections);
-
 
1205
                }
-
 
1206
            }
-
 
1207
        });
-
 
1208
    });
-
 
1209
    /**
-
 
1210
     * Clicked add new Option
-
 
1211
     */
-
 
1212
    $('body').on('click', 'button.btn-add-option', function(e) {
-
 
1213
        e.preventDefault();
-
 
1214
        var slug_section = $(this).data('section');
-
 
1215
        var slug_question = $(this).data('question');
-
 
1216
        var showForm = false;
-
 
1217
        for (i = 0; i < objFormGenerator.sections.length; i++) {
-
 
1218
            if (slug_section == objFormGenerator.sections[i].slug_section) {
-
 
1219
                for (j = 0; j < objFormGenerator.sections[i].questions.length; j++) {
-
 
1220
                    if (slug_question == objFormGenerator.sections[i].questions[j].slug_question) {
-
 
1221
                        validatorFormOption.resetForm();
-
 
1222
                        $('#form-option #option-section').val(slug_section);
-
 
1223
                        $('#form-option #option-question').val(slug_question);
-
 
1224
                        $('#form-option #option-slug').val('');
-
 
1225
                        CKEDITOR.instances['option-text'].setData('', function() {
-
 
1226
                            editor.focus();
-
 
1227
                        });
-
 
1228
                        $('#form-option #option-correct').val('0');
-
 
1229
                        if (objFormGenerator.sections[i].questions[j].type == 'rating-open') {
-
 
1230
                            $('#form-option #option-correct').parent().hide();
-
 
1231
                        } else {
-
 
1232
                            $('#form-option #option-correct').parent().show();
-
 
1233
                        }
-
 
1234
                        if (objFormGenerator.sections[i].questions[j].type == 'multiple' || objFormGenerator.sections[i].questions[j].type == 'rating-open') {
-
 
1235
                            $('#form-option #option-value').val('0');
-
 
1236
                            $('#form-option #option-value').parent().show();
-
 
1237
                        } else {
-
 
1238
                            $('#form-option #option-value').val('1');
-
 
1239
                            $('#form-option #option-value').parent().hide();
-
 
1240
                        }
-
 
1241
                        renderSectionData(objFormGenerator.sections);
-
 
1242
                        $('#modal-option h4[class="modal-title"]').html('LABEL_ADD LABEL_OPTION');
-
 
1243
                        $('#modal-option').modal('show');
-
 
1244
                        return true;
-
 
1245
                    }
-
 
1246
                }
-
 
1247
            }
-
 
1248
        }
-
 
1249
    });
-
 
1250
    /**
-
 
1251
     * Clicked edit option
-
 
1252
     */
-
 
1253
    $('body').on('click', 'button.btn-edit-option', function(e) {
-
 
1254
        e.preventDefault();
-
 
1255
        var slug_section = $(this).data('section');
-
 
1256
        var slug_question = $(this).data('question');
-
 
1257
        var slug = $(this).data('slug');
-
 
1258
        var showForm = false;
-
 
1259
        for (i = 0; i < objFormGenerator.sections.length; i++) {
-
 
1260
            if (slug_section == objFormGenerator.sections[i].slug_section) {
-
 
1261
                for (j = 0; j < objFormGenerator.sections[i].questions.length; j++) {
-
 
1262
                    if (slug_question == objFormGenerator.sections[i].questions[j].slug_question) {
-
 
1263
                        for (k = 0; k < objFormGenerator.sections[i].questions[j].options.length; k++) {
-
 
1264
                            if (slug == objFormGenerator.sections[i].questions[j].options[k].slug_option) {
-
 
1265
                                validatorFormOption.resetForm();
-
 
1266
                                $('#form-option #option-section').val(objFormGenerator.sections[i].slug_section);
-
 
1267
                                $('#form-option #option-question').val(objFormGenerator.sections[i].questions[j].slug_question);
-
 
1268
                                $('#form-option #option-slug').val(objFormGenerator.sections[i].questions[j].options[k].slug_option);
-
 
1269
                                CKEDITOR.instances['option-text'].setData(objFormGenerator.sections[i].questions[j].options[k].text,
-
 
1270
                                    function() {
-
 
1271
                                        editor.focus();
-
 
1272
                                    });
-
 
1273
                                $('#form-option #option-correct').val(objFormGenerator.sections[i].questions[j].options[k].correct);
-
 
1274
                                if (objFormGenerator.sections[i].questions[j].type == 'multiple' || objFormGenerator.sections[i].questions[j].type == 'simple') {
-
 
1275
                                    $('#form-option #option-correct').parent().show();
-
 
1276
                                } else {
-
 
1277
                                    $('#form-option #option-correct').parent().hide();
-
 
1278
                                }
-
 
1279
                                $('#form-option #option-value').val(objFormGenerator.sections[i].questions[j].options[k].value);
-
 
1280
                                if (objFormGenerator.sections[i].questions[j].type == 'multiple' || objFormGenerator.sections[i].questions[j].type == 'rating-open') {
-
 
1281
                                    $('#form-option #option-value').parent().show();
-
 
1282
                                } else {
-
 
1283
                                    $('#form-option #option-value').parent().hide();
-
 
1284
                                }
-
 
1285
                                showForm = true;
-
 
1286
                                break;
-
 
1287
                            }
-
 
1288
                        }
-
 
1289
                    }
-
 
1290
                    if (showForm) {
-
 
1291
                        break;
-
 
1292
                    }
-
 
1293
                }
-
 
1294
            }
-
 
1295
            if (showForm) {
-
 
1296
                break;
-
 
1297
            }
-
 
1298
        }
-
 
1299
        if (showForm) {
-
 
1300
            $('#modal-option h4[class="modal-title"]').html('LABEL_EDIT LABEL_OPTION');
-
 
1301
            $('#modal-option').modal('show');
-
 
1302
        }
-
 
1303
    });
-
 
1304
    /**
-
 
1305
     * Clicked remove option
-
 
1306
     */
-
 
1307
    $('body').on('click', 'button.btn-delete-option', function(e) {
-
 
1308
        e.preventDefault();
-
 
1309
        var slug_section = $(this).data('section');
-
 
1310
        var slug_question = $(this).data('question');
-
 
1311
        var slug = $(this).data('slug');
-
 
1312
        bootbox.confirm({
-
 
1313
            title: "LABEL_DELETE LABEL_OPTION",
-
 
1314
            message: "LABEL_QUESTION_DELETE",
-
 
1315
            buttons: {
-
 
1316
                cancel: {
-
 
1317
                    label: '<i class="fa fa-times"></i> LABEL_CANCEL'
-
 
1318
                },
-
 
1319
                confirm: {
-
 
1320
                    label: '<i class="fa fa-check"></i> LABEL_ACCEPT'
-
 
1321
                }
-
 
1322
            },
-
 
1323
            callback: function(result) {
-
 
1324
                if (result) {
-
 
1325
                    objFormGenerator.deleteOption(slug_section, slug_question, slug);
-
 
1326
                    renderSectionData(objFormGenerator.sections);
-
 
1327
                }
-
 
1328
            }
-
 
1329
        });
612
   
1330
    })
-
 
1331
    /**
-
 
1332
     * Format input number (Form Section) 
-
 
1333
     */
-
 
1334
    $('#form-section #section-value').inputNumberFormat({
-
 
1335
        'decimal': 2
-
 
1336
    });
-
 
1337
    /**
-
 
1338
     * Format input number (Form Question) 
-
 
1339
     */
-
 
1340
    $('#form-question #question-value').inputNumberFormat({
-
 
1341
        'decimal': 2
-
 
1342
    });
-
 
1343
    /**
-
 
1344
     * Format input number (Form Question) 
-
 
1345
     */
-
 
1346
    $('#form-question #question-max-length').inputNumberFormat({
-
 
1347
        'decimal': 0
-
 
1348
    });
-
 
1349
    /**
-
 
1350
     * Format input number (Form Option) 
-
 
1351
     */
-
 
1352
    $('#form-option #option-value').inputNumberFormat({
-
 
1353
        'decimal': 2
-
 
1354
    });
613
    /**
1355
    /**
614
     * Detect when updating question status and hide/Show options
1356
     * Detect when updating question status and hide/Show options
615
     */
1357
     */
616
    $('#form-question #question-type').change(function(e) {
1358
    $('#form-question #question-type').change(function(e) {
617
        e.preventDefault();
1359
        e.preventDefault();
Línea 646... Línea 1388...
646
        $('#form-main #form-name').val('');
1388
        $('#form-main #form-name').val('');
647
        $('#form-main #form-language').val('$lang_es'),
1389
        $('#form-main #form-language').val('$lang_es'),
648
        $('#form-main #form-status').val('$status_inactive');
1390
        $('#form-main #form-status').val('$status_inactive');
649
        CKEDITOR.instances['form-text'].setData('');
1391
        CKEDITOR.instances['form-text'].setData('');
650
        CKEDITOR.instances['form-description'].setData('');
1392
        CKEDITOR.instances['form-description'].setData('');
651
        $('#row-reviews').hide();
1393
        $('#row-forms').hide();
652
        $('#row-edit').show();
1394
        $('#row-edit').show();
653
        $('#form-main #form-name').focus();
1395
        $('#form-main #form-name').focus();
654
    });
1396
    });
655
    /**
1397
    /**
656
     * Clicked cancel new/edit Form
1398
     * Clicked cancel new/edit Form
657
     */
1399
     */
658
    $('button.btn-edit-cancel').click(function(e) {
1400
    $('button.btn-edit-cancel').click(function(e) {
659
        e.preventDefault();
1401
        e.preventDefault();
660
        $('#row-edit').hide();
1402
        $('#row-edit').hide();
661
        $('#row-reviews').show();
1403
        $('#row-forms').show();
662
    });
1404
    });
663
    /**
1405
    /**
664
     * Clicked save and continue new Form
1406
     * Clicked save and continue new Form
665
     */
1407
     */
666
    $('button.btn-form-save-continue').click(function(e) {
1408
    $('button.btn-form-save-continue').click(function(e) {
Línea 730... Línea 1472...
730
<!-- Content Header (Page header) -->
1472
<!-- Content Header (Page header) -->
731
<section class="content-header">
1473
<section class="content-header">
732
    <div class="container-fluid">
1474
    <div class="container-fluid">
733
        <div class="row mb-2">
1475
        <div class="row mb-2">
734
            <div class="col-sm-12">
1476
            <div class="col-sm-12">
735
                <h1>LABEL_REVIEWS</h1>
1477
                <h1>LABEL_SELF_EVALUATION_FORMS</h1>
736
            </div>
1478
            </div>
737
        </div>
1479
        </div>
738
    </div>
1480
    </div>
739
    <!-- /.container-fluid -->
1481
    <!-- /.container-fluid -->
740
</section>
1482
</section>
741
<section class="content">
1483
<section class="content">
742
    <div class="container-fluid" id="row-reviews">
1484
    <div class="container-fluid" id="row-forms">
743
        <div class="row">
1485
        <div class="row">
744
            <div class="col-12">
1486
            <div class="col-12">
745
                <div class="card">
1487
                <div class="card">
746
                    <div class="card-body">
1488
                    <div class="card-body">
747
                        <table id="gridTable" class="table   table-hover">
1489
                        <table id="gridTable" class="table   table-hover">
748
                            <thead>
1490
                            <thead>
749
                                <tr>
1491
                                <tr>
750
                                <th>LABEL_USER</th>
-
 
751
                                    <th>LABEL_NAME</th>
1492
                                    <th>LABEL_NAME</th>
752
                                    <th>LABEL_LANGUAGE</th>
1493
                                    <th>LABEL_LANGUAGE</th>
753
                                    <th>LABEL_STATUS</th>
1494
                                    <th>LABEL_ACTIVE</th>
754
                                    <th>LABEL_ACTIONS</th>
1495
                                    <th>LABEL_ACTIONS</th>
755
                                </tr>
1496
                                </tr>
756
                            </thead>
1497
                            </thead>
757
                            <tbody></tbody>
1498
                            <tbody></tbody>
758
                        </table>
1499
                        </table>
Línea 823... Línea 1564...
823
        </div>
1564
        </div>
824
    </div>
1565
    </div>
Línea 825... Línea 1566...
825
 
1566
 
Línea -... Línea 1567...
-
 
1567
    <!-- Create/Edit Form-->
-
 
1568
 
-
 
1569
    <!-- Section Modal -->
-
 
1570
    <div  id="modal-section" class="modal" tabindex="-1" role="dialog">
-
 
1571
        <div class="modal-dialog modal-lg" role="document">
-
 
1572
            <form action="#" name="form-section" id="form-section">
-
 
1573
                <input type="hidden" name="section-slug" id="section-slug" value="" />
-
 
1574
                <div class="modal-content">
-
 
1575
                    <div class="modal-header">
-
 
1576
                        <h4 class="modal-title">LABEL_ADD LABEL_SECTION</h4>
-
 
1577
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
-
 
1578
                            <span aria-hidden="true">&times;</span>
-
 
1579
                        </button>
-
 
1580
                    </div>
-
 
1581
                    <div class="modal-body">
-
 
1582
                        <div class="form-group">
-
 
1583
                            <label for="section-name">LABEL_FIRST_NAME</label>
-
 
1584
                            <input type="text" name="section-name" id="section-name" class="form-control" maxlength="50" value="" />
-
 
1585
                        </div>
-
 
1586
                        <div class="form-group">
-
 
1587
                            <label for="section-text">LABEL_TEXT</label>
-
 
1588
                            <!--  ckeditor -->
-
 
1589
                            <textarea  name="section-text" id="section-text" rows="5" class="ckeditor form-control"></textarea>
-
 
1590
                        </div>
-
 
1591
                        <div class="form-group">
-
 
1592
                            <label for="section-value">LABEL_VALUE</label>
-
 
1593
                            <input type="text" name="section-value" id="section-value"  class="form-control" value="0" />
-
 
1594
                        </div>
-
 
1595
                    </div>
-
 
1596
                    <div class="modal-footer">
-
 
1597
                        <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
-
 
1598
                        <button type="button" class="btn btn-secondary" data-dismiss="modal">LABEL_CLOSE</button>
-
 
1599
                    </div>
-
 
1600
                </div>
-
 
1601
            </form>
-
 
1602
        </div>
-
 
1603
    </div>
-
 
1604
    <!-- End Modal Section -->
-
 
1605
 
-
 
1606
    <!-- Question Modal -->
-
 
1607
 
-
 
1608
    <div  id="modal-question" class="modal" tabindex="-1" role="dialog">
-
 
1609
        <div class="modal-dialog modal-lg" role="document">
-
 
1610
            <form action="#" name="form-question" id="form-question">
-
 
1611
                <input type="hidden" name="question-section" id="question-section" />
-
 
1612
                <input type="hidden" name="question-slug" id="question-slug" />
-
 
1613
                <div class="modal-content">
-
 
1614
                    <div class="modal-header">
-
 
1615
                        <h4 class="modal-title">LABEL_ADD LABEL_QUESTION</h4>
-
 
1616
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
-
 
1617
                            <span aria-hidden="true">&times;</span>
-
 
1618
                        </button>
-
 
1619
                    </div>
-
 
1620
                    <div class="modal-body">
-
 
1621
                        <div class="form-group">
-
 
1622
                            <label for="question-text">LABEL_TEXT</label>
-
 
1623
                            <!--  ckeditor -->
-
 
1624
                            <textarea  name="question-text" id="question-text" rows="5" class="ckeditor form-control"></textarea>
-
 
1625
                        </div>
-
 
1626
                        <div class="form-group">
-
 
1627
                            <label for="question-value">LABEL_VALUE</label>
-
 
1628
                            <input type="text" name="question-value" id="question-value"  class="form-control" />
-
 
1629
                        </div>
-
 
1630
                        <div class="form-group">
-
 
1631
                            <label for="question-type">LABEL_TYPE</label>
-
 
1632
                            <select name="question-type" id="question-type" class="form-control">
-
 
1633
                                <option value="open">LABEL_OPEN</option>
-
 
1634
                                <option value="simple">Simple</option>
-
 
1635
                                <option value="multiple">Multiple</option>
-
 
1636
                                <option value="rating-open">LABEL_RATING_OPEN</option>
-
 
1637
                                <option value="rating-range">LABEL_RATING_RANGE</option>
-
 
1638
                            </select>
-
 
1639
                        </div>
-
 
1640
                        <div class="form-group">
-
 
1641
                            <label for="question-max-length">LABEL_MAXLENGTH</label>
-
 
1642
                            <input type="text" name="question-max-length" id="question-max-length"  class="form-control" />
-
 
1643
                        </div>
-
 
1644
                        <div class="form-group">
-
 
1645
                            <label for="question-multiline">LABEL_MULTI_LINE</label>
-
 
1646
                            <select name="question-multiline" id="question-multiline" class="form-control">
-
 
1647
                                <option value="1">LABEL_YES</option>
-
 
1648
                                <option value="0">LABEL_NOT</option>
-
 
1649
                            </select>
-
 
1650
                        </div>
-
 
1651
                        <div class="form-group">
-
 
1652
                            <label for="question-range">LABEL_RANGE</label>
-
 
1653
                            <select name="question-range" id="question-range" class="form-control">
-
 
1654
                                <option value="10">1-10</option>
-
 
1655
                                <option value="6">1-6</option>
-
 
1656
                                <option value="5">1-5</option>
-
 
1657
                            </select>
-
 
1658
                        </div>
-
 
1659
                    </div>
-
 
1660
                    <div class="modal-footer">
-
 
1661
                        <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
-
 
1662
                        <button type="button" class="btn btn-secondary" data-dismiss="modal">LABEL_CLOSE</button>
-
 
1663
                    </div>
-
 
1664
                </div>
-
 
1665
            </form>
Línea -... Línea 1666...
-
 
1666
        </div>
826
    <!-- Create/Edit Form-->
1667
    </div>
-
 
1668
 
-
 
1669
    <!-- End Modal Question -->
-
 
1670
 
-
 
1671
    <!-- Modal Options -->
-
 
1672
 
-
 
1673
    <div  id="modal-option" class="modal" tabindex="-1" role="dialog">
-
 
1674
        <div class="modal-dialog modal-lg" role="document">
-
 
1675
            <form action="#" name="form-option" id="form-option">
-
 
1676
                <input type="hidden" name="option-section" id="option-section" value="" />
-
 
1677
                <input type="hidden" name="option-question" id="option-question" value="" />
-
 
1678
                <input type="hidden" name="option-slug" id="option-slug" value="" />
-
 
1679
                <div class="modal-content">
-
 
1680
                    <div class="modal-header">
-
 
1681
                        <h4 class="modal-title">LABEL_OPTION</h4>
-
 
1682
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
-
 
1683
                            <span aria-hidden="true">&times;</span>
-
 
1684
                        </button>
-
 
1685
                    </div>
-
 
1686
                    <div class="modal-body">
-
 
1687
                        <div class="form-group">
-
 
1688
                            <label for="option-text">LABEL_TEXT</label>
-
 
1689
                            <!--  ckeditor -->
-
 
1690
                            <textarea  name="option-text" id="option-text" rows="5" class="ckeditor form-control"></textarea>
-
 
1691
                        </div>
-
 
1692
                        <div class="form-group">
-
 
1693
                            <label for="option-correct">LABEL_ANSWER_CORRECT</label>
-
 
1694
                            <select name="option-correct" id="option-correct" class="form-control">
-
 
1695
                                <option value="1">LABEL_YES</option>
-
 
1696
                                <option value="0">LABEL_NOT</option>
-
 
1697
                            </select>
-
 
1698
                        </div>
-
 
1699
                        <div class="form-group">
-
 
1700
                            <label for="option-value">LABEL_VALUE</label>
-
 
1701
                            <input type="text" name="option-value" id="option-value" class="form-control" />
-
 
1702
                        </div>
-
 
1703
                    </div>
-
 
1704
                    <div class="modal-footer">
-
 
1705
                        <button type="submit" class="btn btn-primary">LABEL_SAVE</button>
-
 
1706
                        <button type="button" class="btn btn-secondary" data-dismiss="modal">LABEL_CLOSE</button>
-
 
1707
                    </div>
-
 
1708
                </div>
Línea 827... Línea -...
827
 
-
 
-
 
1709
            </form>
Línea 828... Línea 1710...
828
 
1710
        </div>
829
  
1711
    </div>
830
 
1712
 
831
 
1713
    <!-- End Modal Options -->