Skip to content

Commit

Permalink
fix(theme): fix password update for portal (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
oyo authored Apr 25, 2024
1 parent 7a16b06 commit c1939c3
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation
* Copyright (c) 2021, 2024 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
Expand Down Expand Up @@ -136,7 +136,6 @@ const Messages = {
HAS_UPPER: 'contains upper case characters [A-Z]',
HAS_NUMBER: 'contains numbers [0-9]',
HAS_SPECIAL: 'contains characters other than [a-z] [A-Z] [0-9]',
NOT_USERNAME: 'is not equal to your username',
OK_CONFIRM: 'confirmation and password are equal',
}
}
Expand All @@ -150,7 +149,6 @@ class Validator {
['HAS_UPPER', /[A-Z]/],
['HAS_NUMBER', /\d/],
['HAS_SPECIAL', /[^a-zA-Z0-9]/],
['NOT_USERNAME', (expr) => expr !== '' && expr !== State.getInstance().atts.username],
['OK_CONFIRM', (expr) => expr !== '' && expr === State.getInstance().atts.confirm],
]

Expand Down Expand Up @@ -386,7 +384,7 @@ class FormUpdate extends Form {
}
this.button = document.querySelectorAll('input[type=submit]')[0]
this.button.setAttribute('disabled', '')
State.getInstance().setUsername(document.getElementById('username').value)
State.getInstance().setUsername(document.getElementById('username')?.value ?? '')
Validator.getInstance()
return this
}
Expand Down

0 comments on commit c1939c3

Please sign in to comment.