Skip Menu |

This queue is for tickets about the HTML-FormHandlerX-Form-Login CPAN distribution.

Report information
The Basics
Id: 77212
Status: patched
Priority: 0/
Queue: HTML-FormHandlerX-Form-Login

People
Owner: Nobody in particular
Requestors: j.robinson [...] shadowcat.co.uk
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: Patch: OpenID support
Attached patch to support openid_identifier field
Subject: 0001-Added-field-for-openid-logins.patch
From 2a6a17d218fb854404688dc8bfc6371faf264ce2 Mon Sep 17 00:00:00 2001 From: Jess Robinson <j.robinson@shadowcat.co.uk> Date: Tue, 15 May 2012 09:55:26 +0000 Subject: [PATCH] Added field for openid logins --- lib/HTML/FormHandlerX/Form/Login.pm | 16 +++++++++++++--- 1 files changed, 13 insertions(+), 3 deletions(-) diff --git a/lib/HTML/FormHandlerX/Form/Login.pm b/lib/HTML/FormHandlerX/Form/Login.pm index 5021410..336f87b 100644 --- a/lib/HTML/FormHandlerX/Form/Login.pm +++ b/lib/HTML/FormHandlerX/Form/Login.pm @@ -294,13 +294,15 @@ has_field token => ( type => 'Hidden', inactive => 1, ); -=head3 email / username +=head3 email / username / openid_identifier $form->field('email') $form->field('username') -The C<username> field, or use the specific C<email> field for extra validation (employing Email::Valid). + $form->field('openid_identifier') + +The C<openid_identifier> field used by L<Catalyst::Authentication::Credential::OpenID> for OpenID logins, C<username> field, or use the specific C<email> field for extra validation (employing Email::Valid). =cut @@ -319,6 +321,14 @@ has_field username => ( type => 'Text', wrapper_attr => { id => 'field-username' }, inactive => 1, ); + +has_field openid_identifier => ( type => 'Text', + required => 1, + messages => { required => 'Your openid is required.' }, + tags => { no_errors => 1 }, + wrapper_attr => { id => 'field-openid-identifer' }, + inactive => 1, + ); =head3 old_password @@ -454,7 +464,7 @@ after build_active => sub { { $self->field('submit')->value('Register'); } - elsif ( ( $self->field('email')->is_active || $self->field('username')->is_active ) && $self->field('password')->is_active ) + elsif ( ( $self->field('openid_identifier')->is_active || ($self->field('email')->is_active || $self->field('username')->is_active ) && $self->field('password')->is_active )) { $self->field('submit')->value('Login'); } -- 1.7.3.5
Hi Jess, Patched and released (on github now too)... https://github.com/robsco/html-formhandlerx-form-login cpan updating... Cheers, Rob On Tue May 15 06:06:58 2012, JROBINSON wrote: Show quoted text
> Attached patch to support openid_identifier field