FormTrait
Forms of the login component.
Requires in the host class:
$this->translator$this->translatorDomain$this->user(Nette\Security\User)$this->userManager
Table of Contents
Methods
- onLoginFormError() : void
- Shows the server-side validation errors. The form is submitted by AJAX and the template prints `$form->errors` inside `loginFormSnippet`, but without a redraw the response carried no snippet and a refused submit (browser validation off or bypassed) ended with no message at all.
- sendActivationEmail() : void
- signInFormSucceededByButton() : void
- createComponentLoginForm() : Form
Methods
onLoginFormError()
Shows the server-side validation errors. The form is submitted by AJAX and the template prints `$form->errors` inside `loginFormSnippet`, but without a redraw the response carried no snippet and a refused submit (browser validation off or bypassed) ended with no message at all.
public
onLoginFormError(Form $form) : void
Outside the modal the component is rendered from the presenter template outside any snippet,
so the presenter page snippet has to be redrawn too (the same as after a successful login,
see Login::registerAuthListeners()).
Parameters
- $form : Form
sendActivationEmail()
public
sendActivationEmail(SubmitButton $button, ArrayHash $values) : void
Parameters
- $button : SubmitButton
- $values : ArrayHash
signInFormSucceededByButton()
public
signInFormSucceededByButton(Form $form, array<string, mixed> $values) : void
Parameters
- $form : Form
- $values : array<string, mixed>
createComponentLoginForm()
protected
createComponentLoginForm() : Form