From: groditi Date: Thu, 4 Sep 2008 00:46:20 +0000 (+0000) Subject: fix matching passwords stuff X-Git-Tag: v0.002000~180 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d4667bef2fd27182a34a72d368090a3c26e2bd45;p=catagits%2FReaction.git fix matching passwords stuff --- diff --git a/lib/Reaction/UI/ViewPort/Field/Mutable/MatchingPasswords.pm b/lib/Reaction/UI/ViewPort/Field/Mutable/MatchingPasswords.pm index 0685f87..845b8b5 100644 --- a/lib/Reaction/UI/ViewPort/Field/Mutable/MatchingPasswords.pm +++ b/lib/Reaction/UI/ViewPort/Field/Mutable/MatchingPasswords.pm @@ -1,22 +1,20 @@ 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) = @_; @@ -39,5 +37,6 @@ around can_sync_to_action => sub { __PACKAGE__->meta->make_immutable; - 1; + +__END__; diff --git a/lib/Reaction/UI/Widget/Field/Mutable/MatchingPasswords.pm b/lib/Reaction/UI/Widget/Field/Mutable/MatchingPasswords.pm index 86f9cb1..5668510 100644 --- a/lib/Reaction/UI/Widget/Field/Mutable/MatchingPasswords.pm +++ b/lib/Reaction/UI/Widget/Field/Mutable/MatchingPasswords.pm @@ -1,17 +1,13 @@ 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! }; @@ -22,8 +18,8 @@ implements fragment check_label { } }; - __PACKAGE__->meta->make_immutable; - 1; + +__END__; diff --git a/share/skin/base/layout/field/mutable/matching_passwords.tt b/share/skin/base/layout/field/mutable/matching_passwords.tt index d07b784..8065eb6 100644 --- a/share/skin/base/layout/field/mutable/matching_passwords.tt +++ b/share/skin/base/layout/field/mutable/matching_passwords.tt @@ -3,6 +3,6 @@ =for layout widget [% call_next %] -[% check_value %] +[% check_field %] =cut