summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorraylu <raylu@mixpanel.com>2011-07-10 17:31:57 -0700
committerraylu <raylu@mixpanel.com>2011-07-10 17:36:52 -0700
commitde4d4edbcd7a6920d628d466283a7cc781a1e946 (patch)
tree1676c63304b41bdc7d7c2155bc91784aac678c0b
parent461ada92d70011c5de9673723668d8de185e0fcb (diff)
downloadotakuhub-de4d4edbcd7a6920d628d466283a7cc781a1e946.tar.xz
use signup style for login page; add remember me to login popup
-rw-r--r--views/layouts/default.html.php8
-rw-r--r--views/signup/index.html.php8
-rw-r--r--views/users/login.html.php28
-rw-r--r--webroot/css/login_signup.css (renamed from webroot/css/signup.css)9
-rw-r--r--webroot/css/style.css2
5 files changed, 36 insertions, 19 deletions
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;
<h2>Login</h2>
';
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 '</div></div>';
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 @@
<?php
-$this->styles($this->html->style("/css/signup.css"));
-?>
+$this->styles($this->html->style("/css/login_signup.css"));
-<?php
if (isset($key))
{
echo "Confirmation Link: <a href=\"<?=$link ?>/<?=$key->key ?>\"> Link </a>";
@@ -14,13 +12,13 @@ else
<?= $this->flashMessage->output(); ?>
- <div id="signup">
+ <div id="login_signup">
<?= $this->form->create($user); ?>
<table>
<?= $this->form->field('username',
array('template' => $template, 'id' => 's_username')) ?>
<?= $this->form->field('newpass',
- array('template' => $template, 'id' => 's_password', 'label' => 'Password')) ?>
+ array('template' => $template, 'id' => 's_password', 'label' => 'Password', 'type' => 'password')) ?>
<?= $this->form->field('email',
array('template' => $template, 'id' => 's_email')) ?>
</table>
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 @@
-<?=$this->flashMessage->output(); ?>
-<?=$this->form->create(); ?>
- <?=$this->form->field('username'); ?>
- <?=$this->form->field('password', array('type' => 'password')); ?>
- <?=$this->form->field('remember', array('type' => 'checkbox')); ?>
- <?=$this->form->submit('Login!'); ?>
-<?=$this->form->end(); ?> \ No newline at end of file
+<?php
+$this->styles($this->html->style("/css/login_signup.css"));
+
+$template = '<tr{:wrap}><td>{:label}</td><td>{:input}</td><td>{:error}</td></tr>';
+?>
+
+<?= $this->flashMessage->output() ?>
+
+<div id="login_signup">
+<?= $this->form->create() ?>
+ <table>
+ <?= $this->form->field('username',
+ array('template' => $template, 'id' => 'l_username')) ?>
+ <?= $this->form->field('password',
+ array('template' => $template, 'type' => 'password', 'id' => 'l_password')) ?>
+ <?= $this->form->field('remember',
+ array('template' => $template, 'type' => 'checkbox', 'id' => 'l_remember')) ?>
+ </table>
+ <?= $this->form->submit('Login!') ?>
+<?= $this->form->end(); ?>
+</div>
diff --git a/webroot/css/signup.css b/webroot/css/login_signup.css
index 5533718..e798455 100644
--- a/webroot/css/signup.css
+++ b/webroot/css/login_signup.css
@@ -1,14 +1,15 @@
-#signup {
+#login_signup {
width: 100%;
text-align: center;
}
-#signup table {
+#login_signup table {
margin: 0 auto 5px;
}
-#signup table tr td:first-child {
+#login_signup table tr td:first-child {
text-align: right;
}
-#signup table td {
+#login_signup table td {
padding: 3px;
vertical-align: middle;
+ text-align: left;
}
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 */