diff options
Diffstat (limited to 'app/view')
-rw-r--r-- | app/view/templates/backtopbar.php | 3 | ||||
-rw-r--r-- | app/view/templates/connect.php | 4 | ||||
-rw-r--r-- | app/view/templates/user.php | 21 |
3 files changed, 21 insertions, 7 deletions
diff --git a/app/view/templates/backtopbar.php b/app/view/templates/backtopbar.php index 0710c85..597ae6f 100644 --- a/app/view/templates/backtopbar.php +++ b/app/view/templates/backtopbar.php @@ -61,7 +61,8 @@ if($user->isadmin()) { <form action="<?= $this->url('log') ?>" method="post" id="connect"> -<input type="password" name="pass" id="loginpass" placeholder="password" autofocus> +<input type="text" name="user" id="loginuser" autofocus placeholder="user" > +<input type="password" name="pass" id="loginpass" placeholder="password" > <input type="hidden" name="route" value="home"> <input type="hidden" name="rememberme" value="0"> <input type="checkbox" name="rememberme" id="rememberme" value="1"> diff --git a/app/view/templates/connect.php b/app/view/templates/connect.php index 6fd5b14..7f10384 100644 --- a/app/view/templates/connect.php +++ b/app/view/templates/connect.php @@ -18,7 +18,9 @@ if(in_array($route, ['pageedit', 'pageread', 'pageread/', 'pageadd'])) { echo '<input type="hidden" name="id" value="'. $id .'">'; } ?> -<input type="password" name="pass" id="loginpass" placeholder="password" autofocus> +<form action="<?= $this->url('log') ?>" method="post" id="connect"> +<input type="text" name="user" id="loginuser" autofocus placeholder="user" > +<input type="password" name="pass" id="loginpass" placeholder="password" > <input type="hidden" name="rememberme" value="0"> <input type="checkbox" name="rememberme" id="rememberme" value="1"> <label for="rememberme">Remember me</label> diff --git a/app/view/templates/user.php b/app/view/templates/user.php index ca944fd..f77699d 100644 --- a/app/view/templates/user.php +++ b/app/view/templates/user.php @@ -1,4 +1,8 @@ -<?php $this->layout('layout', ['title' => 'user', 'stylesheets' => [$css . 'home.css']]) ?> +<?php + +use Wcms\Model; + +$this->layout('layout', ['title' => 'user', 'stylesheets' => [$css . 'home.css']]) ?> <?php $this->start('page') ?> @@ -37,7 +41,14 @@ <input type="number" name="cookie" value="<?= $getuser->cookie() ?>" id="cookie" min="0" max="365"> <label for="cookie">Cookie conservation time <i>(In days)</i></label> <p>When you tick the <em>remember-me</em> checkbox during login, you can choose how much time <strong>W</strong> will remember you.</p> - <input type="submit" value="submit"> + + <input type="password" name="password" id="password" minlength="<?= Wcms\Model::PASSWORD_MIN_LENGTH ?>" maxlength="<?= Wcms\Model::PASSWORD_MAX_LENGTH ?>"> + <label for="password">New password</label> + + <input type="hidden" name="passwordhash" value="1"> + + </br> + <input type="submit" value="update"> </p> </form> @@ -91,10 +102,10 @@ <tr> <form action="<?= $this->url('useradd') ?>" method="post"> <td> - <input type="text" name="id" maxlength="128" required> + <input type="text" name="id" maxlength="<?= Wcms\Model::MAX_ID_LENGTH ?>" required> </td> <td> - <input type="password" name="password" minlength="4" maxlength="64" required> + <input type="password" name="password" id="password" minlength="<?= Wcms\Model::PASSWORD_MIN_LENGTH ?>" maxlength="<?= Wcms\Model::PASSWORD_MAX_LENGTH ?>" required> </td> <td> @@ -140,7 +151,7 @@ </td> <td> - <input type="password" name="password" minlength="4" maxlength="64" > + <input type="password" name="password" minlength="<?= Wcms\Model::PASSWORD_MIN_LENGTH ?>" maxlength="<?= Wcms\Model::PASSWORD_MAX_LENGTH ?>" > </td> <td> |