Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 16269 Rev 16272
Línea 12... Línea 12...
12
  timezones = {},
12
  timezones = {},
13
  zoomUrl = "",
13
  zoomUrl = "",
14
  onClose = () => null,
14
  onClose = () => null,
15
  onCreate = () => null,
15
  onCreate = () => null,
16
}) => {
16
}) => {
17
  const { handleSubmit, register, errors } = useForm();
-
 
18
 
-
 
19
  return (
17
  return (
20
    <Modal show={isShow} onHide={onClose}>
18
    <Modal show={isShow} onHide={onClose}>
21
      <Modal.Header closeButton>
19
      <Modal.Header closeButton>
22
        <Modal.Title>Crear Conferencia</Modal.Title>
20
        <Modal.Title>Crear Conferencia</Modal.Title>
23
      </Modal.Header>
21
      </Modal.Header>
24
      <Modal.Body>
22
      <Modal.Body>
25
        <form onSubmit={handleSubmit} autoComplete="new-password">
23
        <form autoComplete="new-password">
26
          <div className="form-group">
24
          <div className="form-group">
27
            <label htmlFor="first_name">Título</label>
25
            <label htmlFor="first_name">Título</label>
28
            <input
26
            <input
29
              type="text"
27
              type="text"
30
              name="title"
28
              name="title"
31
              className="form-control"
29
              className="form-control"
32
              maxLength={128}
30
              maxLength={128}
33
              ref={register({ required: "Por favor ingrese un título" })}
-
 
34
            />
31
            />
35
            {errors.title && (
-
 
36
              <FormErrorFeedback>{errors.title.message}</FormErrorFeedback>
-
 
37
            )}
-
 
38
          </div>
32
          </div>
39
          <div className="form-group">
33
          <div className="form-group">
40
            <label htmlFor="first_name">Descripción</label>
34
            <label htmlFor="first_name">Descripción</label>
41
            <input
-
 
42
              type="text"
-
 
43
              name="description"
-
 
44
              className="form-control"
35
            <input type="text" name="description" className="form-control" />
45
              ref={register({ required: "Por favor ingrese una descripción" })}
-
 
46
            />
-
 
47
            {errors.description && (
-
 
48
              <FormErrorFeedback>
-
 
49
                {errors.description.message}
-
 
50
              </FormErrorFeedback>
-
 
51
            )}
-
 
52
          </div>
36
          </div>
53
          <div className="form-group">
37
          <div className="form-group">
54
            <label htmlFor="timezone">Tipo de conferencia</label>
38
            <label htmlFor="timezone">Tipo de conferencia</label>
55
            <select name="type" className="form-control" ref={register}>
39
            <select name="type" className="form-control">
56
              <option value="i">Inmediata</option>
40
              <option value="i">Inmediata</option>
57
              <option value="s">Programada</option>
41
              <option value="s">Programada</option>
58
            </select>
42
            </select>
59
          </div>
43
          </div>
60
          <div className="form-group">
44
          <div className="form-group">
61
            <label htmlFor="timezone">Zona horaria</label>
45
            <label htmlFor="timezone">Zona horaria</label>
62
            <select
-
 
63
              className="form-control"
46
            <select className="form-control" name="timezone">
64
              name="timezone"
-
 
65
              ref={register({ required: "Por favor elige una Zona horaria" })}
-
 
66
            >
-
 
67
              <option value="" hidden>
47
              <option value="" hidden>
68
                Zona horaria
48
                Zona horaria
69
              </option>
49
              </option>
70
              {Object.entries(timezones).map(([key, value]) => (
50
              {Object.entries(timezones).map(([key, value]) => (
71
                <option value={key} key={key}>
51
                <option value={key} key={key}>
72
                  {value}
52
                  {value}
73
                </option>
53
                </option>
74
              ))}
54
              ))}
75
            </select>
55
            </select>
76
            {errors.timezone && (
-
 
77
              <FormErrorFeedback>{errors.timezone.message}</FormErrorFeedback>
-
 
78
            )}
-
 
79
          </div>
56
          </div>
80
          <div className="form-group">
57
          <div className="form-group">
81
            <label htmlFor="timezone">Duración</label>
58
            <label htmlFor="timezone">Duración</label>
82
            <select className="form-control" name="duration" ref={register}>
59
            <select className="form-control" name="duration">
83
              <option value={5}>5-min</option>
60
              <option value={5}>5-min</option>
84
              <option value={10}>10-min</option>
61
              <option value={10}>10-min</option>
85
              <option value={15}>15-min</option>
62
              <option value={15}>15-min</option>
86
              <option value={20}>20-min</option>
63
              <option value={20}>20-min</option>
87
              <option value={25}>25-min</option>
64
              <option value={25}>25-min</option>
Línea 91... Línea 68...
91
              <option value={45}>45-min</option>
68
              <option value={45}>45-min</option>
92
            </select>
69
            </select>
93
          </div>
70
          </div>
94
          <div className="form-group">
71
          <div className="form-group">
95
            <label htmlFor="first_name">Contraseña de ingreso</label>
72
            <label htmlFor="first_name">Contraseña de ingreso</label>
96
            <input
-
 
97
              type="password"
-
 
98
              name="password"
-
 
99
              className="form-control"
-
 
100
              ref={register({
-
 
101
                required: "Por favor ingrese una contraseña",
-
 
102
                maxLength: {
-
 
103
                  value: 6,
-
 
104
                  message: "La contraseña debe tener al menos 6 digitos",
-
 
105
                },
-
 
106
              })}
-
 
107
            />
-
 
108
            {errors.password && (
-
 
109
              <FormErrorFeedback>{errors.password.message}</FormErrorFeedback>
73
            <input type="password" name="password" className="form-control" />
110
            )}
-
 
111
          </div>
74
          </div>
112
          <button className="btn btn-primary" type="submit">
75
          <button className="btn btn-primary" type="submit">
113
            Crear
76
            Crear
114
          </button>
77
          </button>
115
        </form>
78
        </form>