Merge pull request 'Add email service and settings' (#154) from feature/email_service into master
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #154 Reviewed-by: galfert <garret.alfert@gmail.com>
This commit was merged in pull request #154.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import { Controller } from "@hotwired/stimulus"
|
||||
|
||||
export default class extends Controller {
|
||||
static targets = [ "resetPasswordButton", "currentPasswordField" ]
|
||||
static values = { validationFailed: Boolean }
|
||||
|
||||
connect () {
|
||||
if (this.validationFailedValue) return;
|
||||
|
||||
this.element.querySelectorAll(".initial-hidden").forEach(el => {
|
||||
el.classList.add("hidden");
|
||||
})
|
||||
this.element.querySelectorAll(".initial-visible").forEach(el => {
|
||||
el.classList.remove("hidden");
|
||||
})
|
||||
}
|
||||
|
||||
showPasswordReset () {
|
||||
this.element.querySelectorAll(".initial-visible").forEach(el => {
|
||||
el.classList.add("hidden");
|
||||
})
|
||||
this.element.querySelectorAll(".initial-hidden").forEach(el => {
|
||||
el.classList.remove("hidden");
|
||||
})
|
||||
this.currentPasswordFieldTarget.select();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user