Commit | Line | Data |
---|---|---|
2f670e13 | 1 | package Reaction::UI::Widget::Field::Mutable::HiddenArray; |
8f19d042 | 2 | |
3 | use Reaction::UI::WidgetClass; | |
4 | ||
2f670e13 | 5 | #move this to a normal list and let the hidden part be decided by the template.. |
bae75bee | 6 | use namespace::clean -except => [ qw(meta) ]; |
7 | extends 'Reaction::UI::Widget::Field::Mutable'; | |
8f19d042 | 8 | |
664d660c | 9 | |
9de685fc | 10 | |
bae75bee | 11 | implements fragment hidden_list { |
12 | render hidden_field => over $_{viewport}->value; | |
8f19d042 | 13 | }; |
14 | ||
bae75bee | 15 | implements fragment hidden_field { |
16 | arg field_value => $_; | |
17 | }; | |
18 | ||
19 | __PACKAGE__->meta->make_immutable; | |
20 | ||
21 | ||
8f19d042 | 22 | 1; |
23 | ||
6ab43711 | 24 | __END__; |
8f19d042 | 25 | |
5a1a893e | 26 | =head1 NAME |
8f19d042 | 27 | |
87b8ba85 | 28 | Reaction::UI::Widget::Field::Mutable::HiddenArray |
8f19d042 | 29 | |
5a1a893e | 30 | =head1 DESCRIPTION |
8f19d042 | 31 | |
f9b32c83 | 32 | See L<Reaction::UI::Widget::Field::Mutable>. This renders a list of values |
33 | as a series of hidden fields to transport them across forms. | |
8f19d042 | 34 | |
5a1a893e | 35 | =head1 FRAGMENTS |
8f19d042 | 36 | |
f9b32c83 | 37 | =head2 hidden_list |
38 | ||
39 | Renders C<hidden_field> over the array reference stored in the viewpoint's | |
40 | C<value>. | |
41 | ||
42 | =head2 hidden_field | |
43 | ||
44 | Sets the C<field_value> argument to the current topic argument C<_>. | |
45 | ||
5a1a893e | 46 | =head2 field |
8f19d042 | 47 | |
5a1a893e | 48 | renders fragment C<item> over the values of 'value' arrayref |
8f19d042 | 49 | |
5a1a893e | 50 | =head2 item |
51 | ||
52 | C<content> is $_{_} / $_ (current item in the 'value' array) | |
53 | ||
f9b32c83 | 54 | =head1 LAYOUT SETS |
55 | ||
56 | =head2 base | |
57 | ||
58 | share/skin/base/layout/field/mutable/hidden_array.tt | |
59 | ||
60 | Provides a C<hidden_field> layout that renders a hidden input element. | |
61 | ||
5a1a893e | 62 | =head1 AUTHORS |
63 | ||
64 | See L<Reaction::Class> for authors. | |
65 | ||
66 | =head1 LICENSE | |
67 | ||
68 | See L<Reaction::Class> for the license. | |
8f19d042 | 69 | |
70 | =cut |