[Jifty-commit] r5120 - jifty/trunk/lib/Jifty/Web/Form
Jifty commits
jifty-commit at lists.jifty.org
Sat Feb 16 07:51:51 EST 2008
Author: clkao
Date: Sat Feb 16 07:51:50 2008
New Revision: 5120
Modified:
jifty/trunk/lib/Jifty/Web/Form/Field.pm
Log:
Don't auto register field's action unless we are in
an open form. This fixes the case where actions aren't
properly registered to the correct form:
my $foo = $action->form_field('foo')->element_id;
form {
render_action($action); form_submit;
}
Modified: jifty/trunk/lib/Jifty/Web/Form/Field.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web/Form/Field.pm (original)
+++ jifty/trunk/lib/Jifty/Web/Form/Field.pm Sat Feb 16 07:51:50 2008
@@ -91,7 +91,7 @@
}
# now that the form field has been instantiated, register the action with the form.
- if ($self->action and not (Jifty->web->form->has_action($self->action))) {
+ if ($self->action and Jifty->web->form->is_open and not (Jifty->web->form->has_action($self->action))) {
Jifty->web->form->register_action( $self->action);
Jifty->web->form->print_action_registration($self->action->moniker);
}
More information about the Jifty-commit
mailing list