diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-07-14 20:37:27 -0230 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-07-14 20:37:27 -0230 |
commit | 0db514bbf7a474220aeee48b7556ed1293014f1b (patch) | |
tree | b10625eb424d9baf7ee9d9bc6d5aa334ff08c6b9 | |
parent | 1583427190bc0dc47224f0750810f65a1f1243b6 (diff) |
Centered login form (merge pull-requests #142 and #143)
-rw-r--r-- | app/Templates/user_login.php | 62 | ||||
-rw-r--r-- | assets/css/app.css | 5 |
2 files changed, 36 insertions, 31 deletions
diff --git a/app/Templates/user_login.php b/app/Templates/user_login.php index 948a19e7..9eb4fa17 100644 --- a/app/Templates/user_login.php +++ b/app/Templates/user_login.php @@ -1,38 +1,42 @@ -<div class="page-header"> - <h1><?= t('Sign in') ?></h1> -</div> +<div class="form-login"> -<?php if (isset($errors['login'])): ?> - <p class="alert alert-error"><?= Helper\escape($errors['login']) ?></p> -<?php endif ?> + <div class="page-header"> + <h1><?= t('Sign in') ?></h1> + </div> -<form method="post" action="?controller=user&action=check" class="form-login"> + <?php if (isset($errors['login'])): ?> + <p class="alert alert-error"><?= Helper\escape($errors['login']) ?></p> + <?php endif ?> - <?= Helper\form_csrf() ?> + <form method="post" action="?controller=user&action=check"> - <?= Helper\form_label(t('Username'), 'username') ?> - <?= Helper\form_text('username', $values, $errors, array('autofocus', 'required')) ?><br/> + <?= Helper\form_csrf() ?> - <?= Helper\form_label(t('Password'), 'password') ?> - <?= Helper\form_password('password', $values, $errors, array('required')) ?> + <?= Helper\form_label(t('Username'), 'username') ?> + <?= Helper\form_text('username', $values, $errors, array('autofocus', 'required')) ?><br/> - <?= Helper\form_checkbox('remember_me', t('Remember Me'), 1) ?><br/> + <?= Helper\form_label(t('Password'), 'password') ?> + <?= Helper\form_password('password', $values, $errors, array('required')) ?> - <ul> - <?php if (GOOGLE_AUTH): ?> - <li> - <a href="?controller=user&action=google"><?= t('Login with my Google Account') ?></a> - </li> - <?php endif ?> + <?= Helper\form_checkbox('remember_me', t('Remember Me'), 1) ?><br/> - <?php if (GITHUB_AUTH): ?> - <li> - <a href="?controller=user&action=gitHub"><?= t('Login with my GitHub Account') ?></a> - </li> - <?php endif ?> - </ul> + <ul> + <?php if (GOOGLE_AUTH): ?> + <li> + <a href="?controller=user&action=google"><?= t('Login with my Google Account') ?></a> + </li> + <?php endif ?> - <div class="form-actions"> - <input type="submit" value="<?= t('Sign in') ?>" class="btn btn-blue"/> - </div> -</form>
\ No newline at end of file + <?php if (GITHUB_AUTH): ?> + <li> + <a href="?controller=user&action=gitHub"><?= t('Login with my GitHub Account') ?></a> + </li> + <?php endif ?> + </ul> + + <div class="form-actions"> + <input type="submit" value="<?= t('Sign in') ?>" class="btn btn-blue"/> + </div> + </form> + +</div>
\ No newline at end of file diff --git a/assets/css/app.css b/assets/css/app.css index e5db0885..f0d7b00d 100644 --- a/assets/css/app.css +++ b/assets/css/app.css @@ -254,8 +254,9 @@ input.form-date { } .form-login { - padding-left: 20px; - width: 430px; + width: 470px; + padding: 10px; + margin: 3% auto 20% auto; } .form-column li, |