Fix password visibility toggles

Signed-off-by: J0WI <J0WI@users.noreply.github.com>
Signed-off-by: npmbuildbot-nextcloud[bot] <npmbuildbot-nextcloud[bot]@users.noreply.github.com>
This commit is contained in:
J0WI 2020-11-13 16:44:08 +01:00 committed by npmbuildbot-nextcloud[bot]
parent 67f58b9c5f
commit f819df132c
12 changed files with 18 additions and 13 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -3,6 +3,8 @@ import { translate as t } from '@nextcloud/l10n'
import { getToken } from './OC/requesttoken' import { getToken } from './OC/requesttoken'
import getURLParameter from './Util/get-url-parameter' import getURLParameter from './Util/get-url-parameter'
import './jquery/showpassword'
import 'jquery-ui/ui/widgets/button' import 'jquery-ui/ui/widgets/button'
import 'jquery-ui/themes/base/theme.css' import 'jquery-ui/themes/base/theme.css'
import 'jquery-ui/themes/base/button.css' import 'jquery-ui/themes/base/button.css'
@ -134,4 +136,7 @@ $(document).ready(function() {
drawTitles: true, drawTitles: true,
nonce: btoa(getToken()), nonce: btoa(getToken()),
}) })
$('#dbpass').showPassword().keyup()
$('#adminpass').showPassword().keyup()
}) })

View File

@ -49,8 +49,8 @@ script('core', [
value="<?php p($_['adminpass']); ?>" value="<?php p($_['adminpass']); ?>"
autocomplete="off" autocapitalize="none" autocorrect="off" required> autocomplete="off" autocapitalize="none" autocorrect="off" required>
<label for="adminpass" class="infield"><?php p($l->t('Password')); ?></label> <label for="adminpass" class="infield"><?php p($l->t('Password')); ?></label>
<input type="checkbox" id="show" class="hidden-visually" name="show"> <input type="checkbox" id="show" class="hidden-visually" name="show" aria-label="<?php p($l->t('Show password')); ?>">
<label for="show" class="hidden-visually"><?php p($l->t('Show password')); ?></label> <label for="show"></label>
</p> </p>
</fieldset> </fieldset>
@ -115,7 +115,7 @@ script('core', [
value="<?php p($_['dbpass']); ?>" value="<?php p($_['dbpass']); ?>"
autocomplete="off" autocapitalize="none" autocorrect="off"> autocomplete="off" autocapitalize="none" autocorrect="off">
<label for="dbpass" class="infield"><?php p($l->t('Database password')); ?></label> <label for="dbpass" class="infield"><?php p($l->t('Database password')); ?></label>
<input type="checkbox" id="dbpassword-toggle" class="hidden-visually" name="dbpassword-toggle"> <input type="checkbox" id="dbpassword-toggle" class="hidden-visually" name="dbpassword-toggle" aria-label="<?php p($l->t('Show password')); ?>">
<label for="dbpassword-toggle"></label> <label for="dbpassword-toggle"></label>
</p> </p>
<p class="groupmiddle"> <p class="groupmiddle">