2c890e3d90b1c433df079bef717cde3ebd1c5659
[wsti_pai.git] / AccountViewModels.cs
1 using System.Collections.Generic;
2 using System.ComponentModel.DataAnnotations;
3
4 namespace Projects.Models
5 {
6     public class ExternalLoginConfirmationViewModel
7     {
8         [Required]
9         [Display(Name = "Email")]
10         public string Email { get; set; }
11     }
12
13     public class ExternalLoginListViewModel
14     {
15         public string ReturnUrl { get; set; }
16     }
17
18     public class SendCodeViewModel
19     {
20         public string SelectedProvider { get; set; }
21         public ICollection<System.Web.Mvc.SelectListItem> Providers { get; set; }
22         public string ReturnUrl { get; set; }
23         public bool RememberMe { get; set; }
24     }
25
26     public class VerifyCodeViewModel
27     {
28         [Required]
29         public string Provider { get; set; }
30
31         [Required]
32         [Display(Name = "Code")]
33         public string Code { get; set; }
34         public string ReturnUrl { get; set; }
35
36         [Display(Name = "Remember this browser?")]
37         public bool RememberBrowser { get; set; }
38
39         public bool RememberMe { get; set; }
40     }
41
42     public class ForgotViewModel
43     {
44         [Required]
45         [Display(Name = "Email")]
46         public string Email { get; set; }
47     }
48
49     public class LoginViewModel
50     {
51         [Required]
52         [Display(Name = "Email")]
53         [EmailAddress]
54         public string Email { get; set; }
55
56         [Required]
57         [DataType(DataType.Password)]
58         [Display(Name = "Password")]
59         public string Password { get; set; }
60
61         [Display(Name = "Remember me?")]
62         public bool RememberMe { get; set; }
63     }
64
65     public class RegisterViewModel
66     {
67         [Required]
68         [EmailAddress]
69         [Display(Name = "Email")]
70         public string Email { get; set; }
71
72         [Required]
73         [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
74         [DataType(DataType.Password)]
75         [Display(Name = "Password")]
76         public string Password { get; set; }
77
78         [DataType(DataType.Password)]
79         [Display(Name = "Confirm password")]
80         [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
81         public string ConfirmPassword { get; set; }
82     }
83
84     public class ResetPasswordViewModel
85     {
86         [Required]
87         [EmailAddress]
88         [Display(Name = "Email")]
89         public string Email { get; set; }
90
91         [Required]
92         [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
93         [DataType(DataType.Password)]
94         [Display(Name = "Password")]
95         public string Password { get; set; }
96
97         [DataType(DataType.Password)]
98         [Display(Name = "Confirm password")]
99         [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
100         public string ConfirmPassword { get; set; }
101
102         public string Code { get; set; }
103     }
104
105     public class ForgotPasswordViewModel
106     {
107         [Required]
108         [EmailAddress]
109         [Display(Name = "Email")]
110         public string Email { get; set; }
111     }
112 }