From a6e94ba8818d479d65310f67d2827de64e2f4912 Mon Sep 17 00:00:00 2001 From: Andreas Granig Date: Wed, 27 Feb 2013 20:20:47 +0100 Subject: [PATCH] Simplify login form handler. --- lib/NGCP/Panel/Form/Login.pm | 13 +++---------- share/static/css/application.css | 3 ++- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/lib/NGCP/Panel/Form/Login.pm b/lib/NGCP/Panel/Form/Login.pm index 19e09891ae..fb2644b946 100644 --- a/lib/NGCP/Panel/Form/Login.pm +++ b/lib/NGCP/Panel/Form/Login.pm @@ -4,7 +4,9 @@ use HTML::FormHandler::Moose; extends 'HTML::FormHandler'; use Moose::Util::TypeConstraints; -with 'HTML::FormHandler::Widget::Form::Simple'; +use HTML::FormHandler::Widget::Block::Bootstrap; + +has '+widget_wrapper' => ( default => 'Bootstrap' ); sub build_form_tags {{ error_class => 'label label-secondary'}} @@ -14,10 +16,6 @@ has_field 'username' => ( element_attr => { placeholder => 'Username' }, element_class => [qw/login username-field/], wrapper_class => [qw/login-fields field control-group/], - error_class => [qw/error/], - messages => { - required => 'Please provide a username' - }, ); has_field 'password' => ( @@ -26,10 +24,6 @@ has_field 'password' => ( element_attr => { placeholder => 'Password' }, element_class => [qw/login password-field/], wrapper_class => [qw/login-fields field control-group/], - error_class => [qw/error/], - messages => { - required => 'Please provide a password' - }, ); has_field 'submit' => ( @@ -37,7 +31,6 @@ has_field 'submit' => ( value => 'Sign In', label => '', element_class => [qw/button btn btn-primary btn-large/], - wrapper_class => [qw/login-actions/], ); 1; diff --git a/share/static/css/application.css b/share/static/css/application.css index f732771a40..e59b53e0a2 100644 --- a/share/static/css/application.css +++ b/share/static/css/application.css @@ -2089,10 +2089,11 @@ Layout: Content margin: 0; } -#content .modal-footer .form-actions { +.form-actions { padding: 0; margin: 0; border: none; + background: none; } /*------------------------------------------------------------------