mirror of
https://github.com/flarum/core.git
synced 2025-08-11 10:55:47 +02:00
update: LoginModal
This commit is contained in:
committed by
Franz Liedke
parent
5faab8bdbd
commit
cc91244f1a
@@ -1,3 +1,4 @@
|
|||||||
|
import Stream from 'mithril-stream';
|
||||||
import Modal from '../../common/components/Modal';
|
import Modal from '../../common/components/Modal';
|
||||||
import ForgotPasswordModal from './ForgotPasswordModal';
|
import ForgotPasswordModal from './ForgotPasswordModal';
|
||||||
import SignUpModal from './SignUpModal';
|
import SignUpModal from './SignUpModal';
|
||||||
@@ -15,29 +16,27 @@ import ItemList from '../../common/utils/ItemList';
|
|||||||
* - `password`
|
* - `password`
|
||||||
*/
|
*/
|
||||||
export default class LogInModal extends Modal {
|
export default class LogInModal extends Modal {
|
||||||
init() {
|
oninit(vnode) {
|
||||||
super.init();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The value of the identification input.
|
* The value of the identification input.
|
||||||
*
|
*
|
||||||
* @type {Function}
|
* @type {Function}
|
||||||
*/
|
*/
|
||||||
this.identification = m.prop(this.props.identification || '');
|
this.identification = Stream(vnode.attrs.identification || '');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The value of the password input.
|
* The value of the password input.
|
||||||
*
|
*
|
||||||
* @type {Function}
|
* @type {Function}
|
||||||
*/
|
*/
|
||||||
this.password = m.prop(this.props.password || '');
|
this.password = Stream(vnode.attrs.password || '');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The value of the remember me input.
|
* The value of the remember me input.
|
||||||
*
|
*
|
||||||
* @type {Function}
|
* @type {Function}
|
||||||
*/
|
*/
|
||||||
this.remember = m.prop(!!this.props.remember);
|
this.remember = Stream(!!vnode.attrs.remember);
|
||||||
}
|
}
|
||||||
|
|
||||||
className() {
|
className() {
|
||||||
@@ -105,12 +104,14 @@ export default class LogInModal extends Modal {
|
|||||||
items.add(
|
items.add(
|
||||||
'submit',
|
'submit',
|
||||||
<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.log_in.submit_button'),
|
loading: this.loading,
|
||||||
})}
|
},
|
||||||
|
app.translator.trans('core.forum.log_in.submit_button')
|
||||||
|
)}
|
||||||
</div>,
|
</div>,
|
||||||
-10
|
-10
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user