From 23d27aee6b00d66d1fa511c5f807981cf91a1118 Mon Sep 17 00:00:00 2001 From: Cody Date: Sat, 13 Jan 2024 21:04:15 -0800 Subject: [PATCH] ENH: Adds Profile Properties Autocomplete --- .../Modules/Admin/UserProfile/Index.razor | 83 ++++++++++++------- 1 file changed, 55 insertions(+), 28 deletions(-) diff --git a/Oqtane.Client/Modules/Admin/UserProfile/Index.razor b/Oqtane.Client/Modules/Admin/UserProfile/Index.razor index be4c362f..11e37543 100644 --- a/Oqtane.Client/Modules/Admin/UserProfile/Index.razor +++ b/Oqtane.Client/Modules/Admin/UserProfile/Index.razor @@ -36,7 +36,7 @@
- +
@@ -65,13 +65,13 @@
- +
- +
@@ -123,24 +123,52 @@ { @if (p.Rows == 1) { - @if (p.IsRequired) + if (!string.IsNullOrEmpty(p.Autocomplete)) { - + @if (p.IsRequired) + { + + } + else + { + + } } else { - + @if (p.IsRequired) + { + + } + else + { + + } } } else { - @if (p.IsRequired) + if (!string.IsNullOrEmpty(p.Autocomplete)) { - + @if (p.IsRequired) + { + + } + else + { + + } } else { - + @if (p.IsRequired) + { + + } + else + { + + } } } } @@ -360,10 +388,10 @@ photofileid = -1; photo = null; } - var sitesettings = await SettingService.GetSiteSettingsAsync(SiteState.Alias.SiteId); - _ImageFiles = SettingService.GetSetting(settings, "ImageFiles", Constants.ImageFiles); settings = await SettingService.GetUserSettingsAsync(PageState.User.UserId); + var sitesettings = await SettingService.GetSiteSettingsAsync(SiteState.Alias.SiteId); + _ImageFiles = SettingService.GetSetting(settings, "ImageFiles", Constants.ImageFiles); await LoadNotificationsAsync(); @@ -549,7 +577,7 @@ try { ModuleInstance.ShowProgressIndicator(); - foreach(var Notification in notifications) + foreach (var Notification in notifications) { if (!Notification.IsDeleted) { @@ -561,12 +589,12 @@ await NotificationService.DeleteNotificationAsync(Notification.NotificationId); } await logger.LogInformation("Notification Deleted {Notification}", Notification); - } + } await logger.LogInformation("Notifications Permanently Deleted"); await LoadNotificationsAsync(); ModuleInstance.HideProgressIndicator(); - StateHasChanged(); + StateHasChanged(); } catch (Exception ex) { @@ -574,21 +602,20 @@ AddModuleMessage(ex.Message, MessageType.Error); ModuleInstance.HideProgressIndicator(); } - + } private void TogglePassword() - { - if (_passwordtype == "password") - { - _passwordtype = "text"; - _togglepassword = SharedLocalizer["HidePassword"]; - } - else - { - _passwordtype = "password"; - _togglepassword = SharedLocalizer["ShowPassword"]; - } - } - + { + if (_passwordtype == "password") + { + _passwordtype = "text"; + _togglepassword = SharedLocalizer["HidePassword"]; + } + else + { + _passwordtype = "password"; + _togglepassword = SharedLocalizer["ShowPassword"]; + } + } }