Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix security settings if password change is disabled #10572

Merged
merged 1 commit into from
Aug 8, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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