mirror of
https://github.com/flarum/core.git
synced 2025-08-11 10:55:47 +02:00
update: ForgotPasswordModal
This commit is contained in:
committed by
Franz Liedke
parent
99d79e7571
commit
5faab8bdbd
@@ -1,5 +1,5 @@
|
|||||||
|
import Stream from 'mithril-stream';
|
||||||
import Modal from '../../common/components/Modal';
|
import Modal from '../../common/components/Modal';
|
||||||
import Alert from '../../common/components/Alert';
|
|
||||||
import Button from '../../common/components/Button';
|
import Button from '../../common/components/Button';
|
||||||
import extractText from '../../common/utils/extractText';
|
import extractText from '../../common/utils/extractText';
|
||||||
|
|
||||||
@@ -12,15 +12,13 @@ import extractText from '../../common/utils/extractText';
|
|||||||
* - `email`
|
* - `email`
|
||||||
*/
|
*/
|
||||||
export default class ForgotPasswordModal extends Modal {
|
export default class ForgotPasswordModal extends Modal {
|
||||||
init() {
|
oninit(attrs) {
|
||||||
super.init();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The value of the email input.
|
* The value of the email input.
|
||||||
*
|
*
|
||||||
* @type {Function}
|
* @type {Function}
|
||||||
*/
|
*/
|
||||||
this.email = m.prop(this.props.email || '');
|
this.email = Stream(attrs.email || '');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether or not the password reset email was sent successfully.
|
* Whether or not the password reset email was sent successfully.
|
||||||
@@ -65,17 +63,19 @@ export default class ForgotPasswordModal extends Modal {
|
|||||||
type="email"
|
type="email"
|
||||||
placeholder={extractText(app.translator.trans('core.forum.forgot_password.email_placeholder'))}
|
placeholder={extractText(app.translator.trans('core.forum.forgot_password.email_placeholder'))}
|
||||||
value={this.email()}
|
value={this.email()}
|
||||||
onchange={m.withAttr('value', this.email)}
|
bidi={this.email}
|
||||||
disabled={this.loading}
|
disabled={this.loading}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="Form-group">
|
<div className="Form-group">
|
||||||
{Button.component({
|
{Button.component(
|
||||||
className: 'Button Button--primary Button--block',
|
{
|
||||||
type: 'submit',
|
className: 'Button Button--primary Button--block',
|
||||||
loading: this.loading,
|
type: 'submit',
|
||||||
children: app.translator.trans('core.forum.forgot_password.submit_button'),
|
loading: this.loading,
|
||||||
})}
|
},
|
||||||
|
app.translator.trans('core.forum.forgot_password.submit_button')
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user