deps: react-bootstrap 0.31 -> 2 (Bootstrap 5 CSS deferred as debt)
Removes the largest batch of React-19-blocking warnings: the 0.31 components (Grid, FormGroup, ControlLabel, Navbar.Header/Brand, Checkbox, SafeAnchor) all leaned on legacy context / defaultProps. 29 files converted: Grid->Container, FormGroup/ControlLabel/FormControl/ HelpBlock -> Form.Group/Label/Control/Text, Checkbox -> Form.Check (label as prop), bsStyle->variant (default->secondary), bsSize->size, pull-right->float-end. Custom Col.js now re-exports v2's Col; custom NavItem.js rewritten self-contained (no SafeAnchor/createChainedFunction); Navigation.js drops react-bootstrap Navbar (raw markup anyway). CSS stays on Bootstrap 4 (alexwine:bootstrap-4) for now: the BS4->5 jump is entangled with the jQuery carousel/swipe + navbar-collapse and is tracked as separate debt in UPGRADE.md. Only .form-label needed a shim (forms.scss). Browser-verified home carousel+navbar, signup form + terms checkbox, login form; REST smoke byte-identical.
This commit is contained in:
parent
12bdbe8fed
commit
a1a1b9a801
30 changed files with 539 additions and 333 deletions
|
|
@ -2,7 +2,7 @@
|
|||
/* eslint-disable import/no-absolute-path */
|
||||
|
||||
import React from 'react';
|
||||
import { Row, FormGroup, ControlLabel, Button, Checkbox } from 'react-bootstrap';
|
||||
import { Row, Form, Button } from 'react-bootstrap';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
|
|
@ -152,39 +152,39 @@ class Signup extends React.Component {
|
|||
<form ref={form => (this.form = form)} onSubmit={event => event.preventDefault()}>
|
||||
<Row>
|
||||
<Col xs={6}>
|
||||
<FormGroup>
|
||||
<ControlLabel>{t('Nombre')}</ControlLabel>
|
||||
<Form.Group>
|
||||
<Form.Label>{t('Nombre')}</Form.Label>
|
||||
<input
|
||||
type="text"
|
||||
name="firstName"
|
||||
ref={firstName => (this.firstName = firstName)}
|
||||
className="form-control"
|
||||
/>
|
||||
</FormGroup>
|
||||
</Form.Group>
|
||||
</Col>
|
||||
<Col xs={6}>
|
||||
<FormGroup>
|
||||
<ControlLabel>{t('Apellidos')}</ControlLabel>
|
||||
<Form.Group>
|
||||
<Form.Label>{t('Apellidos')}</Form.Label>
|
||||
<input
|
||||
type="text"
|
||||
name="lastName"
|
||||
ref={lastName => (this.lastName = lastName)}
|
||||
className="form-control"
|
||||
/>
|
||||
</FormGroup>
|
||||
</Form.Group>
|
||||
</Col>
|
||||
</Row>
|
||||
<FormGroup>
|
||||
<ControlLabel>{t('Correo electrónico')}</ControlLabel>
|
||||
<Form.Group>
|
||||
<Form.Label>{t('Correo electrónico')}</Form.Label>
|
||||
<input
|
||||
type="email"
|
||||
name="emailAddress"
|
||||
ref={emailAddress => (this.emailAddress = emailAddress)}
|
||||
className="form-control"
|
||||
/>
|
||||
</FormGroup>
|
||||
<FormGroup>
|
||||
<ControlLabel>{t('Contraseña')}</ControlLabel>
|
||||
</Form.Group>
|
||||
<Form.Group>
|
||||
<Form.Label>{t('Contraseña')}</Form.Label>
|
||||
<input
|
||||
type="password"
|
||||
name="password"
|
||||
|
|
@ -192,12 +192,17 @@ class Signup extends React.Component {
|
|||
className="form-control"
|
||||
/>
|
||||
<InputHint>{t('Usa al menos seis caracteres.')}</InputHint>
|
||||
</FormGroup>
|
||||
<Checkbox inline={false} name="tos" defaultChecked={this.state.termsAccept} onClick={e => this.setTermsAccept(e.target.checked)}>
|
||||
<Trans className="mark-checkbox" parent="span" i18nKey="termsAccept">Acepto las <a target="_blank" href="/terms">condiciones de servicio</a> de este sitio</Trans>
|
||||
</Checkbox>
|
||||
</Form.Group>
|
||||
<Form.Check
|
||||
type="checkbox"
|
||||
id="tos"
|
||||
name="tos"
|
||||
defaultChecked={this.state.termsAccept}
|
||||
onClick={e => this.setTermsAccept(e.target.checked)}
|
||||
label={<Trans className="mark-checkbox" parent="span" i18nKey="termsAccept">Acepto las <a target="_blank" href="/terms">condiciones de servicio</a> de este sitio</Trans>}
|
||||
/>
|
||||
|
||||
<Button id={testId('signUpSubmit')} type="submit" disabled={!this.state.termsAccept} bsStyle="success">{t('Registrarse')}</Button>
|
||||
<Button id={testId('signUpSubmit')} type="submit" disabled={!this.state.termsAccept} variant="success">{t('Registrarse')}</Button>
|
||||
<AccountPageFooter>
|
||||
<p>{t('¿Ya tienes un cuenta?')} <Link to={{ pathname: '/login', state: this.state }} >{t('Iniciar sesión')}</Link>.</p>
|
||||
</AccountPageFooter>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue