diff --git a/lib/LDV/User.pm b/lib/LDV/User.pm index de0cdd1..e57c6ab 100644 --- a/lib/LDV/User.pm +++ b/lib/LDV/User.pm @@ -80,11 +80,12 @@ sub create { # TODO: confirmation email + $self->flash({result => "Success! Now you may log in."}); $self->redirect_to('/user/profile'); 1; } or do { $self->app->log->error($@); $self->flash({result => "Can't create user: $@"}); - $self->redirect_to('/user/create'); + $self->redirect_to('/user/register'); }; $self->rendered(); diff --git a/templates/includes/auth_block.html.ep b/templates/includes/auth_block.html.ep index 22cb2f5..01998e1 100644 --- a/templates/includes/auth_block.html.ep +++ b/templates/includes/auth_block.html.ep @@ -6,5 +6,8 @@
<%= l('Login') %> | -<%= text_field 'login', required => 1, placeholder => 'petrov' %> | +<%= text_field 'username', required => 1, placeholder => 'petrov' %> |
<%= l('Password') %> | -<%= password_field 'pass', required => 1, placeholder => '******' %> | -|
<%= l('Display name') %> | -<%= text_field 'displayname', placeholder => l('John Doe') %> | +<%= password_field 'password', required => 1, placeholder => '******' %> |
<%= l('Email') %> | -<%= text_field 'mail', type => 'email', placeholder => 'petrov@example.com' %> | +<%= text_field 'mail', required => 1, type => 'email', placeholder => 'petrov@example.com' %> |