[Jifty-commit] r4829 - in jifty/trunk: lib/Jifty/Web/Form
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Sat Jan 12 16:41:19 EST 2008
Author: jesse
Date: Sat Jan 12 16:41:18 2008
New Revision: 4829
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Web/Form/Clickable.pm
Log:
r74888 at pinglin: jesse | 2008-01-12 14:19:06 -0600
* You no longer have to manually register an action if the only place it's used in a form is in a submit.
exception: if you use a moniker rather than an action object, we don't have a way to convert that into the action, so that still requires a manual registration
Modified: jifty/trunk/lib/Jifty/Web/Form/Clickable.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web/Form/Clickable.pm (original)
+++ jifty/trunk/lib/Jifty/Web/Form/Clickable.pm Sat Jan 12 16:41:18 2008
@@ -194,7 +194,10 @@
if ( !ref($submit) ) { push @submit_temp, $submit }
# We've been handed a Jifty::Action to submit
- elsif ( blessed($submit) ) { push @submit_temp, $submit->moniker }
+ elsif ( blessed($submit) ) {
+ push @submit_temp, $submit->moniker ;
+ Jifty->web->form->register_action($submit);
+ }
# We've been handed a hashref which contains an action and arguments
else {
@@ -206,6 +209,8 @@
# Add the action's moniker to the submit
push @submit_temp, $submit->{'action'}->moniker;
+ Jifty->web->form->register_action($submit->{'action'});
+
}
}
More information about the Jifty-commit
mailing list