Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 359 Rev 360
Línea 6... Línea 6...
6
 
6
 
7
 
7
 
Línea -... Línea 8...
-
 
8
    // get props
-
 
9
    const { section, backendVars, handleAnswer, key } = props;
-
 
10
 
-
 
11
    /**
8
    // get props
12
     * Check if there are questions to answer
-
 
13
     * @returns 
-
 
14
     */
-
 
15
    const validateSection = () => {
-
 
16
        let formValid = true;
-
 
17
        section.questions.map((question) => {
-
 
18
            //Validate if the answer is empty
-
 
19
            if (!question.answer) {
-
 
20
                formValid = false;
-
 
21
            }
Línea 9... Línea 22...
9
    const { section, backendVars, handleAnswer, key } = props;
22
        })
Línea 10... Línea 23...
10
 
23
        return formValid;
11
    console.log(section)
24
    }
Línea 45... Línea 58...
45
                            <div className="col-md-12 text-right">
58
                            <div className="col-md-12 text-right">
46
                                <ul class="pager wizard">
59
                                <ul class="pager wizard">
47
                                    <li class="previous">
60
                                    <li class="previous">
48
                                        <button
61
                                        <button
49
                                            type="button"
62
                                            type="button"
50
                                            className="btn btn-primary"
63
                                            className="btn btn-secondary"
51
                                            disabled={section.position == 0}
64
                                            disabled={section.position == 0}
52
                                        >
65
                                        >
53
                                            {backendVars.LBL_SELF_EVALUATION_TEST_FORM_PREVIOUS}
66
                                            {backendVars.LBL_SELF_EVALUATION_TEST_FORM_PREVIOUS}
54
                                        </button>
67
                                        </button>
55
                                    </li>
68
                                    </li>
56
                                    <li class="next">
69
                                    <li class="next">
57
                                        <button
70
                                        <button
58
                                            type="button"
71
                                            type="button"
-
 
72
                                            disabled={!validateSection}
59
                                            className="btn btn-primary">
73
                                            className="btn btn-secondary">
60
                                            {backendVars.LBL_SELF_EVALUATION_TEST_FORM_NEXT}
74
                                            {backendVars.LBL_SELF_EVALUATION_TEST_FORM_NEXT}
61
                                        </button>
75
                                        </button>
62
                                    </li>
76
                                    </li>
63
                                </ul>
77
                                </ul>
64
                            </div>
78
                            </div>