From e520c30adea0c058f670c82957b549cf4ab831cf Mon Sep 17 00:00:00 2001 From: Cody Date: Fri, 20 Oct 2023 21:18:36 -0700 Subject: [PATCH 1/4] Rows Property Default Equals 1 --- Oqtane.Shared/Models/Profile.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Oqtane.Shared/Models/Profile.cs b/Oqtane.Shared/Models/Profile.cs index 336cd262..4198ab56 100644 --- a/Oqtane.Shared/Models/Profile.cs +++ b/Oqtane.Shared/Models/Profile.cs @@ -77,6 +77,6 @@ namespace Oqtane.Models /// /// Optional number of rows (textarea) /// - public int Rows { get; set; } + public int Rows { get; set; } = 1; } } From 46d18a642c6690e1848d159d9e353af315d3d154 Mon Sep 17 00:00:00 2001 From: Cody Date: Sat, 21 Oct 2023 10:32:01 -0700 Subject: [PATCH 2/4] Rows property set to no default --- Oqtane.Shared/Models/Profile.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Oqtane.Shared/Models/Profile.cs b/Oqtane.Shared/Models/Profile.cs index 4198ab56..336cd262 100644 --- a/Oqtane.Shared/Models/Profile.cs +++ b/Oqtane.Shared/Models/Profile.cs @@ -77,6 +77,6 @@ namespace Oqtane.Models /// /// Optional number of rows (textarea) /// - public int Rows { get; set; } = 1; + public int Rows { get; set; } } } From fe5efff2557c67126c7ebbc6bc5f478740c385cf Mon Sep 17 00:00:00 2001 From: Cody Date: Sat, 21 Oct 2023 10:36:09 -0700 Subject: [PATCH 3/4] Adds Biography and Rows Profile Settings to Create Site --- Oqtane.Server/Repository/SiteRepository.cs | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/Oqtane.Server/Repository/SiteRepository.cs b/Oqtane.Server/Repository/SiteRepository.cs index b583d90b..26cb8c5c 100644 --- a/Oqtane.Server/Repository/SiteRepository.cs +++ b/Oqtane.Server/Repository/SiteRepository.cs @@ -224,21 +224,23 @@ namespace Oqtane.Repository _roleRepository.AddRole(new Role {SiteId = site.SiteId, Name = RoleNames.Admin, Description = RoleNames.Admin, IsAutoAssigned = false, IsSystem = true}); _profileRepository.AddProfile(new Profile - {SiteId = site.SiteId, Name = "FirstName", Title = "First Name", Description = "Your First Or Given Name", Category = "Name", ViewOrder = 1, MaxLength = 50, DefaultValue = "", IsRequired = false, IsPrivate = false, Options = ""}); + { SiteId = site.SiteId, Name = "FirstName", Title = "First Name", Description = "Your First Or Given Name", Category = "Name", ViewOrder = 1, MaxLength = 50, DefaultValue = "", IsRequired = false, IsPrivate = false, Options = "", Rows = 1 }); _profileRepository.AddProfile(new Profile - {SiteId = site.SiteId, Name = "LastName", Title = "Last Name", Description = "Your Last Or Family Name", Category = "Name", ViewOrder = 2, MaxLength = 50, DefaultValue = "", IsRequired = false, IsPrivate = false, Options = "" }); + { SiteId = site.SiteId, Name = "LastName", Title = "Last Name", Description = "Your Last Or Family Name", Category = "Name", ViewOrder = 2, MaxLength = 50, DefaultValue = "", IsRequired = false, IsPrivate = false, Options = "", Rows = 1 }); _profileRepository.AddProfile(new Profile - {SiteId = site.SiteId, Name = "Street", Title = "Street", Description = "Street Or Building Address", Category = "Address", ViewOrder = 3, MaxLength = 50, DefaultValue = "", IsRequired = false, IsPrivate = false, Options = "" }); - _profileRepository.AddProfile( - new Profile {SiteId = site.SiteId, Name = "City", Title = "City", Description = "City", Category = "Address", ViewOrder = 4, MaxLength = 50, DefaultValue = "", IsRequired = false, IsPrivate = false, Options = "" }); + { SiteId = site.SiteId, Name = "Street", Title = "Street", Description = "Street Or Building Address", Category = "Address", ViewOrder = 3, MaxLength = 50, DefaultValue = "", IsRequired = false, IsPrivate = false, Options = "", Rows = 1 }); + _profileRepository.AddProfile(new Profile + { SiteId = site.SiteId, Name = "City", Title = "City", Description = "City", Category = "Address", ViewOrder = 4, MaxLength = 50, DefaultValue = "", IsRequired = false, IsPrivate = false, Options = "", Rows = 1 }); _profileRepository.AddProfile(new Profile - {SiteId = site.SiteId, Name = "Region", Title = "Region", Description = "State Or Province", Category = "Address", ViewOrder = 5, MaxLength = 50, DefaultValue = "", IsRequired = false, IsPrivate = false, Options = "" }); + { SiteId = site.SiteId, Name = "Region", Title = "Region", Description = "State Or Province", Category = "Address", ViewOrder = 5, MaxLength = 50, DefaultValue = "", IsRequired = false, IsPrivate = false, Options = "", Rows = 1 }); _profileRepository.AddProfile(new Profile - {SiteId = site.SiteId, Name = "Country", Title = "Country", Description = "Country", Category = "Address", ViewOrder = 6, MaxLength = 50, DefaultValue = "", IsRequired = false, IsPrivate = false, Options = "" }); + { SiteId = site.SiteId, Name = "Country", Title = "Country", Description = "Country", Category = "Address", ViewOrder = 6, MaxLength = 50, DefaultValue = "", IsRequired = false, IsPrivate = false, Options = "", Rows = 1 }); _profileRepository.AddProfile(new Profile - {SiteId = site.SiteId, Name = "PostalCode", Title = "Postal Code", Description = "Postal Code Or Zip Code", Category = "Address", ViewOrder = 7, MaxLength = 50, DefaultValue = "", IsRequired = false, IsPrivate = false, Options = "" }); + { SiteId = site.SiteId, Name = "PostalCode", Title = "Postal Code", Description = "Postal Code Or Zip Code", Category = "Address", ViewOrder = 7, MaxLength = 50, DefaultValue = "", IsRequired = false, IsPrivate = false, Options = "", Rows = 1 }); _profileRepository.AddProfile(new Profile - {SiteId = site.SiteId, Name = "Phone", Title = "Phone Number", Description = "Phone Number", Category = "Contact", ViewOrder = 8, MaxLength = 50, DefaultValue = "", IsRequired = false, IsPrivate = false, Options = "" }); + { SiteId = site.SiteId, Name = "Phone", Title = "Phone Number", Description = "Phone Number", Category = "Contact", ViewOrder = 8, MaxLength = 50, DefaultValue = "", IsRequired = false, IsPrivate = false, Options = "", Rows = 1 }); + _profileRepository.AddProfile(new Profile + { SiteId = site.SiteId, Name = "Biography", Title = "Biography", Description = "Biography", Category = "Personal", ViewOrder = 9, MaxLength = 1000, DefaultValue = "", IsRequired = false, IsPrivate = false, Options = "", Rows = 5 }); Folder folder = _folderRepository.AddFolder(new Folder { From f68d26317d297ddd5ba86678c9e85cae93a66adb Mon Sep 17 00:00:00 2001 From: Cody Date: Sat, 21 Oct 2023 15:12:15 -0700 Subject: [PATCH 4/4] Removes Biography --- Oqtane.Server/Repository/SiteRepository.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/Oqtane.Server/Repository/SiteRepository.cs b/Oqtane.Server/Repository/SiteRepository.cs index 26cb8c5c..7ae2d43f 100644 --- a/Oqtane.Server/Repository/SiteRepository.cs +++ b/Oqtane.Server/Repository/SiteRepository.cs @@ -239,8 +239,6 @@ namespace Oqtane.Repository { SiteId = site.SiteId, Name = "PostalCode", Title = "Postal Code", Description = "Postal Code Or Zip Code", Category = "Address", ViewOrder = 7, MaxLength = 50, DefaultValue = "", IsRequired = false, IsPrivate = false, Options = "", Rows = 1 }); _profileRepository.AddProfile(new Profile { SiteId = site.SiteId, Name = "Phone", Title = "Phone Number", Description = "Phone Number", Category = "Contact", ViewOrder = 8, MaxLength = 50, DefaultValue = "", IsRequired = false, IsPrivate = false, Options = "", Rows = 1 }); - _profileRepository.AddProfile(new Profile - { SiteId = site.SiteId, Name = "Biography", Title = "Biography", Description = "Biography", Category = "Personal", ViewOrder = 9, MaxLength = 1000, DefaultValue = "", IsRequired = false, IsPrivate = false, Options = "", Rows = 5 }); Folder folder = _folderRepository.AddFolder(new Folder {