diff --git a/e-suite.API/eSuite.API/Views/Account/Profile.cshtml b/e-suite.API/eSuite.API/Views/Account/Profile.cshtml
index c78ddf4..c2cccc3 100644
--- a/e-suite.API/eSuite.API/Views/Account/Profile.cshtml
+++ b/e-suite.API/eSuite.API/Views/Account/Profile.cshtml
@@ -38,7 +38,7 @@
@Html.ValidationMessageFor(m => m.Profile.LastName)
- @await Html.PartialAsync("_loginMethodChooser", Model.Profile)
+ @await Html.PartialAsync("_loginMethodChooser", Model)
}
diff --git a/e-suite.API/eSuite.API/Views/Shared/_loginMethodChooser.cshtml b/e-suite.API/eSuite.API/Views/Shared/_loginMethodChooser.cshtml
index 630b02b..f555e54 100644
--- a/e-suite.API/eSuite.API/Views/Shared/_loginMethodChooser.cshtml
+++ b/e-suite.API/eSuite.API/Views/Shared/_loginMethodChooser.cshtml
@@ -1,7 +1,14 @@
-@model eSuite.API.Models.IPasswordInformation
+@using eSuite.API.Translation
+@model eSuite.API.Controllers.ProfileViewModel
+
+@{
+ var passwordMinLength = 12;
+ var t = await Model.TranslatorFactory.Use(Namespaces.Common);
+ Layout = null;
+}
-@if (Model.DomainSsoProviderId != null)
+@if (Model.Profile.DomainSsoProviderId != null)
{
Your domain has authorisation from an external source.
@@ -11,19 +18,19 @@ else
{
- @Html.LabelFor(m => m.SsoProviderId)
- @Html.DropDownListFor(m => m.SsoProviderId,
+ @Html.LabelFor(m => m.Profile.SsoProviderId, t.T("LoginMethod"))
+ @Html.DropDownListFor(m => m.Profile.SsoProviderId,
new SelectList(
new List>
{
new(-1, "Password")
- }.Concat(Model.SsoProviders.OrderBy(x => x.Value)), nameof(KeyValuePair.Key), nameof(KeyValuePair.Value)))
+ }.Concat(Model.Profile.SsoProviders.OrderBy(x => x.Value)), nameof(KeyValuePair.Key), nameof(KeyValuePair.Value)))
- @Html.LabelFor(m => m.Password)
- @Html.EditorFor(m => m.Password, new
+ @Html.LabelFor(m => m.Profile.Password, t.T("Password"))
+ @Html.EditorFor(m => m.Profile.Password, new
{
htmlAttributes = new
{
@@ -31,22 +38,22 @@ else
autocomplete = "new-password"
}
})
- @Html.ValidationMessageFor(m => m.Password, default)
+ @Html.ValidationMessageFor(m => m.Profile.Password, default)
Passwords require:
- - At least 12 characters
- - At least 1 symbol
- - At least 1 number
- - At least 1 lowercase letter
- - At least 1 uppercase letter
+ - @t.T("PasswordMinLength", new { minPasswordLength = 12 })
+ - @t.T("PasswordMinSymbols", new { minSymbols = 1 })
+ - @t.T("PasswordMinNumbers", new { minNumbers = 1 })
+ - @t.T("PasswordMinLowercase", new { minLowercase = 1 })
+ - @t.T("PasswordMinUppercase", new { minUppercase = 1 })
- @Html.LabelFor(m => m.ConfirmPassword)
- @Html.EditorFor(m => m.ConfirmPassword, new
+ @Html.LabelFor(m => m.Profile.ConfirmPassword, t.T("ConfirmPassword"))
+ @Html.EditorFor(m => m.Profile.ConfirmPassword, new
{
htmlAttributes = new
{
@@ -54,30 +61,30 @@ else
autocomplete = "new-password"
}
})
- @Html.ValidationMessageFor(m => m.ConfirmPassword)
+ @Html.ValidationMessageFor(m => m.Profile.ConfirmPassword)
- @Html.LabelFor(m => m.UsingTwoFactorAuthentication)
- @Html.EditorFor(m => m.UsingTwoFactorAuthentication, new { htmlAttributes = new { } })
- @Html.ValidationMessageFor(m => m.UsingTwoFactorAuthentication)
+ @Html.LabelFor(m => m.Profile.UsingTwoFactorAuthentication, t.T("UsingTwoFactorAuthentication"))
+ @Html.EditorFor(m => m.Profile.UsingTwoFactorAuthentication, new { htmlAttributes = new { } })
+ @Html.ValidationMessageFor(m => m.Profile.UsingTwoFactorAuthentication)
- @Html.LabelFor(m => m.SecurityCode)
- @Html.EditorFor(m => m.SecurityCode, new
+ @Html.LabelFor(m => m.Profile.SecurityCode, t.T("AuthenticationCode"))
+ @Html.EditorFor(m => m.Profile.SecurityCode, new
{
htmlAttributes = new
{
@@ -85,22 +92,23 @@ else
autocomplete = "one-time-code"
}
})
- @Html.ValidationMessageFor(m => m.SecurityCode)
+ @Html.ValidationMessageFor(m => m.Profile.SecurityCode)
- Save changes to trigger the process that will link your SSO Account.
+ @t.T("SaveChangesToLinkSSOAccount")
+
}