More work with titles & descriptions
This commit is contained in:
parent
a1138c8c43
commit
464af6b9d1
21 changed files with 178 additions and 51 deletions
|
|
@ -5,6 +5,7 @@ import PropTypes from 'prop-types';
|
|||
import { Link } from 'react-router-dom';
|
||||
import { Accounts } from 'meteor/accounts-base';
|
||||
import { Bert } from 'meteor/themeteorchef:bert';
|
||||
import { Helmet } from 'react-helmet';
|
||||
import AccountPageFooter from '../../components/AccountPageFooter/AccountPageFooter';
|
||||
import validate from '../../../modules/validate';
|
||||
import { translate } from 'react-i18next';
|
||||
|
|
@ -24,16 +25,16 @@ class RecoverPassword extends React.Component {
|
|||
rules: {
|
||||
emailAddress: {
|
||||
required: true,
|
||||
email: true,
|
||||
},
|
||||
email: true
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
emailAddress: {
|
||||
required: this.t("Necesitamos un correo aquí."),
|
||||
email: this.t("¿Es este correo correcto?"),
|
||||
},
|
||||
required: this.t('Necesitamos un correo aquí.'),
|
||||
email: this.t('¿Es este correo correcto?')
|
||||
}
|
||||
},
|
||||
submitHandler() { component.handleSubmit(); },
|
||||
submitHandler() { component.handleSubmit(); }
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -46,7 +47,7 @@ class RecoverPassword extends React.Component {
|
|||
if (error) {
|
||||
Bert.alert(T9n.get(`error.accounts.${error.reason}`), 'danger');
|
||||
} else {
|
||||
Bert.alert(t("checkResetEmail", {email: email}), 'success');
|
||||
Bert.alert(t('checkResetEmail', { email }), 'success');
|
||||
history.push('/login');
|
||||
}
|
||||
});
|
||||
|
|
@ -55,14 +56,17 @@ class RecoverPassword extends React.Component {
|
|||
render() {
|
||||
return (<div className="RecoverPassword">
|
||||
<Row className="align-items-center justify-content-center">
|
||||
<Helmet>
|
||||
<title>{this.t('AppName')}: {this.t('Recupera tu contraseña')}</title>
|
||||
</Helmet>
|
||||
<Col xs={12} sm={6} md={5} lg={4}>
|
||||
<h4 className="page-header">{this.t("Recupera tu contraseña")}</h4>
|
||||
<h4 className="page-header">{this.t('Recupera tu contraseña')}</h4>
|
||||
<Alert bsStyle="info">
|
||||
{this.t("Introduce tu correo abajo para recibir un enlace para resetear tu contraseña.")}
|
||||
{this.t('Introduce tu correo abajo para recibir un enlace para resetear tu contraseña.')}
|
||||
</Alert>
|
||||
<form ref={form => (this.form = form)} onSubmit={event => event.preventDefault()}>
|
||||
<FormGroup>
|
||||
<ControlLabel>{this.t("Correo electrónico")}</ControlLabel>
|
||||
<ControlLabel>{this.t('Correo electrónico')}</ControlLabel>
|
||||
<input
|
||||
type="email"
|
||||
name="emailAddress"
|
||||
|
|
@ -70,9 +74,9 @@ class RecoverPassword extends React.Component {
|
|||
className="form-control"
|
||||
/>
|
||||
</FormGroup>
|
||||
<Button type="submit" bsStyle="success">{this.t("Recupera tu contraseña")}</Button>
|
||||
<Button type="submit" bsStyle="success">{this.t('Recupera tu contraseña')}</Button>
|
||||
<AccountPageFooter>
|
||||
<p>{this.t("¿Recuerdas tu contraseña?")} <Link to="/login">{this.t("Iniciar sesión")}</Link>.</p>
|
||||
<p>{this.t('¿Recuerdas tu contraseña?')} <Link to="/login">{this.t('Iniciar sesión')}</Link>.</p>
|
||||
</AccountPageFooter>
|
||||
</form>
|
||||
</Col>
|
||||
|
|
@ -82,7 +86,7 @@ class RecoverPassword extends React.Component {
|
|||
}
|
||||
|
||||
RecoverPassword.propTypes = {
|
||||
history: PropTypes.object.isRequired,
|
||||
history: PropTypes.object.isRequired
|
||||
};
|
||||
|
||||
export default translate([], { wait: true })(RecoverPassword);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue