Thanks Lukas, just what I was going to suggest  :)

Wasn't sure if I'd made the form module a config option, but thankfully I did, so the sub-classing approach should work fine.


On 09/11/2013 10:09 AM, spamcatc...@thiemeier.net wrote:
Hi,

I have never worked with C::C::Auth or Twitter Bootstrap. So please ignore
me if my comment is not helpful...

If you just need to add something to the form definition, isn't it
possible to just subclass HFH::Form::Login, add or modify whatever you
need, and configure C::C::Auth to use your own Form class instead of
HFH::Form::Login?

in your form:

   package LoginForm::Bootstrap;
   use HTML::FormHandler::Moose;
   extends 'HTML::FormHandlerX::Form::Login';
   with 'HTML::FormHandler::Widget::Theme::BootstrapFormMessages';
   has '+widget_wrapper' => ( default => 'Bootstrap' );
   has '+is_html5' => (default=>1);
   __PACKAGE__->meta->make_immutable;
   use namespace::autoclean;
   1;

and in your config:

   <Controller::Auth>

         form_handler   LoginForm::Bootstrap
         ...
   </Controller::Auth>

cheers, Lukas

Hi Rob Brown.

thank you for your reply.

On 09/10/13 10:55, Rob Brown wrote:
Hi Ferz,

I'm a little confused as to what you're trying to do exactly.

Here's a simple typical TT example of the login form using
CatalystX::Controller::Auth...


If modifications are needed to CatalystX::Controller::Auth to achieve
your goals and work better with Twitter Bootstrap let me know, it's not
something I've worked with before.
Yes, I would like to override the form definition to include:

with 'HTML::FormHandler::Widget::Theme::BootstrapFormMessages';
has '+widget_wrapper' => ( default => 'Bootstrap' );
has '+is_html5' => (default=>1);


so widgets will get bootstrap wrapper for validation errors and
bootstrap css classes.


Thank you in advance,          \ferz

_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive:
http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/



_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to