Skip to content

Commit

Permalink
Merge pull request #498 from RHEAGROUP/Feat/custom-labels-login-compo…
Browse files Browse the repository at this point in the history
…nent

Feat/custom-labels-login-component
  • Loading branch information
Robbware authored Jan 4, 2024
2 parents fa14eca + 257ddb8 commit 1ad0a76
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
4 changes: 2 additions & 2 deletions COMET.Web.Common/Components/Login.razor
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</Template>
</DxFormLayoutItem>
}
<DxFormLayoutItem Caption="UserName:" BeginRow="true" ColSpanLg="12">
<DxFormLayoutItem Caption="@(this.UsernameLabel)" BeginRow="true" ColSpanLg="12">
<Template>
<DxTextBox Id="username" @bind-Text="@(this.ViewModel.AuthenticationDto.UserName)"
ClearButtonDisplayMode="DataEditorClearButtonDisplayMode.Auto"
Expand All @@ -49,7 +49,7 @@
@onblur="@(() => this.HandleFieldBlur("UserName"))" />
</Template>
</DxFormLayoutItem>
<DxFormLayoutItem Caption="Password:" BeginRow="true" ColSpanLg="12">
<DxFormLayoutItem Caption="@(this.PasswordLabel)" BeginRow="true" ColSpanLg="12">
<Template>
<DxTextBox Id="password" @bind-Text="@(this.ViewModel.AuthenticationDto.Password)"
ClearButtonDisplayMode="DataEditorClearButtonDisplayMode.Auto"
Expand Down
12 changes: 12 additions & 0 deletions COMET.Web.Common/Components/Login.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,18 @@ public partial class Login
[Parameter]
public string RequestedServer { get; set; }

/// <summary>
/// The label for the username input field
/// </summary>
[Parameter]
public string UsernameLabel { get; set; } = "UserName:";

/// <summary>
/// The label for the password input field
/// </summary>
[Parameter]
public string PasswordLabel { get; set; } = "Password:";

/// <summary>
/// The text of the login button
/// </summary>
Expand Down

0 comments on commit 1ad0a76

Please sign in to comment.