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