Reaction::UI::Widget::Field::Mutable - Mutable fields
An extension of Reaction::UI::Widget::Field representing fields
whose values can be mutated.
The following additional arguments are provided:
- field_id
- Contains the viewport's event id for
"value_string".
- field_name
- Defaults to the "field_id" argument
unless already defined
- field_type
- Defaults to "text".
- field_class
- A string containing the joined class attribute. Defaults to
"action-field" and the current
viewport's "name".
- exists_event
- Contains the event id for "exists".
- exists_value
- Defaults to 1.
Renders nothing if the viewport doesn't have a message.
Otherwise, the "message"
argument will be set to the localised string contained in the viewport's
"message" attribute and the
"message" fragment will be rendered.
Will render either
"field_is_required_yes" or
"field_is_required_no" depending on if
"value_is_required" on the viewport
returns true and the viewports
"value_string" is empty.
share/skin/base/layout/field/mutable.tt
The following layouts are provided:
- widget
- Builds a "span" element with a class
attribute set to the "field_class"
argument. The element contents will be the
"label_fragment",
"field" and
"message_fragment" fragments.
- label
- Builds a "label" element with the
"for" attribute set to the value of
"field_id" and the other attributes used
from the "field_is_required" argument.
The content will be the "label"
argument.
- field_is_required_yes
- Sets the class attribute to
"required_field".
- field_is_required_no
- Empty.
- message
- Renders a "span" element with the
"message" as content.
- field
- Renders the input field. The
"field_body" fragment is used to set the
value.
- field_body
- Creates the "value" attribute for the
input element.
share/skin/default/layout/field/mutable.tt
The following layouts are provided:
- message
- Will render the original "message"
fragment followed by a "br"
element.
- •
- Reaction::UI::Widget::Field
See Reaction::Class for authors.
See Reaction::Class for the license.