Skip to content

Commit

Permalink
Merge pull request #10572 from nextcloud/bugfix/10464/security-passwo…
Browse files Browse the repository at this point in the history
…rd-change

Fix security settings if password change is disabled
  • Loading branch information
rullzer authored Aug 8, 2018
2 parents 1cb8fe3 + 318682d commit bee65f8
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions settings/templates/settings/personal/security.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,25 @@
*/

script('settings', [
'security_password',
'authtoken',
'authtoken_collection',
'authtoken_view',
'settings/authtoken-init'
]);

if($_['passwordChangeSupported']) {
script('settings', 'security_password');
script('jquery-showpassword');
vendor_script('strengthify/jquery.strengthify');
vendor_style('strengthify/strengthify');
}

?>

<?php if($_['passwordChangeSupported']) { ?>
<div id="security-password" class="section">
<h2 class="inlineblock"><?php p($l->t('Password'));?></h2>
<span id="password-error-msg" class="msg success hidden">Saved</span>
<div class="personal-settings-setting-box personal-settings-password-box">
<?php if($_['passwordChangeSupported']) { ?>
<form id="passwordform">
<label for="pass1" class="hidden-visually"><?php p($l->t('Current password')); ?>: </label>
<input type="password" id="pass1" name="oldpassword"
Expand All @@ -60,12 +59,10 @@
<input id="passwordbutton" type="submit" value="<?php p($l->t('Change password')); ?>" />

</form>
<?php
}
?>
</div>
<span class="msg"></span>
</div>
<?php } ?>

<div id="security" class="section">
<h2><?php p($l->t('Devices & sessions'));?></h2>
Expand Down

0 comments on commit bee65f8

Please sign in to comment.