Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 308 Rev 310
Línea 1... Línea 1...
1
import React from "react";
1
import React from "react";
2
import Option from "../option/Option";
2
import Option from "../option/Option";
Línea 3... Línea 3...
3
 
3
 
4
const Question = (props) => {
4
const Question = (props) => {
5
    
5
 
6
    // get props
6
    // get props
Línea 7... Línea 7...
7
    const { question } = props;
7
    const { question } = props;
-
 
8
 
8
 
9
    return (
9
    return (
10
        <div className="col-md-12 col-sm-12 col-xs-12">
10
        <div className="form-group" >
11
            <div className="form-group" >
11
            <div
12
                <div
-
 
13
                    dangerouslySetInnerHTML={{ __html: question.text }}
12
                dangerouslySetInnerHTML={{ __html: question.text }}
14
                    className="title"
13
                className="description"
15
                />
14
            ></div>
16
            </div>
15
            {question.type == 'open' &&
17
            {question.type == 'open' &&
16
                <div>
18
                <div className="form-group">
17
                    {question.multiline == 1 ? (
19
                    {question.multiline == 1 ? (
18
                        <textarea
20
                        <textarea
19
                            className="form-control"
21
                            className="form-control"
Línea 31... Línea 33...
31
                            id={question.slug_question} />
33
                            id={question.slug_question} />
32
                    )}
34
                    )}
33
                </div>
35
                </div>
34
            }
36
            }
35
            {question.type == 'rating-range' &&
37
            {question.type == 'rating-range' &&
36
                <div>
38
                <div className="form-group">
37
                    {Array.apply(0, Array(question.range)).map((_, i) => {
39
                    {Array.apply(0, Array(question.range)).map((_, i) => {
38
                        return (
40
                        return (
39
                            <div className="radio radio-inline">
41
                            <div className="radio radio-inline">
Línea 40... Línea 42...
40
 
42
 
Línea 49... Línea 51...
49
                            </div>
51
                            </div>
50
                        )
52
                        )
51
                    })}
53
                    })}
52
                </div>
54
                </div>
53
            }
55
            }
54
            {question.type == 'simple' || question.type == 'rating-open' || question.type=='multiple' &&
56
            {question.type == 'simple' || question.type == 'rating-open' || question.type == 'multiple' &&
55
                <div>
57
                <div className="form-group">
56
                    {question.options.length <= 0 &&
58
                    {question.options.length <= 0 &&
57
                        <Option question={question} />
59
                        <Option question={question} />
Línea 58... Línea 60...
58
 
60
 
59
                    }
61
                    }
60
                </div>
62
                </div>
-
 
63
            }
61
            }
64
 
Línea -... Línea 65...
-
 
65
        </div>
62
        </div>
66
 
63
 
67
 
Línea 64... Línea 68...
64
    )
68
    )
65
}
69
}