[jifty-devel] Patch to add AJAX validation warnings

Jesse Vincent jesse at bestpractical.com
Tue May 9 21:26:58 EDT 2006




On Tue, May 09, 2006 at 09:33:04AM -0400, Sean E. Millichamp wrote:
> While I was reviewing it to see if I found a way I liked to abstract it
> more (I didn't) I found two little cleanup things, patch attached.  One
> code, one pod.  The code one is more to be cautious.  It just seemed
> prudent that if validation_ok was going to clear the field_error then it
> should clear the field_warning too.  I'm not sure what real-world impact
> there might be without clearing it.

How about a commit bit, so you can apply them yourself? ;)

Send me (not the list) an htpasswd -nb string.

Best,

Jesse

> 
> Sean
> 
> -- 
>  Sean E. Millichamp, Enertron LLC, 586-757-1200 x102
> 

> Index: lib/Jifty/Action.pm
> ===================================================================
> --- lib/Jifty/Action.pm	(revision 1024)
> +++ lib/Jifty/Action.pm	(working copy)
> @@ -870,6 +870,7 @@
>      my $field = shift;
>  
>      $self->result->field_error($field => undef);
> +    $self->result->field_warning($field => undef);
>  
>      return 1;
>  }
> Index: lib/Jifty/Web/Form/Field.pm
> ===================================================================
> --- lib/Jifty/Web/Form/Field.pm	(revision 1024)
> +++ lib/Jifty/Web/Form/Field.pm	(working copy)
> @@ -281,7 +281,8 @@
>  Outputs this form element in a span with class C<form_field>.  This
>  outputs the label, the widget itself, any hints, any errors, and any
>  warnings using L</render_label>, L</render_widget>, L</render_hints>,
> -L</render_errors> respectively.  Returns an empty string.
> +L</render_errors>, and L</render_warnings>, respectively.  Returns an
> +empty string.
>  
>  This is also what C<Jifty::Web::Form::Field>s do when stringified.
>  




> _______________________________________________
> jifty-devel mailing list
> jifty-devel at lists.jifty.org
> http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel


-- 


More information about the jifty-devel mailing list