File tree Expand file tree Collapse file tree 2 files changed +29
-3
lines changed
src/BootstrapBlazor.Server/Components/Samples Expand file tree Collapse file tree 2 files changed +29
-3
lines changed Original file line number Diff line number Diff line change 66 .input-group-text {
77 --bb-input-group-label-width : 100px ;
88 }
9+
10+ .otp-input-demo {
11+ text-align : center ;
12+ }
913 </style >
1014</HeadContent >
1115
1721 <p >@( (MarkupString )Localizer [" OtpInputsTips" ].Value ) </p >
1822</Tips >
1923
20- <DemoBlock Title =" @Localizer[" OtpInputsTypeTitle " ]"
21- Introduction =" @Localizer[" OtpInputsTypeIntro " ]"
22- Name =" Type " >
24+ <DemoBlock Title =" @Localizer[" OtpInputsNormalTitle " ]"
25+ Introduction =" @Localizer[" OtpInputsNormalIntro " ]"
26+ Name =" Normal " >
2327 <div class =" row g-3 mb-3" >
2428 <div class =" col-12 col-sm-6" >
2529 <BootstrapInputGroup >
4852 </div >
4953 <OtpInput Value =" @_value" Type =" _otpInputType" PlaceHolder =" @_placeHolder" IsReadonly =" _readonly" IsDisabled =" _disabled" ></OtpInput >
5054</DemoBlock >
55+
56+ <DemoBlock Title =" @Localizer[" OtpInputsValidateFormTitle " ]"
57+ Introduction =" @Localizer[" OtpInputsValidateFormIntro " ]"
58+ Name =" ValidateForm" >
59+ <ValidateForm Model =" @_model" >
60+ <div class =" row g-3" >
61+ <div class =" col-12" >
62+ <BootstrapInput @bind-Value =" @_model.UserName" />
63+ </div >
64+ <div class =" col-12" >
65+ <GroupBox Title =" 2FA" class =" otp-input-demo" >
66+ <OtpInput @bind-Value =" @_model.Password" ></OtpInput >
67+ </GroupBox >
68+ </div >
69+ <div class =" col-12" >
70+ <Button ButtonType =" ButtonType.Submit" Icon =" fa-fw fa-solid fa-save" Text =" Submit" ></Button >
71+ </div >
72+ </div >
73+ </ValidateForm >
74+ </DemoBlock >
Original file line number Diff line number Diff line change @@ -19,4 +19,6 @@ public partial class OtpInputs
1919 private bool _readonly = false ;
2020
2121 private bool _disabled = false ;
22+
23+ private LoginModel _model = new ( ) { UserName = "Admin" , Password = "" } ;
2224}
You can’t perform that action at this time.
0 commit comments