Skip to content

Commit 8fa25f5

Browse files
author
Antoine Makdessi
committed
a
1 parent 6e64cf0 commit 8fa25f5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

assets/controllers/login-controller.js

+4
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,24 @@ export default class extends Controller {
1717
connect() {
1818
console.log(this.usernameTarget, this.passwordTarget)
1919
}
20+
2021
prefillJohnUser() {
2122
console.log('Prefill John User')
23+
2224
this.usernameTarget.value = 'john_user'
2325
this.passwordTarget.value = 'kitten'
2426
}
2527

2628
prefillJaneAdmin() {
2729
console.log('Prefill Jane Admin')
30+
2831
this.usernameTarget.value = 'jane_admin'
2932
this.passwordTarget.value = 'kitten'
3033
}
3134

3235
togglePasswordInputType() {
3336
console.log('Toggle Password Input Type')
37+
3438
if ('password' === this.passwordTarget.type) {
3539
this.passwordTarget.type = 'text'
3640
} else {

0 commit comments

Comments
 (0)