Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 7033 Rev 7035
Línea 86... Línea 86...
86
      </Modal.Header>
86
      </Modal.Header>
87
      <Modal.Body>
87
      <Modal.Body>
88
        <Form onSubmit={onSubmit}>
88
        <Form onSubmit={onSubmit}>
89
          <Form.Group>
89
          <Form.Group>
90
            <Form.Label>{labels.category}</Form.Label>
90
            <Form.Label>{labels.category}</Form.Label>
91
            <Form.Control as="select">
91
            <Form.Control as="select" ref={register} name="category_id">
92
              {categories.map(({ name, uuid }) => (
92
              {categories.map(({ name, uuid }) => (
93
                <option key={uuid}>{name}</option>
93
                <option key={uuid}>{name}</option>
94
              ))}
94
              ))}
95
            </Form.Control>
95
            </Form.Control>
96
            {errors.description && (
96
            {errors.description && (
Línea 98... Línea 98...
98
            )}
98
            )}
99
          </Form.Group>
99
          </Form.Group>
Línea 100... Línea 100...
100
 
100
 
101
          <Form.Group>
101
          <Form.Group>
102
            <Form.Label>{labels.title}</Form.Label>
102
            <Form.Label>{labels.title}</Form.Label>
103
            <Form.Control type="text" />
103
            <Form.Control type="text" name="title" ref={register} />
104
            {errors.description && (
104
            {errors.description && (
105
              <FormErrorFeedback>{labels.error_field_empty}</FormErrorFeedback>
105
              <FormErrorFeedback>{labels.error_field_empty}</FormErrorFeedback>
106
            )}
106
            )}
Línea 107... Línea 107...
107
          </Form.Group>
107
          </Form.Group>
108
 
108
 
109
          <CKEditor
109
          <CKEditor
110
            onChange={(e) => setValue('description', e.editor.getData())}
110
            onChange={(e) => setValue('description', e.editor.getData())}
111
            onInstanceReady={(e) => e.editor.setData(watch('description'))}
111
            onInstanceReady={(e) => e.editor.setData(getValues('description'))}
112
            config={CKEDITOR_OPTIONS}
112
            config={CKEDITOR_OPTIONS}
113
          />
113
          />
114
          {errors.description && (
114
          {errors.description && (
Línea 115... Línea 115...
115
            <FormErrorFeedback>{labels.error_field_empty}</FormErrorFeedback>
115
            <FormErrorFeedback>{labels.error_field_empty}</FormErrorFeedback>
116
          )}
116
          )}
117
 
117
 
118
          <Button variant="primary" type="submit">
118
          <Button variant="primary" type="submit">
119
            {labels.accept}
119
            {labels.accept}
120
          </Button>
120
          </Button>
121
          <Button className="btn-secondary" onClick={onClose}>
121
          <Button className="btn-secondary mt-3" onClick={onClose}>
122
            {labels.accept}
122
            {labels.cancel}
123
          </Button>
123
          </Button>
124
        </Form>
124
        </Form>