import Modal from '../../common/components/Modal'; import Button from '../../common/components/Button'; import extractText from '../../common/utils/extractText'; import Stream from '../../common/utils/Stream'; /** * The `ForgotPasswordModal` component displays a modal which allows the user to * enter their email address and request a link to reset their password. * * ### Attrs * * - `email` */ export default class ForgotPasswordModal extends Modal { oninit(vnode) { super.oninit(vnode); /** * The value of the email input. * * @type {Function} */ this.email = Stream(this.attrs.email || ''); /** * Whether or not the password reset email was sent successfully. * * @type {Boolean} */ this.success = false; } className() { return 'ForgotPasswordModal Modal--small'; } title() { return app.translator.trans('core.forum.forgot_password.title'); } content() { if (this.success) { return (
{app.translator.trans('core.forum.forgot_password.email_sent_message')}
{app.translator.trans('core.forum.forgot_password.text')}