Commit | Line | Data |
24185a7d |
1 | package Reaction::UI::Widget::Field::Mutable::MatchingPasswords; |
2 | |
3 | use Reaction::UI::WidgetClass; |
bae75bee |
4 | use namespace::clean -except => [ qw(meta) ]; |
24185a7d |
5 | |
d4667bef |
6 | extends 'Reaction::UI::Widget::Field::Mutable::Password'; |
577fe414 |
7 | |
bae75bee |
8 | implements 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 |
14 | implements 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 |
23 | 1; |
d4667bef |
24 | |
25 | __END__; |
f9b32c83 |
26 | |
27 | =head1 NAME |
28 | |
29 | Reaction::UI::Widget::Field::Mutable::MatchingPasswords - Require double input of password |
30 | |
31 | =head1 DESCRIPTION |
32 | |
33 | This is a subclass of L<Reaction::UI::Widget::Field::Mutable::Password> implementing |
34 | a second field to repeat the password input. |
35 | |
36 | =head1 FRAGMENTS |
37 | |
38 | =head2 widget |
39 | |
40 | Will render the C<check_field> fragment after the original C<widget> fragment. |
41 | |
42 | =head2 check_field |
43 | |
44 | Renders 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 | |
48 | Localises the C<label> argument with a value from the viewport's C<check_label> attribute if |
49 | one 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 | |
67 | See L<Reaction::Class> for authors. |
68 | |
69 | =head1 LICENSE |
70 | |
71 | See L<Reaction::Class> for the license. |
72 | |
73 | =cut |