Commit | Line | Data |
---|---|---|
8f19d042 | 1 | package Reaction::UI::Widget::Field::ChooseMany; |
2 | ||
3 | use Reaction::UI::WidgetClass; | |
4 | ||
5 | class ChooseMany is 'Reaction::UI::Widget::Field', which { | |
6 | ||
9de685fc | 7 | field renders [qw/available_values action_buttons selected_values current_values/]; |
8 | ||
9 | current_values renders [ hidden_value over func('viewport', 'current_value_choices') ]; | |
10 | hidden_value renders [ string { $_->{value} } ]; | |
11 | ||
12 | available_values renders [ option over func('viewport', 'available_value_choices') ]; | |
13 | selected_values renders [ option over func('viewport', 'current_value_choices') ]; | |
14 | option renders [string {"DUMMY"}], { v_value => sub {$_->{value}}, v_name => sub {$_->{name}} }; | |
15 | ||
8f19d042 | 16 | }; |
17 | ||
18 | 1; | |
19 | ||
20 | ||
5a1a893e | 21 | =head1 NAME |
8f19d042 | 22 | |
5a1a893e | 23 | Reaction::UI::Widget::Field::ChooseMany |
8f19d042 | 24 | |
5a1a893e | 25 | =head1 DESCRIPTION |
8f19d042 | 26 | |
5a1a893e | 27 | See L<Reaction::UI::Widget::Field> |
9de685fc | 28 | |
5a1a893e | 29 | This needs a refactor to not be tied to a dual select box, but ENOTIME |
9de685fc | 30 | |
5a1a893e | 31 | =head1 FRAGMENTS |
9de685fc | 32 | |
5a1a893e | 33 | =head2 field |
9de685fc | 34 | |
5a1a893e | 35 | renders C<available_values>, C<action_buttons>, C<selected_values> and C<current_values> |
9de685fc | 36 | |
5a1a893e | 37 | =head2 current values |
9de685fc | 38 | |
5a1a893e | 39 | renders the viewport's current_value_choices over hidden_value |
9de685fc | 40 | |
5a1a893e | 41 | =head2 hidden_value |
9de685fc | 42 | |
5a1a893e | 43 | C<content> is the value of the current choice |
9de685fc | 44 | |
5a1a893e | 45 | =head2 available_value |
9de685fc | 46 | |
5a1a893e | 47 | rendersthe viewport's current_available_value_choices over the option fragment |
9de685fc | 48 | |
5a1a893e | 49 | =head2 selected_value |
9de685fc | 50 | |
5a1a893e | 51 | rendersthe viewport's current_selected_value_choices over the option fragment |
8f19d042 | 52 | |
5a1a893e | 53 | =head2 option |
8f19d042 | 54 | |
5a1a893e | 55 | C<content> is a dummy value but C<v_value> and C<v_name> are both set. |
8f19d042 | 56 | |
5a1a893e | 57 | =head1 AUTHORS |
8f19d042 | 58 | |
5a1a893e | 59 | See L<Reaction::Class> for authors. |
60 | ||
61 | =head1 LICENSE | |
62 | ||
63 | See L<Reaction::Class> for the license. | |
8f19d042 | 64 | |
65 | =cut |