Skip to content

Commit

Permalink
Always reset password input fields when opening 'change password' dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
solth committed Oct 13, 2023
1 parent ea50685 commit 3551dd3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@
<div>
<!-- old password -->
<h:outputLabel for="oldPassword" value="#{msgs.oldPassword}"/>
<p:password redisplay="true" id="oldPassword" class="password"
<p:password redisplay="false" id="oldPassword" class="password"
value="#{UserForm.oldPassword}" label="#{msgs.oldPassword}"
required="true"/>
</div>

<div>
<!-- new password -->
<h:outputLabel for="newPassword" value="#{msgs.newPassword}"/>
<p:password redisplay="true" id="newPassword" class="password"
<p:password redisplay="false" id="newPassword" class="password"
value="#{UserForm.passwordToEncrypt}" label="#{msgs.newPassword}"
match="newPasswordRepeat" required="true"
validatorMessage="#{msgs.passwordsDontMatch}"/>
Expand All @@ -50,7 +50,7 @@
<div>
<!-- repeat new password -->
<h:outputLabel for="newPasswordRepeat" value="#{msgs.confirmNewPassword}"/>
<p:password redisplay="true" id="newPasswordRepeat" class="password"
<p:password redisplay="false" id="newPasswordRepeat" class="password"
value="#{UserForm.passwordToEncrypt}" label="#{msgs.confirmNewPassword}"
required="true"/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,10 @@
icon="fa fa-pencil fa-lg"
iconPos="right"
immediate="true"
update=":changePasswordForm"
styleClass="seoncdary"
rendered="#{isConfigMode}">
<p:resetInput target=":changePasswordForm"/>
</p:commandButton>
<p:commandButton onclick="PF('resetPasswordDialog').show()"
id="resetPasswordButton"
Expand All @@ -89,7 +91,9 @@
iconPos="right"
immediate="true"
styleClass="secondary"
update=":resetPasswordForm"
rendered="#{isEditMode}">
<p:resetInput target=":resetPasswordForm"/>
</p:commandButton>
</div>
</p:row>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<!-- new password -->
<p:outputLabel for="newPassword"
value="#{msgs.newPassword}"/>
<p:password redisplay="true"
<p:password redisplay="false"
id="newPassword"
class="password"
value="#{UserForm.passwordToEncrypt}"
Expand All @@ -47,7 +47,7 @@
<!-- repeat new password -->
<h:outputLabel for="newPasswordRepeat"
value="#{msgs.confirmNewPassword}"/>
<p:password redisplay="true"
<p:password redisplay="false"
id="newPasswordRepeat"
class="password"
value="#{UserForm.passwordToEncrypt}"
Expand Down

0 comments on commit 3551dd3

Please sign in to comment.