[Jifty-commit] r2911 -
jifty/trunk/plugins/Login/lib/Jifty/Plugin/Login/Action
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Mon Mar 5 11:01:20 EST 2007
Author: yves
Date: Mon Mar 5 11:01:19 2007
New Revision: 2911
Modified:
jifty/trunk/plugins/Login/lib/Jifty/Plugin/Login/Action/Signup.pm
Log:
* a simplest way to manage signup argument, now usable with an additional schema definition as in "Expanding the Model" in Jifty::Manual::AccessControl
Modified: jifty/trunk/plugins/Login/lib/Jifty/Plugin/Login/Action/Signup.pm
==============================================================================
--- jifty/trunk/plugins/Login/lib/Jifty/Plugin/Login/Action/Signup.pm (original)
+++ jifty/trunk/plugins/Login/lib/Jifty/Plugin/Login/Action/Signup.pm Mon Mar 5 11:01:19 2007
@@ -29,22 +29,33 @@
=cut
sub arguments {
- my $self = shift;
- my $args = $self->SUPER::arguments();
-
- my %fields = (
- name => 1,
- email => 1,
- password => 1,
- password_confirm => 1,
+ return (
+ {
+ name => {
+ label => _('Name'),
+ mandatory => 1
+ },
+ email => {
+ label => _('Email address'),
+ ajax_validates => 1,
+ },
+ password => {
+ type => 'password',
+ sticky => 0,
+ label => _('Password'),
+ mandatory => 1
+ },
+ password_confirm => {
+ type => 'password',
+ sticky => 0,
+ label => _('Type that again?'),
+ mandatory => 1
+ },
+ }
);
-
- $args->{'email'}{'ajax_validates'} = 1;
- $args->{'password_confirm'}{'label'} = _("Type that again?");
- $args->{'name'}{'label'} = _("Name");
- return $args;
}
+
=head2 validate_email
Make sure their email address looks sane
More information about the Jifty-commit
mailing list