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 +++++++++++++++++++++------- 3 files changed, 30 insertions(+), 14 deletions(-) (limited to 'views') 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(); ?> +
-- cgit v1.2.3