Aurora.Uix.Templates.Basic.Actions.Form (Aurora UIX v0.1.4-rc.7)

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

Key Constraints

  • Expects assigns to include an :auix key 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

save_action(assigns)

@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 :module and :name.

Returns

Rendered.t() - A Phoenix LiveView rendered button component.

set_actions(socket)

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.