more work towards widgets, split up the templates and added some super basic POD
[catagits/Reaction.git] / lib / Reaction / UI / Widget / Field / ChooseMany.pm
CommitLineData
8f19d042 1package Reaction::UI::Widget::Field::ChooseMany;
2
3use Reaction::UI::WidgetClass;
4
5class 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
181;
19
20
5a1a893e 21=head1 NAME
8f19d042 22
5a1a893e 23Reaction::UI::Widget::Field::ChooseMany
8f19d042 24
5a1a893e 25=head1 DESCRIPTION
8f19d042 26
5a1a893e 27See L<Reaction::UI::Widget::Field>
9de685fc 28
5a1a893e 29This 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 35renders C<available_values>, C<action_buttons>, C<selected_values> and C<current_values>
9de685fc 36
5a1a893e 37=head2 current values
9de685fc 38
5a1a893e 39renders the viewport's current_value_choices over hidden_value
9de685fc 40
5a1a893e 41=head2 hidden_value
9de685fc 42
5a1a893e 43C<content> is the value of the current choice
9de685fc 44
5a1a893e 45=head2 available_value
9de685fc 46
5a1a893e 47rendersthe viewport's current_available_value_choices over the option fragment
9de685fc 48
5a1a893e 49=head2 selected_value
9de685fc 50
5a1a893e 51rendersthe viewport's current_selected_value_choices over the option fragment
8f19d042 52
5a1a893e 53=head2 option
8f19d042 54
5a1a893e 55C<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 59See L<Reaction::Class> for authors.
60
61=head1 LICENSE
62
63See L<Reaction::Class> for the license.
8f19d042 64
65=cut