Skip to content

Commit

Permalink
Merge pull request kitodo#5811 from effective-webwork/reset-password-…
Browse files Browse the repository at this point in the history
…input-fields

Always reset password input fields when opening 'change password' dialog
  • Loading branch information
solth authored Oct 18, 2023
2 parents 99e97da + 3551dd3 commit 3dd478b
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 3dd478b

Please sign in to comment.