File tree 4 files changed +26
-6
lines changed
features/admin.identity-providers.v1/components/forms/authenticators
translations/en-US/portals
4 files changed +26
-6
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @wso2is/admin.identity-providers.v1 " : patch
3
+ " @wso2is/console " : patch
4
+ " @wso2is/i18n " : patch
5
+ ---
6
+
7
+ Add SMS otp authenticator resend attempt config to UI
Original file line number Diff line number Diff line change @@ -494,12 +494,11 @@ export const SMSOTPAuthenticatorForm: FunctionComponent<SMSOTPAuthenticatorFormP
494
494
}
495
495
</ Label >
496
496
</ Field . Input >
497
- { /* TODO: Uncomment resend attempt count field once it's finalized.
498
-
499
497
< Field . Input
500
498
ariaLabel = "Allowed Resend Attempts"
501
499
inputType = "number"
502
500
name = "SmsOTP_ResendAttemptsCount"
501
+ labelPosition = "right"
503
502
label = {
504
503
t ( "authenticationProvider:forms.authenticatorSettings" +
505
504
".smsOTP.allowedResendAttemptCount.label" )
@@ -521,21 +520,33 @@ export const SMSOTPAuthenticatorForm: FunctionComponent<SMSOTPAuthenticatorFormP
521
520
}
522
521
required = { true }
523
522
readOnly = { readOnly }
523
+ max = {
524
+ ConnectionUIConstants
525
+ . SMS_OTP_AUTHENTICATOR_SETTINGS_FORM_FIELD_CONSTRAINTS . ALLOWED_RESEND_ATTEMPT_COUNT_MAX_VALUE
526
+ }
527
+ min = {
528
+ ConnectionUIConstants
529
+ . SMS_OTP_AUTHENTICATOR_SETTINGS_FORM_FIELD_CONSTRAINTS . ALLOWED_RESEND_ATTEMPT_COUNT_MIN_VALUE
530
+ }
524
531
maxLength = {
525
- IdentityProviderManagementConstants
532
+ ConnectionUIConstants
526
533
. SMS_OTP_AUTHENTICATOR_SETTINGS_FORM_FIELD_CONSTRAINTS . ALLOWED_RESEND_ATTEMPT_COUNT_MAX_LENGTH
527
534
}
528
535
minLength = {
529
- IdentityProviderManagementConstants
536
+ ConnectionUIConstants
530
537
. SMS_OTP_AUTHENTICATOR_SETTINGS_FORM_FIELD_CONSTRAINTS . ALLOWED_RESEND_ATTEMPT_COUNT_MIN_LENGTH
531
538
}
532
539
width = { 12 }
533
540
data-testid = { `${ testId } -allowed-resend-attempt-count` }
534
541
>
535
542
< input />
543
+ < Label >
544
+ {
545
+ t ( "authenticationProvider:forms.authenticatorSettings" +
546
+ ".smsOTP.allowedResendAttemptCount.unit" )
547
+ }
548
+ </ Label >
536
549
</ Field . Input >
537
-
538
- */ }
539
550
< Field . Button
540
551
form = { FORM_ID }
541
552
size = "small"
Original file line number Diff line number Diff line change @@ -334,6 +334,7 @@ export interface AuthenticationProviderNS {
334
334
hint : string ;
335
335
label : string ;
336
336
placeholder : string ;
337
+ unit : string ;
337
338
validations : {
338
339
required : string ;
339
340
invalid : string ;
Original file line number Diff line number Diff line change @@ -813,6 +813,7 @@ export const authenticationProvider:AuthenticationProviderNS = {
813
813
hint : "The number of allowed OTP resend attempts." ,
814
814
label : "Allowed OTP resend attempt count" ,
815
815
placeholder : "Enter allowed resend attempt count." ,
816
+ unit : "attempts" ,
816
817
validations : {
817
818
invalid : "Allowed OTP resend attempt count should be an integer." ,
818
819
range : "Allowed OTP resend attempt count should be between 0 & 100." ,
You can’t perform that action at this time.
0 commit comments