Merge pull request #10572 from nextcloud/bugfix/10464/security-password-change

Fix security settings if password change is disabled
This commit is contained in:
Roeland Jago Douma 2018-08-08 08:32:54 +02:00 committed by GitHub
commit bee65f8053
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 6 deletions

View File

@ -22,7 +22,6 @@
*/ */
script('settings', [ script('settings', [
'security_password',
'authtoken', 'authtoken',
'authtoken_collection', 'authtoken_collection',
'authtoken_view', 'authtoken_view',
@ -30,18 +29,18 @@ script('settings', [
]); ]);
if($_['passwordChangeSupported']) { if($_['passwordChangeSupported']) {
script('settings', 'security_password');
script('jquery-showpassword'); script('jquery-showpassword');
vendor_script('strengthify/jquery.strengthify'); vendor_script('strengthify/jquery.strengthify');
vendor_style('strengthify/strengthify'); vendor_style('strengthify/strengthify');
} }
?> ?>
<?php if($_['passwordChangeSupported']) { ?>
<div id="security-password" class="section"> <div id="security-password" class="section">
<h2 class="inlineblock"><?php p($l->t('Password'));?></h2> <h2 class="inlineblock"><?php p($l->t('Password'));?></h2>
<span id="password-error-msg" class="msg success hidden">Saved</span> <span id="password-error-msg" class="msg success hidden">Saved</span>
<div class="personal-settings-setting-box personal-settings-password-box"> <div class="personal-settings-setting-box personal-settings-password-box">
<?php if($_['passwordChangeSupported']) { ?>
<form id="passwordform"> <form id="passwordform">
<label for="pass1" class="hidden-visually"><?php p($l->t('Current password')); ?>: </label> <label for="pass1" class="hidden-visually"><?php p($l->t('Current password')); ?>: </label>
<input type="password" id="pass1" name="oldpassword" <input type="password" id="pass1" name="oldpassword"
@ -60,12 +59,10 @@ if($_['passwordChangeSupported']) {
<input id="passwordbutton" type="submit" value="<?php p($l->t('Change password')); ?>" /> <input id="passwordbutton" type="submit" value="<?php p($l->t('Change password')); ?>" />
</form> </form>
<?php
}
?>
</div> </div>
<span class="msg"></span> <span class="msg"></span>
</div> </div>
<?php } ?>
<div id="security" class="section"> <div id="security" class="section">
<h2><?php p($l->t('Devices & sessions'));?></h2> <h2><?php p($l->t('Devices & sessions'));?></h2>