v10: Fix build warnings in Web.Common (#12349)
* Run code cleanup * Run dotnet format * Start manual cleanup in Web.Common * Finish up manual cleanup * Fix tests * Fix up InMemoryModelFactory.cs * Inject proper macroRenderer * Update src/Umbraco.Web.Common/Filters/JsonDateTimeFormatAttribute.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Web.Common/Filters/ValidateUmbracoFormRouteStringAttribute.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Fix based on review Co-authored-by: Nikolaj Geisle <niko737@edu.ucl.dk> Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
This commit is contained in:
@@ -1,21 +1,19 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace Umbraco.Cms.Web.Common.Models
|
||||
namespace Umbraco.Cms.Web.Common.Models;
|
||||
|
||||
public class LoginModel : PostRedirectModel
|
||||
{
|
||||
public class LoginModel : PostRedirectModel
|
||||
{
|
||||
[Required]
|
||||
[Display(Name = "User name")]
|
||||
public string Username { get; set; } = null!;
|
||||
[Required]
|
||||
[Display(Name = "User name")]
|
||||
public string Username { get; set; } = null!;
|
||||
|
||||
[Required]
|
||||
[DataType(DataType.Password)]
|
||||
[Display(Name = "Password")]
|
||||
[StringLength(maximumLength: 256)]
|
||||
public string Password { get; set; } = null!;
|
||||
[Required]
|
||||
[DataType(DataType.Password)]
|
||||
[Display(Name = "Password")]
|
||||
[StringLength(256)]
|
||||
public string Password { get; set; } = null!;
|
||||
|
||||
[Display(Name = "Remember me?")]
|
||||
public bool RememberMe { get; set; }
|
||||
}
|
||||
[Display(Name = "Remember me?")]
|
||||
public bool RememberMe { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
namespace Umbraco.Cms.Web.Common.Models
|
||||
namespace Umbraco.Cms.Web.Common.Models;
|
||||
|
||||
/// <summary>
|
||||
/// A base model containing a value to indicate to Umbraco where to redirect to after Posting if
|
||||
/// a developer doesn't want the controller to redirect to the current Umbraco page - which is the default.
|
||||
/// </summary>
|
||||
public class PostRedirectModel
|
||||
{
|
||||
/// <summary>
|
||||
/// A base model containing a value to indicate to Umbraco where to redirect to after Posting if
|
||||
/// a developer doesn't want the controller to redirect to the current Umbraco page - which is the default.
|
||||
/// The path to redirect to when update is successful, if not specified then the user will be
|
||||
/// redirected to the current Umbraco page
|
||||
/// </summary>
|
||||
public class PostRedirectModel
|
||||
{
|
||||
/// <summary>
|
||||
/// The path to redirect to when update is successful, if not specified then the user will be
|
||||
/// redirected to the current Umbraco page
|
||||
/// </summary>
|
||||
public string? RedirectUrl { get; set; }
|
||||
}
|
||||
public string? RedirectUrl { get; set; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user