package Reaction::UI::ViewPort::Field::Mutable::MatchingPasswords;
use Reaction::Class;
-use aliased 'Reaction::UI::ViewPort::Field::Mutable::Password';
-
use namespace::clean -except => [ qw(meta) ];
-extends Password;
-
+extends 'Reaction::UI::ViewPort::Field::Mutable::Password';
has check_value => (is => 'rw', isa => 'Str', );
has check_label => (is => 'rw', isa => 'Str', lazy_build => 1);
+
sub _build_check_label {
my $orig_label = shift->label;
return "Confirm ${orig_label}";
-};
+}
#maybe both check_value and value_string should have triggers ?
-#that way if one even happens before the other it would still work?
+#that way if one even happens before the other it would still work?
around adopt_value_string => sub {
my $orig = shift;
my ($self) = @_;
__PACKAGE__->meta->make_immutable;
-
1;
+
+__END__;
package Reaction::UI::Widget::Field::Mutable::MatchingPasswords;
use Reaction::UI::WidgetClass;
-use aliased 'Reaction::UI::Widget::Field::Mutable::Password';
-
use namespace::clean -except => [ qw(meta) ];
-extends Password;
-
+extends 'Reaction::UI::Widget::Field::Mutable::Password';
implements fragment check_field {
arg 'field_id' => event_id 'check_value';
arg 'field_name' => event_id 'check_value';
- arg 'label' => localized 'Confirm:';
render 'field'; #piggyback!
};
}
};
-
__PACKAGE__->meta->make_immutable;
-
1;
+
+__END__;