From de4d4edbcd7a6920d628d466283a7cc781a1e946 Mon Sep 17 00:00:00 2001 From: raylu Date: Sun, 10 Jul 2011 17:31:57 -0700 Subject: use signup style for login page; add remember me to login popup --- views/layouts/default.html.php | 8 ++++++-- views/signup/index.html.php | 8 +++----- views/users/login.html.php | 28 +++++++++++++++++++++------- webroot/css/login_signup.css | 15 +++++++++++++++ webroot/css/signup.css | 14 -------------- webroot/css/style.css | 2 +- 6 files changed, 46 insertions(+), 29 deletions(-) create mode 100644 webroot/css/login_signup.css delete mode 100644 webroot/css/signup.css diff --git a/views/layouts/default.html.php b/views/layouts/default.html.php index f4a6918..8d4a667 100644 --- a/views/layouts/default.html.php +++ b/views/layouts/default.html.php @@ -35,8 +35,12 @@ use \lithium\security\Auth;

Login

'; echo $this->form->create(null, array('url' => '/login')); - echo $this->form->field('username', array('type' => 'text')); - echo $this->form->field('password', array('type' => 'password')); + echo $this->form->field('username', + array('type' => 'text', 'id' => 'f_username')); + echo $this->form->field('password', + array('type' => 'password', 'id' => 'f_password')); + echo $this->form->field('remember', + array('type' => 'checkbox', 'id' => 'f_remember', 'label' => 'Remember me')); echo $this->form->submit('Login'); echo $this->form->end(); echo ''; diff --git a/views/signup/index.html.php b/views/signup/index.html.php index dd262e0..6a00ff2 100644 --- a/views/signup/index.html.php +++ b/views/signup/index.html.php @@ -1,8 +1,6 @@ styles($this->html->style("/css/signup.css")); -?> +$this->styles($this->html->style("/css/login_signup.css")); -/key ?>\"> Link "; @@ -14,13 +12,13 @@ else flashMessage->output(); ?> -
+
form->create($user); ?> form->field('username', array('template' => $template, 'id' => 's_username')) ?> form->field('newpass', - array('template' => $template, 'id' => 's_password', 'label' => 'Password')) ?> + array('template' => $template, 'id' => 's_password', 'label' => 'Password', 'type' => 'password')) ?> form->field('email', array('template' => $template, 'id' => 's_email')) ?>
diff --git a/views/users/login.html.php b/views/users/login.html.php index 0bfb2c5..39b6a4f 100644 --- a/views/users/login.html.php +++ b/views/users/login.html.php @@ -1,7 +1,21 @@ -flashMessage->output(); ?> -form->create(); ?> - form->field('username'); ?> - form->field('password', array('type' => 'password')); ?> - form->field('remember', array('type' => 'checkbox')); ?> - form->submit('Login!'); ?> -form->end(); ?> \ No newline at end of file +styles($this->html->style("/css/login_signup.css")); + +$template = '{:label}{:input}{:error}'; +?> + +flashMessage->output() ?> + +
+form->create() ?> + + form->field('username', + array('template' => $template, 'id' => 'l_username')) ?> + form->field('password', + array('template' => $template, 'type' => 'password', 'id' => 'l_password')) ?> + form->field('remember', + array('template' => $template, 'type' => 'checkbox', 'id' => 'l_remember')) ?> +
+ form->submit('Login!') ?> +form->end(); ?> +
diff --git a/webroot/css/login_signup.css b/webroot/css/login_signup.css new file mode 100644 index 0000000..e798455 --- /dev/null +++ b/webroot/css/login_signup.css @@ -0,0 +1,15 @@ +#login_signup { + width: 100%; + text-align: center; +} +#login_signup table { + margin: 0 auto 5px; +} +#login_signup table tr td:first-child { + text-align: right; +} +#login_signup table td { + padding: 3px; + vertical-align: middle; + text-align: left; +} diff --git a/webroot/css/signup.css b/webroot/css/signup.css deleted file mode 100644 index 5533718..0000000 --- a/webroot/css/signup.css +++ /dev/null @@ -1,14 +0,0 @@ -#signup { - width: 100%; - text-align: center; -} -#signup table { - margin: 0 auto 5px; -} -#signup table tr td:first-child { - text-align: right; -} -#signup table td { - padding: 3px; - vertical-align: middle; -} diff --git a/webroot/css/style.css b/webroot/css/style.css index 15b1af7..14d661f 100644 --- a/webroot/css/style.css +++ b/webroot/css/style.css @@ -138,7 +138,7 @@ pre { /* align checkboxes, radios, text inputs with their label by: Thierry Koblentz tjkdesign.com/ez-css/css/base.css */ input[type="radio"] { vertical-align: text-bottom; } -input[type="checkbox"] { margin:0; vertical-align:-2px; } +input[type="checkbox"] { vertical-align: -1px; } .ie6 input { vertical-align: text-bottom; } /* hand cursor on clickable input elements */ -- cgit v1.2.3