mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-02-27 23:34:25 +08:00
Merge pull request #2787 from nextcloud/password-field
show AIO password
This commit is contained in:
commit
6747613a34
3 changed files with 13 additions and 3 deletions
|
@ -39,6 +39,15 @@
|
|||
document.getElementById('overlay').classList.remove('loading');
|
||||
}
|
||||
|
||||
function showPassword(id) {
|
||||
let passwordField = document.getElementById(id);
|
||||
if (passwordField.type === "password" && passwordField.value !== "") {
|
||||
passwordField.type = "text";
|
||||
} else if (passwordField.type === "text" && passwordField.value === "") {
|
||||
passwordField.type = "password";
|
||||
}
|
||||
}
|
||||
|
||||
function initForm(form) {
|
||||
function submit(event)
|
||||
{
|
||||
|
|
|
@ -509,8 +509,8 @@
|
|||
<summary>Click here to change your AIO password</summary><br />
|
||||
You can change your AIO password below:<br><br />
|
||||
<form method="POST" action="/api/configuration" class="xhr">
|
||||
<input type="text" autocomplete="current-password" name="current-master-password" placeholder="Your current AIO password"/>
|
||||
<input type="text" autocomplete="new-password" name="new-master-password" placeholder="Your new AIO password"/>
|
||||
<input type="password" autocomplete="current-password" name="current-master-password" placeholder="Your current AIO password" id="current-master-password" oninput="showPassword('current-master-password')">
|
||||
<input type="password" autocomplete="new-password" name="new-master-password" placeholder="Your new AIO password" id="new-master-password" oninput="showPassword('new-master-password')">
|
||||
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
|
||||
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
|
||||
<input class="button" type="submit" value="Submit password change" />
|
||||
|
|
|
@ -8,7 +8,8 @@
|
|||
{% if is_login_allowed == true %}
|
||||
<p>Log in using your Nextcloud AIO password:</p>
|
||||
<form method="POST" action="/api/auth/login" class="xhr">
|
||||
<input type="text" autocomplete="off" name="password" placeholder="Password" />
|
||||
<input type="password" autocomplete="current-password" name="password" placeholder="Password" id="master-password" oninput="showPassword('master-password')">
|
||||
|
||||
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
|
||||
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
|
||||
<input type="submit" class="button" value="Log in" />
|
||||
|
|
Loading…
Reference in a new issue