Source code for dazzler.components.auth._login

"""Autogenerated file: DO NOT EDIT!"""
import typing  # noqa: F401
from dazzler.system import Component, Aspect, UNDEFINED  # noqa: F401


[docs]class Login(Component): """ A login form to include on dazzler pages. :CSS: - ``dazzler-auth-login`` - ``login-field`` - ``login-label`` - ``login-input`` - ``login-username`` - ``login-password`` - ``login-button`` """ login_url = Aspect(required=True, docstring="The url to perform login.") next_url = Aspect(docstring="Redirect to this page after login.") method = Aspect(default='POST', docstring="Method to submit the login form. (default='POST')") # noqa: E501 username_label = Aspect(default='Username', docstring="The label to show before the. (default='Username')") # noqa: E501 password_label = Aspect(default='Password', docstring="Label to replace the password. (default='Password')") # noqa: E501 submit_label = Aspect(default='Login', docstring="Label for the submit button. (default='Login')") # noqa: E501 horizontal = Aspect(docstring="Style the form with the fields side by side.") # noqa: E501 bordered = Aspect(docstring="Apply a border around the") placeholder_labels = Aspect(docstring="Put the label in placeholder attribute instead of a `<label>` element.") # noqa: E501 header = Aspect(docstring="Included as first child of the form.Wrapped under div with CSS class ``login-header``") # noqa: E501 footer = Aspect(docstring="Included at bottom of the login form.Wrapped under div with CSS class ``login-footer``") # noqa: E501 errors = Aspect(docstring="Form errors") class_name = Aspect(docstring="Class name automatically added by dazzler api with a prefix for the component library.ie: core component Container become ``dazzler-core-container``.When added on the component, the class names will be concatenated.") # noqa: E501 style = Aspect(docstring="Style object for the top level wrapper of the component.") # noqa: E501
[docs] def __init__( self, login_url: str, next_url: typing.Optional[str] = UNDEFINED, method: typing.Optional[str] = 'POST', username_label: typing.Optional[str] = 'Username', password_label: typing.Optional[str] = 'Password', submit_label: typing.Optional[str] = 'Login', horizontal: typing.Optional[bool] = UNDEFINED, bordered: typing.Optional[bool] = UNDEFINED, placeholder_labels: typing.Optional[bool] = UNDEFINED, header: typing.Optional[typing.Any] = UNDEFINED, footer: typing.Optional[typing.Any] = UNDEFINED, errors: typing.Optional[typing.Dict] = UNDEFINED, class_name: typing.Optional[str] = UNDEFINED, style: typing.Optional[typing.Dict] = UNDEFINED, identity: str = None ): """ :param login_url: The url to perform login. :param next_url: Redirect to this page after login. :param method: Method to submit the login form. (default='POST') :param username_label: The label to show before the. (default='Username') :param password_label: Label to replace the password. (default='Password') :param submit_label: Label for the submit button. (default='Login') :param horizontal: Style the form with the fields side by side. :param bordered: Apply a border around the :param placeholder_labels: Put the label in placeholder attribute instead of a `<label>` element. :param header: Included as first child of the form. Wrapped under div with CSS class ``login-header`` :param footer: Included at bottom of the login form. Wrapped under div with CSS class ``login-footer`` :param errors: Form errors :param class_name: Class name automatically added by dazzler api with a prefix for the component library. ie: core component Container become ``dazzler-core-container``. When added on the component, the class names will be concatenated. :param style: Style object for the top level wrapper of the component. """ Component.__init__(self, locals(), identity)