From 7df055aff1e1056d87bb720531d60cb079805f94 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 11 Apr 2015 18:05:10 -0400 Subject: Add auth controller --- app/Template/auth/index.php | 32 ++++++++++++++++++++++++++++++++ app/Template/layout.php | 2 +- app/Template/user/login.php | 32 -------------------------------- 3 files changed, 33 insertions(+), 33 deletions(-) create mode 100644 app/Template/auth/index.php delete mode 100644 app/Template/user/login.php (limited to 'app/Template') diff --git a/app/Template/auth/index.php b/app/Template/auth/index.php new file mode 100644 index 00000000..b35b1253 --- /dev/null +++ b/app/Template/auth/index.php @@ -0,0 +1,32 @@ +
+ + +

e($errors['login']) ?>

+ + +
+ + formCsrf() ?> + + formLabel(t('Username'), 'username') ?> + formText('username', $values, $errors, array('autofocus', 'required')) ?>
+ + formLabel(t('Password'), 'password') ?> + formPassword('password', $values, $errors, array('required')) ?> + + formCheckbox('remember_me', t('Remember Me'), 1) ?>
+ + + a(t('Login with my Google Account'), 'user', 'google') ?> + + + + a(t('Login with my GitHub Account'), 'user', 'gitHub') ?> + + +
+ +
+
+ +
\ No newline at end of file diff --git a/app/Template/layout.php b/app/Template/layout.php index ec9f2288..1cdcc249 100644 --- a/app/Template/layout.php +++ b/app/Template/layout.php @@ -58,7 +58,7 @@
  • - a(t('Logout'), 'user', 'logout', array(), true) ?> + a(t('Logout'), 'auth', 'logout') ?> (a($this->e($this->getFullname()), 'user', 'show', array('user_id' => $this->userSession->getId())) ?>)
  • diff --git a/app/Template/user/login.php b/app/Template/user/login.php deleted file mode 100644 index c2e3914e..00000000 --- a/app/Template/user/login.php +++ /dev/null @@ -1,32 +0,0 @@ -
    - - -

    e($errors['login']) ?>

    - - -
    - - formCsrf() ?> - - formLabel(t('Username'), 'username') ?> - formText('username', $values, $errors, array('autofocus', 'required')) ?>
    - - formLabel(t('Password'), 'password') ?> - formPassword('password', $values, $errors, array('required')) ?> - - formCheckbox('remember_me', t('Remember Me'), 1) ?>
    - - - a(t('Login with my Google Account'), 'user', 'google') ?> - - - - a(t('Login with my GitHub Account'), 'user', 'gitHub') ?> - - -
    - -
    -
    - -
    \ No newline at end of file -- cgit v1.2.3