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