diff --git a/src/Web/Grand.SharedUIResources/Views/Shared/EditorTemplates/DoubleNullableN6.cshtml b/src/Web/Grand.SharedUIResources/Views/Shared/EditorTemplates/DoubleNullableN6.cshtml new file mode 100644 index 000000000..04eb14fa7 --- /dev/null +++ b/src/Web/Grand.SharedUIResources/Views/Shared/EditorTemplates/DoubleNullableN6.cshtml @@ -0,0 +1,2 @@ +@model double? + diff --git a/src/Web/Grand.Web.AdminShared/Models/Shipping/PickupPointModel.cs b/src/Web/Grand.Web.AdminShared/Models/Shipping/PickupPointModel.cs index 7220cbcb4..05d38d573 100644 --- a/src/Web/Grand.Web.AdminShared/Models/Shipping/PickupPointModel.cs +++ b/src/Web/Grand.Web.AdminShared/Models/Shipping/PickupPointModel.cs @@ -3,6 +3,7 @@ using Grand.Infrastructure.Validators; using Grand.Web.AdminShared.Models.Common; using Microsoft.AspNetCore.Mvc.Rendering; +using System.ComponentModel.DataAnnotations; namespace Grand.Web.AdminShared.Models.Shipping; @@ -41,9 +42,11 @@ public class PickupPointModel : BaseEntityModel [GrandResourceDisplayName("Admin.Configuration.Shipping.PickupPoint.Fields.PickupFee")] public double PickupFee { get; set; } + [UIHint("DoubleNullableN6")] [GrandResourceDisplayName("Admin.Configuration.Shipping.PickupPoint.Fields.Latitude")] public double? Latitude { get; set; } + [UIHint("DoubleNullableN6")] [GrandResourceDisplayName("Admin.Configuration.Shipping.PickupPoint.Fields.Longitude")] public double? Longitude { get; set; } } \ No newline at end of file diff --git a/src/Web/Grand.Web.AdminShared/Models/Shipping/WarehouseModel.cs b/src/Web/Grand.Web.AdminShared/Models/Shipping/WarehouseModel.cs index ddc389d9f..580c194f0 100644 --- a/src/Web/Grand.Web.AdminShared/Models/Shipping/WarehouseModel.cs +++ b/src/Web/Grand.Web.AdminShared/Models/Shipping/WarehouseModel.cs @@ -2,6 +2,7 @@ using Grand.Infrastructure.Models; using Grand.Web.AdminShared.Models.Common; using Microsoft.AspNetCore.Mvc.Rendering; +using System.ComponentModel.DataAnnotations; namespace Grand.Web.AdminShared.Models.Shipping; @@ -16,9 +17,11 @@ public class WarehouseModel : BaseEntityModel [GrandResourceDisplayName("Admin.Configuration.Shipping.Warehouses.Fields.AdminComment")] public string AdminComment { get; set; } + [UIHint("DoubleNullableN6")] [GrandResourceDisplayName("Admin.Configuration.Shipping.Warehouses.Fields.Latitude")] public double? Latitude { get; set; } + [UIHint("DoubleNullableN6")] [GrandResourceDisplayName("Admin.Configuration.Shipping.Warehouses.Fields.Longitude")] public double? Longitude { get; set; }