diff --git a/TIAM.Entities/TransferDestinations/TransferDestination.cs b/TIAM.Entities/TransferDestinations/TransferDestination.cs index adcb8f16..fd3e7fc9 100644 --- a/TIAM.Entities/TransferDestinations/TransferDestination.cs +++ b/TIAM.Entities/TransferDestinations/TransferDestination.cs @@ -17,8 +17,7 @@ namespace TIAM.Entities.TransferDestinations public Guid AddressId { get; set; } public virtual Address Address { get; set; } - - //[Required(ErrorMessage = "The Username value should be specified.")] + public string Name { get; set; } public string Description { get; set; } diff --git a/TIAMMobileApp/TIAMMobileApp.csproj.user b/TIAMMobileApp/TIAMMobileApp.csproj.user index 597a1517..528bd322 100644 --- a/TIAMMobileApp/TIAMMobileApp.csproj.user +++ b/TIAMMobileApp/TIAMMobileApp.csproj.user @@ -10,6 +10,9 @@ ProjectDebugger + + ProjectDebugger + Designer diff --git a/TIAMSharedUI/Pages/Components/InputWizard.razor b/TIAMSharedUI/Pages/Components/InputWizard.razor index ce89e1a1..1b36779c 100644 --- a/TIAMSharedUI/Pages/Components/InputWizard.razor +++ b/TIAMSharedUI/Pages/Components/InputWizard.razor @@ -4,7 +4,7 @@
-
+
(this, str => SetPhoneNumber(property, Data, str))); //editor.AddAttribute(j++, "TextChanged", EventCallback.Factory.Create(this, str => { property.SetValue(Data, str); })); - editor.AddAttribute(i++, "Template", (RenderFragment)((context) => ((regexProperties) => + /*editor.AddAttribute(i++, "Template", (RenderFragment)((context) => ((regexProperties) => { var l = 0; regexProperties.OpenComponent(l++); regexProperties.AddAttribute(l++, "Placeholder", "#"); regexProperties.AddAttribute(l++, "PlaceholdersVisible", false); regexProperties.CloseComponent(); - }))); + })));*/ editor.CloseComponent(); break; } @@ -235,7 +236,7 @@ namespace TIAMSharedUI.Pages.Components editor.AddAttribute(j++, "Mask", TIAMRegularExpressions.EmailMask); editor.AddAttribute(j++, "MaskMode", MaskMode.RegEx); - editor.AddAttribute(j++, "BindValueMode", BindValueMode.OnLostFocus); + editor.AddAttribute(j++, "BindValueMode", BindValueMode.OnInput); //MaskAutoCompleteMode="@((MaskAutoCompleteMode)AutoCompleteMode)" editor.AddAttribute(j++, "MaskAutoCompleteMode", MaskAutoCompleteMode.None); editor.AddAttribute(j++, "NullText", "example@example.com"); @@ -344,6 +345,8 @@ namespace TIAMSharedUI.Pages.Components editor.OpenComponent(j); editor.AddAttribute(j++, "OwlId", "owlSelector" + _stepID); + editor.AddAttribute(j++, "TextValue", property.GetValue(Data)); + //editor.AddAttribute(j++, "TExpression", lambda); editor.AddAttribute(j++, "OnSliderChanged", EventCallback.Factory.Create(this, result => { LogToBrowserConsole.LogToBC($"Slider changed to {result}"); @@ -356,6 +359,7 @@ namespace TIAMSharedUI.Pages.Components editor.OpenComponent(j++); editor.AddAttribute(j++, "CssClass", "form-field"); editor.AddAttribute(j++, "NullText", "Slide or type"); + editor.AddAttribute(j++, "Enabled", false); editor.AddAttribute(j++, "Text", property.GetValue(Data)); editor.AddAttribute(j++, "TextExpression", lambda); editor.AddAttribute(j++, "TextChanged", EventCallback.Factory.Create(this, str => { @@ -472,4 +476,33 @@ namespace TIAMSharedUI.Pages.Components property.SetValue(Data, str); } } + + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false)] + public class MinPasswordLengthAttribute : ValidationAttribute + { + int MinLength { get; } + public MinPasswordLengthAttribute(int minLength, string errorMsg) : base(errorMsg) + { + MinLength = minLength; + } + + public override bool IsValid(object value) + { + return ((string)value).Length >= MinLength; + } + } + + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false)] + public class EmailAttribute : ValidationAttribute + { + public override bool IsValid(object value) + { + return Regex.IsMatch((string)value, @"^[\w!#$%&'*+\-/=?\^_`{|}~]+(\.[\w!#$%&'*+\-/=?\^_`{|}~]+)*" + + "@" + + @"((([\-\w]+\.)+[a-zA-Z]{2,4})|(([0-9]{1,3}\.){3}[0-9]{1,3}))$"); + } + } + + + } diff --git a/TIAMSharedUI/Pages/Components/TestUserData.cs b/TIAMSharedUI/Pages/Components/TestUserData.cs index 65ad41ca..00724568 100644 --- a/TIAMSharedUI/Pages/Components/TestUserData.cs +++ b/TIAMSharedUI/Pages/Components/TestUserData.cs @@ -78,29 +78,5 @@ namespace TIAMSharedUI.Pages.Components }; } - [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false)] - public class MinPasswordLengthAttribute : ValidationAttribute - { - int MinLength { get; } - public MinPasswordLengthAttribute(int minLength, string errorMsg) : base(errorMsg) - { - MinLength = minLength; - } - - public override bool IsValid(object value) - { - return ((string)value).Length >= MinLength; - } - } - - [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false)] - public class EmailAttribute : ValidationAttribute - { - public override bool IsValid(object value) - { - return Regex.IsMatch((string)value, @"^[\w!#$%&'*+\-/=?\^_`{|}~]+(\.[\w!#$%&'*+\-/=?\^_`{|}~]+)*" - + "@" - + @"((([\-\w]+\.)+[a-zA-Z]{2,4})|(([0-9]{1,3}\.){3}[0-9]{1,3}))$"); - } - } + } diff --git a/TIAMSharedUI/Pages/Login.razor b/TIAMSharedUI/Pages/Login.razor index 637ac896..e269bb44 100644 --- a/TIAMSharedUI/Pages/Login.razor +++ b/TIAMSharedUI/Pages/Login.razor @@ -1,6 +1,7 @@ @page "/login" @using System.IdentityModel.Tokens.Jwt; @using System.Security.Claims; +@using BlazorAnimation @using Newtonsoft.Json.Linq; @using System.Text.Json; @using System.Reflection; @@ -15,51 +16,77 @@ Login -
-