Merge pull request #5315 from sbwalker/dev

fix initialization issue related to time zones
This commit is contained in:
Shaun Walker 2025-05-16 09:09:21 -04:00 committed by GitHub
commit 31aba14507
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8,8 +8,10 @@
@inject IStringLocalizer<SharedResources> SharedLocalizer
@inject ISettingService SettingService
@if (PageState.Site.AllowRegistration)
@if (_initialized)
{
@if (PageState.Site.AllowRegistration)
{
if (!_userCreated)
{
if (PageState.User != null)
@ -83,13 +85,15 @@
</form>
}
}
}
else
{
}
else
{
<ModuleMessage Message="@Localizer["Info.Registration.Disabled"]" Type="MessageType.Info" />
}
}
@code {
private bool _initialized = false;
private List<Models.TimeZone> _timezones;
private string _passwordrequirements;
private string _username = string.Empty;
@ -113,6 +117,7 @@ else
_allowsitelogin = bool.Parse(SettingService.GetSetting(PageState.Site.Settings, "LoginOptions:AllowSiteLogin", "true"));
_timezones = await TimeZoneService.GetTimeZonesAsync();
_timezoneid = PageState.Site.TimeZoneId;
_initialized = true;
}
protected override void OnParametersSet()