Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 332 Rev 333
Línea 7... Línea 7...
7
    const { question, backendVars } = props;
7
    const { question, backendVars } = props;
Línea 8... Línea 8...
8
 
8
 
9
    return (
9
    return (
10
        <div className="col-md-12 col-sm-12 col-xs-12 np-padding">
10
        <div className="col-md-12 col-sm-12 col-xs-12 np-padding">
11
            <div className="form-group" >
11
            <div className="form-group" >
12
                <h6>{backendVars.LBL_QUESTION} #{question.position+1}</h6>
12
                <h6>{backendVars.LBL_QUESTION} #{question.position + 1}</h6>
13
                <div
13
                <div
14
                    dangerouslySetInnerHTML={{ __html: question.text }}
14
                    dangerouslySetInnerHTML={{ __html: question.text }}
15
                    className="title"
15
                    className="title"
16
                />
16
                />
Línea 21... Línea 21...
21
                        <textarea
21
                        <textarea
22
                            className="form-control"
22
                            className="form-control"
23
                            rows="5"
23
                            rows="5"
24
                            maxLength={question.maxlength}
24
                            maxLength={question.maxlength}
25
                            name={question.slug_question}
25
                            name={question.slug_question}
26
                            id={question.slug_question}
-
 
27
                        ></textarea>
26
                        ></textarea>
28
                    ) : (
27
                    ) : (
29
                        <input
28
                        <input
30
                            type="text"
29
                            type="text"
31
                            className="form-control"
30
                            className="form-control"
32
                            maxLength={question.maxlength}
31
                            maxLength={question.maxlength}
33
                            name={question.slug_question}
32
                            name={question.slug_question} />
34
                            id={question.slug_question} />
-
 
35
                    )}
33
                    )}
36
                </div>
34
                </div>
37
            }
35
            }
38
            {question.type == 'rating-range' &&
36
            {question.type == 'rating-range' &&
39
                <div className="form-group">
37
                <div className="form-group">
40
                    {Array.apply(0, Array(question.range)).map((_, i) => {
38
                    {[...Array(question.range)].map((x, i) => {
41
                        return (
39
                        return (
42
                            <div className="radio radio-inline">
40
                            <div className="checkbox"
43
 
-
 
-
 
41
                                key={i}>
44
                                <input
42
                                <input
45
                                    key={i}
-
 
46
                                    type="radio"
43
                                    type="radio"
47
                                    name={question.slug_question}
44
                                    name={question.slug_question}
48
                                    id={question.slug_question}
-
 
49
                                    value={i} />
45
                                    value={i} />
-
 
46
                                <div className="option">
50
                                {i}
47
                                    {i}
51
 
-
 
-
 
48
                                </div>
52
                            </div>
49
                            </div>
53
                        )
50
                        )
54
                    })}
51
                    })}
55
                </div>
52
                </div>
56
            }
53
            }
57
            { (question.type == 'simple' || question.type == 'rating-open' || question.type == 'multiple') &&
54
            {(question.type == 'simple' || question.type == 'rating-open' || question.type == 'multiple') &&
58
                <div className="form-group">
55
                <div className="form-group">
59
                    {question.options.length > 0 &&
56
                    {question.options.length > 0 &&
60
                        <Option question={question} />
57
                        <Option question={question} />
61
                    }
58
                    }
62
                </div>
59
                </div>
63
            }
60
            }
64
 
-
 
65
        </div>
61
        </div>
66
 
-
 
67
 
-
 
68
    )
62
    )
69
}
63
}
Línea 70... Línea 64...
70
 
64
 
71
export default Question;
65
export default Question;