I would like to ask how can I localize the Username , password , Login Title , Login button text and the required messages that appear for these Username and password fields in LoginLayout page.
Thank you,
I would like to ask how can I localize the Username , password , Login Title , Login button text and the required messages that appear for these Username and password fields in LoginLayout page.
Thank you,
Hi @nickosl50,
There are properties for every text:
<RadzenLogin AllowRegister="true" AllowResetPassword="true"
AllowRememberMe="true"
LoginText="Einloggen"
UserText="Benutzername"
PasswordText="Passwort"
UserRequired="Benutzername erforderlich"
PasswordRequired="Passwort erforderlich"
RegisterText="Registrieren"
RegisterMessageText="Sie haben noch keinen Account?"
ResetPasswordText="Passwort zurücksetzen"
RememberMeText="Behalte mich in Erinnerung" />
When I use the CRMBlazorServerRBS.sln I get a LoginLaout.razor as follows:
@inherits LayoutComponentBase
<RadzenDialog />
<RadzenNotification />
<RadzenTooltip />
<RadzenContextMenu />
<RadzenLayout style="background: url('images/login.jpg'); background-size: cover;">
<RadzenBody>
<RadzenStack JustifyContent="Radzen.JustifyContent.Center" Class="rz-mx-auto rz-p-4" Style="max-width: 1440px; height: 100%;">
<RadzenCard class="rz-shadow-3 rz-border-radius-4" style="padding: 0; overflow: hidden; background-color: var(--rz-base-background-color);">
<RadzenRow Gap="0">
<RadzenColumn Size="12" SizeSM="6" Class="rz-background-color-primary rz-p-12" style="background-image: radial-gradient(circle at 4rem 4rem, var(--rz-primary) 0%, var(--rz-primary-darker) 80%); position: relative;">
<RadzenImage Path="images/logo-login.png" style="width: 120px"></RadzenImage>
<RadzenText Text="Welcome!" TextStyle="Radzen.Blazor.TextStyle.H2" class="rz-mt-4 rz-mt-md-12 rz-pt-0 rz-pt-md-12 rz-mb-6 rz-color-on-primary rz-display-none rz-display-sm-block" />
<RadzenText TextStyle="Radzen.Blazor.TextStyle.Body1" class="rz-mb-12 rz-pb-0 rz-pb-md-12 rz-color-on-primary rz-display-none rz-display-sm-block">
Fill in your login credentials to proceed.
</RadzenText>
</RadzenColumn>
<RadzenColumn Size="12" SizeSM="6" class="rz-p-12">
@Body
</RadzenColumn>
</RadzenRow>
</RadzenCard>
<RadzenText Text="CRMBlazorServerRBS v1.0.0, Copyright Ⓒ 2024" TextStyle="Radzen.Blazor.TextStyle.Caption" TextAlign="Radzen.TextAlign.Center" Style="width: 100%; margin-top: 20px" TagName="Radzen.Blazor.TagName.P"/>
</RadzenStack>
</RadzenBody>
</RadzenLayout>
and by using admin username and password I enter the main menu. I wonder where I will put the RadzenLogin component. I tried to replace the @Body with your code and the fields appeared ok but when I use admin username and password and press Login button nothing happens. Do I have to add an event ? Can you provide me with some sample code?
Thank you
The login and password fields are not defined in the LoginLayout. They are in the Login.razor page.
The Login.razor page in CRMBlazorServerRBS.sln has the following code:
@layout LoginLayout
@page "/login"
<PageTitle>Login</PageTitle>
<RadzenText Text="Login" TextStyle="Radzen.Blazor.TextStyle.H5" class="mb-4" TagName="Radzen.Blazor.TagName.H2" />
<RadzenRow>
<RadzenColumn SizeMD="12">
<RadzenTemplateForm Action="@($"account/login?redirectUrl={redirectUrl}")" Data="@("login")"
Method="post">
<RadzenAlert Shade="Radzen.Shade.Lighter" Variant="Radzen.Variant.Flat" Size="Radzen.AlertSize.Small" AlertStyle="Radzen.AlertStyle.Danger" Visible="@errorVisible">@error</RadzenAlert>
<RadzenAlert Shade="Radzen.Shade.Lighter" Variant="Radzen.Variant.Flat" Size="Radzen.AlertSize.Small" AlertStyle="Radzen.AlertStyle.Info" Visible="@infoVisible">@info</RadzenAlert>
<RadzenLogin AllowResetPassword="false" AllowRegister="false" FormFieldVariant="Variant.Filled"
/>
</RadzenTemplateForm>
</RadzenColumn>
</RadzenRow>
How the above page needs to be modified in order to use the RadzenLogin component that you mentioned earlier and still to be able to login into the main menu using admin username and password.
Thank you
That page obviously contains a RadzenLogin component - you need to set the additional properties that I have mentioned in my reply.
Thank you very much . I saw it afterwards. Thanks again