[Jifty-commit] r939 - in jifty/branches/jifty-jsan: .
lib/Jifty/Web/Form
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Wed Apr 26 21:02:30 EDT 2006
Author: trs
Date: Wed Apr 26 21:02:24 2006
New Revision: 939
Modified:
jifty/branches/jifty-jsan/ (props changed)
jifty/branches/jifty-jsan/lib/Jifty/Record.pm
jifty/branches/jifty-jsan/lib/Jifty/Web/Form/Clickable.pm
jifty/branches/jifty-jsan/lib/Jifty/Web/Form/Field.pm
Log:
r10110 at zot (orig r934): alexmv | 2006-04-26 18:34:59 -0400
r12638 at zoq-fot-pik: chmrr | 2006-04-26 18:34:43 -0400
* References can't possibly be "" -- this saves overloading headaches
r10111 at zot (orig r935): alexmv | 2006-04-26 18:50:48 -0400
r12640 at zoq-fot-pik: chmrr | 2006-04-26 18:50:33 -0400
* Fix buttons that should redirect to URLs
r10114 at zot (orig r937): trs | 2006-04-26 20:40:34 -0400
r10109 at zot: tom | 2006-04-26 20:39:52 -0400
Make sure there are no spaces if there is no content
Modified: jifty/branches/jifty-jsan/lib/Jifty/Record.pm
==============================================================================
--- jifty/branches/jifty-jsan/lib/Jifty/Record.pm (original)
+++ jifty/branches/jifty-jsan/lib/Jifty/Record.pm Wed Apr 26 21:02:24 2006
@@ -72,7 +72,7 @@
# remove blank values. We'd rather have nulls
if ( exists $attribs{$key}
- and ( not defined $attribs{$key} or $attribs{$key} eq "" ) )
+ and ( not defined $attribs{$key} or (not ref $attribs{$key} and $attribs{$key} eq "" )) )
{
delete $attribs{$key};
}
Modified: jifty/branches/jifty-jsan/lib/Jifty/Web/Form/Clickable.pm
==============================================================================
--- jifty/branches/jifty-jsan/lib/Jifty/Web/Form/Clickable.pm (original)
+++ jifty/branches/jifty-jsan/lib/Jifty/Web/Form/Clickable.pm Wed Apr 26 21:02:24 2006
@@ -339,10 +339,6 @@
my %parameters = ( %{ $self->{fallback} || {} }, $self->parameters );
- # Actions to be submitted
- $parameters{"J:ACTIONS"} = join( ';', @{ $self->submit } )
- if $self->submit;
-
my ($root) = $ENV{'REQUEST_URI'} =~ /([^\?]*)/;
# Add a redirect, if this isn't to the right page
@@ -352,6 +348,11 @@
arguments => { url => $self->url } );
$parameters{ $redirect->register_name } = ref $redirect;
$parameters{ $redirect->form_field_name('url') } = $self->url;
+ $parameters{"J:ACTIONS"} = join( ';', @{ $self->submit }, $redirect->moniker )
+ if $self->submit;
+ } else {
+ $parameters{"J:ACTIONS"} = join( ';', @{ $self->submit } )
+ if $self->submit;
}
return %parameters;
Modified: jifty/branches/jifty-jsan/lib/Jifty/Web/Form/Field.pm
==============================================================================
--- jifty/branches/jifty-jsan/lib/Jifty/Web/Form/Field.pm (original)
+++ jifty/branches/jifty-jsan/lib/Jifty/Web/Form/Field.pm Wed Apr 26 21:02:24 2006
@@ -505,9 +505,7 @@
return unless $self->action;
Jifty->web->out(
-qq!<span class="error @{[$self->classes]}" id="@{[$self->action->error_div_id($self->name)]}">
- @{[ $self->action->result->field_error( $self->name ) || '']}
- </span>\n!
+qq!<span class="error @{[$self->classes]}" id="@{[$self->action->error_div_id($self->name)]}">@{[ $self->action->result->field_error( $self->name ) || '']}</span>\n!
);
return '';
}
More information about the Jifty-commit
mailing list