changes to implement an option to view the password beeing typed in
This commit is contained in:
@@ -228,7 +228,12 @@
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="new-password" class="form-label">Neues Passwort:</label>
|
||||
<input type="password" class="form-control" id="new-password" name="new_password" required>
|
||||
<div class="input-group">
|
||||
<input type="password" class="form-control" id="new-password" name="new_password" required>
|
||||
<button class="btn btn-outline-secondary" type="button" id="togglePasswordBtn" onclick="togglePasswordVisibility()">
|
||||
Anzeigen
|
||||
</button>
|
||||
</div>
|
||||
<div class="password-requirements small text-muted mt-1">
|
||||
<p>Das Passwort muss mindestens 6 Zeichen lang sein.</p>
|
||||
</div>
|
||||
@@ -397,14 +402,36 @@
|
||||
modal.show();
|
||||
}
|
||||
|
||||
function togglePasswordVisibility() {
|
||||
var passwordInput = document.getElementById('new-password');
|
||||
var toggleBtn = document.getElementById('togglePasswordBtn');
|
||||
|
||||
if (passwordInput.type === 'password') {
|
||||
passwordInput.type = 'text';
|
||||
toggleBtn.textContent = 'Verbergen';
|
||||
} else {
|
||||
passwordInput.type = 'password';
|
||||
toggleBtn.textContent = 'Anzeigen';
|
||||
}
|
||||
}
|
||||
|
||||
function openResetPasswordModal(username) {
|
||||
document.getElementById('reset-username').value = username;
|
||||
document.getElementById('username-display').value = username;
|
||||
|
||||
|
||||
var passwordInput = document.getElementById('new-password');
|
||||
var toggleBtn = document.getElementById('togglePasswordBtn');
|
||||
|
||||
// Reset password field state on modal open
|
||||
passwordInput.value = '';
|
||||
passwordInput.type = 'password';
|
||||
if (toggleBtn) {
|
||||
toggleBtn.textContent = 'Anzeigen';
|
||||
}
|
||||
|
||||
var modal = new bootstrap.Modal(document.getElementById('resetPasswordModal'));
|
||||
modal.show();
|
||||
}
|
||||
|
||||
function openPermissionsModal(button) {
|
||||
var username = button.getAttribute('data-username') || '';
|
||||
var preset = button.getAttribute('data-preset') || 'standard_user';
|
||||
|
||||
Reference in New Issue
Block a user