Reference Source
import SignUpModal from 'flarum/components/SignUpModal'
public class | source

SignUpModal

Extends:

src/common/Component.js~ComponentModal → SignUpModal

The SignUpModal component displays a modal dialog with a singup form.

Attrs

  • username
  • email
  • password
  • token An email token to sign up with.

Member Summary

Public Members
public

The value of the email input.

public
public

The value of the password input.

public

The value of the username input.

Method Summary

Public Methods
public
public
public
public

fields(): *

public
public

isProvided(field: *): *

public

logIn()

Open the log in modal, prefilling it with an email/username/password if the user has entered one.

public

oninit(vnode: *)

public
public

onsubmit(e: *)

public

title(): *

Protected Methods
protected

Get the data that should be submitted in the sign-up request.

Inherited Summary

From class Modal
public static

Determine whether or not the modal should be dismissible via an 'x' button.

public

Attributes for an alert component to show below the header.

public
public abstract

Get the class name to apply to the modal.

public abstract

content(): VirtualElement

Get the content of the modal.

public

hide()

Hide the modal.

public

loaded()

Stop loading.

public
public

oncreate(vnode: *)

public

Show an alert describing an error returned from the API, and give focus to the first relevant field.

public

Focus on the first input when the modal is ready to be used.

public

onsubmit(e: Event)

Handle the modal form's submit event.

public abstract

Get the title of the modal dialog.

public

view(): *

Public Members

public email: Function source

The value of the email input.

public loading: boolean source

Override:

Modal#loading

public password: Function source

The value of the password input.

public username: Function source

The value of the username input.

Public Methods

public body(): undefined[] source

Return:

undefined[]

public className(): string source

Get the class name to apply to the modal.

Override:

Modal#className

Return:

string

public content(): undefined[] source

Get the content of the modal.

Override:

Modal#content

Return:

undefined[]

public fields(): * source

Return:

*

Return:

undefined[]

public isProvided(field: *): * source

Params:

NameTypeAttributeDescription
field *

Return:

*

public logIn() source

Open the log in modal, prefilling it with an email/username/password if the user has entered one.

public oninit(vnode: *) source

Params:

NameTypeAttributeDescription
vnode *

public onready() source

Focus on the first input when the modal is ready to be used.

Override:

Modal#onready

public onsubmit(e: *) source

Handle the modal form's submit event.

Override:

Modal#onsubmit

Params:

NameTypeAttributeDescription
e *

public title(): * source

Get the title of the modal dialog.

Override:

Modal#title

Return:

*

Protected Methods

protected submitData(): Object source

Get the data that should be submitted in the sign-up request.

Return:

Object