Skip to content

Commit 7c2a7a4

Browse files
authored
Merge pull request #7303 from AmshikaH/master-self-registration-retention-issue
Fix input field value retention issue in self-registration form
2 parents 5fd6851 + 27e635a commit 7c2a7a4

File tree

2 files changed

+22
-10
lines changed

2 files changed

+22
-10
lines changed

.changeset/wise-knives-smash.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@wso2is/identity-apps-core": patch
3+
---
4+
5+
Fix input field value retention issue in self-registration form

identity-apps-core/apps/recovery-portal/src/main/webapp/self-registration-with-verification.jsp

+17-10
Original file line numberDiff line numberDiff line change
@@ -404,8 +404,9 @@
404404
<label class="control-label"><%=IdentityManagementEndpointUtil.i18n(recoveryResourceBundle, "First.name")%>*</label>
405405
<input id="firstNameUserInput" type="text" name="http://wso2.org/claims/givenname" class="form-control"
406406
<% if (firstNamePII.getRequired() || !piisConfigured) {%> required <%}%>
407-
<% if (skipSignUpEnableCheck && StringUtils.isNotEmpty(firstNameValue)) { %>
408-
value="<%= Encode.forHtmlAttribute(firstNameValue)%>" disabled <% } %>
407+
<% if (skipSignUpEnableCheck && StringUtils.isNotEmpty(firstNameValue)) { %> disabled <% } %>
408+
<% if (StringUtils.isNotEmpty(firstNameValue)) { %>
409+
value="<%= Encode.forHtmlAttribute(firstNameValue)%>"<% } %>
409410
placeholder="<%=IdentityManagementEndpointUtil.i18n(recoveryResourceBundle, "First.name")%>*"/>
410411
<div class="mt-1" id="firstname-error-msg" hidden="hidden">
411412
<i class="red exclamation circle fitted icon"></i>
@@ -423,8 +424,9 @@
423424
<label class="control-label"><%=IdentityManagementEndpointUtil.i18n(recoveryResourceBundle, "Last.name")%>*</label>
424425
<input id="lastNameUserInput" type="text" name="http://wso2.org/claims/lastname" class="form-control"
425426
<% if (lastNamePII.getRequired() || !piisConfigured) {%> required <%}%>
426-
<% if (skipSignUpEnableCheck && StringUtils.isNotEmpty(lastNameValue)) { %>
427-
value="<%= Encode.forHtmlAttribute(lastNameValue)%>" disabled <% } %>
427+
<% if (skipSignUpEnableCheck && StringUtils.isNotEmpty(lastNameValue)) { %> disabled <% } %>
428+
<% if (StringUtils.isNotEmpty(lastNameValue)) { %>
429+
value="<%= Encode.forHtmlAttribute(lastNameValue)%>"<% } %>
428430
placeholder="<%=IdentityManagementEndpointUtil.i18n(recoveryResourceBundle, "Last.name")%>*"
429431
/>
430432
<div class="mt-1" id="lastname-error-msg" hidden="hidden">
@@ -630,8 +632,9 @@
630632
<% if (claim.getRequired()) { %>
631633
required
632634
<% }%>
633-
<% if(skipSignUpEnableCheck && StringUtils.isNotEmpty(claimValue)) {%>
634-
value="<%= Encode.forHtmlAttribute(claimValue)%>" disabled<%}%>
635+
<% if (skipSignUpEnableCheck && StringUtils.isNotEmpty(claimValue)) {%> disabled <%}%>
636+
<% if (StringUtils.isNotEmpty(claimValue)) {%>
637+
value="<%= Encode.forHtmlAttribute(claimValue)%>"<%}%>
635638
/>
636639
<i class="dropdown icon"></i>
637640
<div class="default text">Enter Country</div>
@@ -653,8 +656,10 @@
653656
name="<%= Encode.forHtmlAttribute(claimURI) %>"
654657
id="birthOfDate"
655658
placeholder="Enter Birth Date"
656-
<% if(skipSignUpEnableCheck && StringUtils.isNotEmpty(claimValue)) {%>
657-
value="<%= Encode.forHtmlAttribute(claimValue)%>" disabled<%}%>
659+
<% if (skipSignUpEnableCheck && StringUtils.isNotEmpty(claimValue)) {%>
660+
disabled<% } %>
661+
<% if (StringUtils.isNotEmpty(claimValue)) { %>
662+
value="<%= Encode.forHtmlAttribute(claimValue)%>"<% } %>
658663
/>
659664
</div>
660665
</div>
@@ -675,8 +680,10 @@
675680
placeholder="<%=IdentityManagementEndpointUtil.i18nBase64(
676681
recoveryResourceBundle, claim.getDisplayName())%>"
677682
<% }%>
678-
<% if(skipSignUpEnableCheck && StringUtils.isNotEmpty(claimValue)) {%>
679-
value="<%= Encode.forHtmlAttribute(claimValue)%>" disabled<%}%>
683+
<% if (skipSignUpEnableCheck && StringUtils.isNotEmpty(claimValue)) {%>
684+
disabled<% } %>
685+
<% if (StringUtils.isNotEmpty(claimValue)) { %>
686+
value="<%= Encode.forHtmlAttribute(claimValue)%>"<% } %>
680687
/>
681688
<% } %>
682689
</div>

0 commit comments

Comments
 (0)