widget documentation
[catagits/Reaction.git] / lib / Reaction / UI / Widget / Field / Mutable / MatchingPasswords.pm
CommitLineData
24185a7d 1package Reaction::UI::Widget::Field::Mutable::MatchingPasswords;
2
3use Reaction::UI::WidgetClass;
bae75bee 4use namespace::clean -except => [ qw(meta) ];
24185a7d 5
d4667bef 6extends 'Reaction::UI::Widget::Field::Mutable::Password';
577fe414 7
bae75bee 8implements fragment check_field {
9 arg 'field_id' => event_id 'check_value';
10 arg 'field_name' => event_id 'check_value';
bae75bee 11 render 'field'; #piggyback!
12};
577fe414 13
bae75bee 14implements fragment check_label {
15 if (my $label = $_{viewport}->check_label) {
d219104c 16 arg label => localized $label;
bae75bee 17 render 'label';
18 }
24185a7d 19};
20
bae75bee 21__PACKAGE__->meta->make_immutable;
22
24185a7d 231;
d4667bef 24
25__END__;
f9b32c83 26
27=head1 NAME
28
29Reaction::UI::Widget::Field::Mutable::MatchingPasswords - Require double input of password
30
31=head1 DESCRIPTION
32
33This is a subclass of L<Reaction::UI::Widget::Field::Mutable::Password> implementing
34a second field to repeat the password input.
35
36=head1 FRAGMENTS
37
38=head2 widget
39
40Will render the C<check_field> fragment after the original C<widget> fragment.
41
42=head2 check_field
43
44Renders C<field> with C<field_id> and C<field_name> set to the viewport's C<check_value> event.
45
46=head2 check_label
47
48Localises the C<label> argument with a value from the viewport's C<check_label> attribute if
49one is specified and renders the C<label> fragment.
50
51=head1 LAYOUT SETS
52
53=head2 base
54
55 share/skin/base/layout/field/mutable/matching_passwords.tt
56
57=head1 SEE ALSO
58
59=over 4
60
61=item * L<Reaction::UI::Widget::Field::Mutable::Password>
62
63=back
64
65=head1 AUTHORS
66
67See L<Reaction::Class> for authors.
68
69=head1 LICENSE
70
71See L<Reaction::Class> for the license.
72
73=cut