[jifty-devel] 'smart_tag_wrapper' to make creating smarter tags easier

Jesse Vincent jesse at bestpractical.com
Mon Mar 19 13:31:00 EDT 2007


Thanks. Applied.

On Mar 19, 2007, at 11:36 AM, Edmund von der Burg wrote:

> On 19/03/07, Jesse Vincent <jesse at bestpractical.com> wrote:
>> I needed this tonight. Wanna make it go? ;)
>> On Mar 16, 2007, at 5:26 AM, Edmund von der Burg wrote:
>
> I'd love to make it go but can't at the moment as I am not able to
> connect to the net this week (except via a local libary machine that
> is so crippled that it does not count).
>
> The code at the start of this thread for 'form' works for me, please
> add it as you see fit :)
>
> Cheers,
>  Edmund
>
>> > Hello,
>> >
>> > I've just committed code to Template::Declare that should make it
>> > easier to create smarter wrappers in the templates - for example  
>> the
>> > 'form' wrapper. Please see the diff for the details.
>> >
>> >  http://svn.jifty.org/index.cgi/jifty/revision/?rev=2989
>> >
>> > Using this the 'form' sub in J::V::Declare::Helpers would become:
>> >
>> > {
>> >    no warnings qw/redefine/;
>> >    sub form (&) {
>> >        my $code = shift;
>> >
>> >        smart_tag_wrapper {
>> >          outs_raw( Jifty->web->form->start(@_) );
>> >          $code->();
>> >          outs_raw( Jifty->web->form->end );
>> >          return '';
>> >        };
>> >    }
>> > }
>> >
>> >
>> > you could then call it like this (not tested properly):
>> >
>> > my $action = ...setup_action..;
>> > with( call => $next, name => "loginbox" ),
>> >  form {
>> >    render_action( $action, [qw(nick password remember)] );
>> >    form_submit( label => 'Login', submit => $action );
>> >  };
>> >
>> > and the form->start will get the call and next arguments.
>> >
>> >
>> > I like it :)
>> >
>> >
>> > If you think this is good then we can add it to the Jifty code.  
>> I've
>> > held off as I don't want to break existing apps and also the  
>> version
>> > of T::D would need bumping and the new version set in Makefile.PL
>> >
>> > Have a good weekend.
>> >
>> > Cheers,
>> >  Edmund.
>> >
>> >
>> > --
>> > In reality I'm evdb at ecclestoad.co.uk - http://ecclestoad.co.uk
>> > _______________________________________________
>> > jifty-devel mailing list
>> > jifty-devel at lists.jifty.org
>> > http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel
>> >
>>
>>
>> _______________________________________________
>> jifty-devel mailing list
>> jifty-devel at lists.jifty.org
>> http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel
>>
>>
>>
>
>
> -- 
> In reality I'm evdb at ecclestoad.co.uk - http://ecclestoad.co.uk
> _______________________________________________
> jifty-devel mailing list
> jifty-devel at lists.jifty.org
> http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://lists.bestpractical.com/pipermail/jifty-devel/attachments/20070319/b51e84b1/PGP.pgp


More information about the jifty-devel mailing list