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