diff --git a/changes/changelog.d/1591.bugfix b/changes/changelog.d/1591.bugfix new file mode 100644 index 0000000000000000000000000000000000000000..7945af2b8933311a69b0f2a967a24502e9ce7d30 --- /dev/null +++ b/changes/changelog.d/1591.bugfix @@ -0,0 +1 @@ +Fixed delete account button is not disalbed when missing password (#1591) diff --git a/front/src/components/auth/Settings.vue b/front/src/components/auth/Settings.vue index eea38d2087db198dd37e93e869dca9f08c42340a..bbd4ec8c21dc6f2321eb1169d56048a327460ce9 100644 --- a/front/src/components/auth/Settings.vue +++ b/front/src/components/auth/Settings.vue @@ -328,7 +328,7 @@ <password-input field-id="current-password-field" required v-model="password" /> </div> <dangerous-button - :class="['ui', {'loading': isDeletingAccount}, {disabled: !password}, 'danger', 'button']" + :class="['ui', {'loading': isDeletingAccount}, {disabled: !password}, {danger: password}, 'button']" :action="deleteAccount"> <translate translate-context="*/*/Button.Label">Delete my account…</translate> <p slot="modal-header"><translate translate-context="Popup/Settings/Title">Do you want to delete your account?</translate></p> diff --git a/front/src/style/components/_button.scss b/front/src/style/components/_button.scss index 7cb685336d0419372bebb6c7ef106c92aa5b2719..afb8b4e8cc0fa478dffdf1352c2751eb46b5d835 100644 --- a/front/src/style/components/_button.scss +++ b/front/src/style/components/_button.scss @@ -92,10 +92,18 @@ button.reset { margin-right: 0; } - .ui.inverted.buttons .button:hover, .ui.inverted.button:hover, .ui.inverted.buttons .button:focus, .ui.inverted.button:focus { color: white; } + +.ui.button:disabled, .ui.buttons .disabled.button:not(.basic), .ui.disabled.active.button, .ui.disabled.button, .ui.disabled.button:hover { + cursor: default; + opacity: .45 !important; + background-image: none; + -webkit-box-shadow: none; + box-shadow: none; + pointer-events: none !important; +}