org.elements
Contains small helper classes used as abstraction for various templating macros.
Classes
Represents a link rendered in a template. |
|
Implements a qr code link that shows a modal with the QrCode. |
|
Represents a link rendered in a template. |
|
Represents a link rendered in a template. |
Module Contents
- class org.elements.Link(text: str, url: str, classes: Collection[str] | None = None, request_method: str = 'GET', attributes: dict[str, Any] | None = None, active: bool = False, model: Any | None = None, subtitle: str | None = None)[source]
Bases:
_Base
Represents a link rendered in a template.
- __slots__ = ('active', 'attributes', 'classes', 'model', 'request_method', 'subtitle', 'text', 'url')[source]
- __call__(request: ChameleonLayout | CoreRequest, extra_classes: Iterable[str] | None = None) markupsafe.Markup [source]
Renders the element.
- class org.elements.QrCodeLink(text: str, url: str, title: str | None = None, attrs: dict[str, Any] | None = None, traits: Iterable[Trait] | Trait = (), **props: Any)[source]
Bases:
onegov.core.elements.Link
Implements a qr code link that shows a modal with the QrCode. Thu url is sent to the qr endpoint url which generates the image and sends it back.
- class org.elements.DeleteLink(text: str, url: str, confirm: str, yes_button_text: str | None = None, no_button_text: str | None = None, extra_information: str | None = None, redirect_after: str | None = None, request_method: str = 'DELETE', classes: Collection[str] = ('confirm', 'delete-link'), target: str | None = None)[source]
Bases:
Link
Represents a link rendered in a template.
- class org.elements.ConfirmLink(text: str, url: str, confirm: str, yes_button_text: str | None = None, no_button_text: str | None = None, extra_information: str | None = None, redirect_after: str | None = None, request_method: str = 'POST', classes: Collection[str] = ('confirm',))[source]
Bases:
DeleteLink
Represents a link rendered in a template.