mirror of
https://github.com/RaspAP/raspap-webgui.git
synced 2024-11-21 15:10:22 +00:00
Apply validation to authentication form + update locale
This commit is contained in:
parent
ac339d16ef
commit
e90f87ac63
2 changed files with 29 additions and 5 deletions
|
@ -98,6 +98,18 @@ msgstr "New password"
|
|||
msgid "Repeat new password"
|
||||
msgstr "Repeat new password"
|
||||
|
||||
msgid "Please provide a valid username."
|
||||
msgstr "Please provide a valid username."
|
||||
|
||||
msgid "Please enter your old password."
|
||||
msgstr "Please enter your old password."
|
||||
|
||||
msgid "Please enter a new password."
|
||||
msgstr "Please enter a new password."
|
||||
|
||||
msgid "Please re-enter your new password."
|
||||
msgstr "Please re-enter your new password."
|
||||
|
||||
#: includes/configure_client.php
|
||||
msgid "Client settings"
|
||||
msgstr "Client settings"
|
||||
|
|
|
@ -11,22 +11,28 @@
|
|||
<div class="card-body">
|
||||
<?php $status->showMessages(); ?>
|
||||
<h4><?php echo _("Authentication settings") ;?></h4>
|
||||
<form role="form" action="auth_conf" method="POST">
|
||||
<form role="form" action="auth_conf" method="POST" class="needs-validation" novalidate>
|
||||
<?php echo CSRFTokenFieldTag() ?>
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="username"><?php echo _("Username"); ?></label>
|
||||
<input type="text" class="form-control" name="username" value="<?php echo htmlspecialchars($username, ENT_QUOTES); ?>"/>
|
||||
<input type="text" class="form-control" name="username" value="<?php echo htmlspecialchars($username, ENT_QUOTES); ?>" required />
|
||||
<div class="invalid-feedback">
|
||||
<?php echo _("Please provide a valid username."); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6">
|
||||
<div class="mb-2"><?php echo _("Old password"); ?></div>
|
||||
<div class="input-group">
|
||||
<input type="password" class="form-control" name="oldpass"/>
|
||||
<input type="password" class="form-control" name="oldpass" required />
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-light js-toggle-password" type="button" data-target="[name=oldpass]" data-toggle-with="fas fa-eye-slash"><i class="fas fa-eye mx-2"></i></button>
|
||||
</div>
|
||||
<div class="invalid-feedback">
|
||||
<?php echo _("Please enter your old password."); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -34,10 +40,13 @@
|
|||
<div class="form-group col-md-6">
|
||||
<div class="mb-2"><?php echo _("New password"); ?></div>
|
||||
<div class="input-group">
|
||||
<input type="password" class="form-control" name="newpass"/>
|
||||
<input type="password" class="form-control" name="newpass" required />
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-light js-toggle-password" type="button" data-target="[name=newpass]" data-toggle-with="fas fa-eye-slash"><i class="fas fa-eye mx-2"></i></button>
|
||||
</div>
|
||||
<div class="invalid-feedback">
|
||||
<?php echo _("Please enter a new password."); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -45,10 +54,13 @@
|
|||
<div class="form-group col-md-6">
|
||||
<div class="mb-2"><?php echo _("Repeat new password"); ?></div>
|
||||
<div class="input-group">
|
||||
<input type="password" class="form-control" name="newpassagain"/>
|
||||
<input type="password" class="form-control" name="newpassagain" required />
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-light js-toggle-password" type="button" data-target="[name=newpassagain]" data-toggle-with="fas fa-eye-slash"><i class="fas fa-eye mx-2"></i></button>
|
||||
</div>
|
||||
<div class="invalid-feedback">
|
||||
<?php echo _("Please re-enter your new password."); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue