Aurora. Uix. Templates. Basic. Actions. Form
(Aurora UIX v0.1.4-rc.8)
Copy Markdown
Provides helpers for managing form actions in Aurora UIX basic templates.
This module defines default header and footer actions for forms, and utilities to
modify or extend these actions. It ensures that forms have consistent action buttons
(such as save) and allows for further customization via the Actions module.
Key Features
- Adds default header and footer actions to form assigns.
- Provides a
save_action/1helper for rendering a save button. - Integrates with
Aurora.Uix.Templates.Basic.Actionsfor action modification.
Key Constraints
- Expects assigns to include an
:auixkey with relevant form action maps. - Designed for use within Phoenix LiveView templates.
Summary
Functions
Renders a save button for the form.
Adds default header and footer actions to the assigns and modifies actions as needed.
Functions
@spec save_action(map()) :: Phoenix.LiveView.Rendered.t()
Renders a save button for the form.
Parameters
assigns(map()) - LiveView assigns containing::auix(map()) - Aurora UIX context with:moduleand:name.
Returns
Rendered.t() - A Phoenix LiveView rendered button component.
@spec set_actions(Phoenix.LiveView.Socket.t()) :: Phoenix.LiveView.Socket.t()
Adds default header and footer actions to the assigns and modifies actions as needed.
Parameters
socket(Socket.t()) - LiveView socket containing the assigns with auix context.
Returns
Socket.t() - The updated socket with default actions configured.