-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathSignUp.cshtml
More file actions
85 lines (75 loc) · 3.46 KB
/
SignUp.cshtml
File metadata and controls
85 lines (75 loc) · 3.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<link href="~/css/views/CardAuth.css" rel="stylesheet" />
<link href="~/css/components/SignUpForm.css" rel="stylesheet" />
<link href="~/css/components/OAuthForm.css" rel="stylesheet" />
<script src="~/js/layouts/authlayout.js"></script>
@using DevExtremeVSTemplateMVC.Models;
@model UserData
@{
bool topLayout = this.Context.Request.Path.Value.Contains("Home");
}
<script>
window.uitgAppContext.AuthLayoutController.keepTopLayout = '@Html.Raw(topLayout)' === "True";
</script>
<div class="auth-card">
<div class="dx-card content">
@await Html.PartialAsync("/Views/Auth/_AuthHeader.cshtml", "Register")
<div class="content">
<form class="create-account-form">
@(
Html.DevExtreme().Form<UserData>()
.ID("form-instance-register")
.FormData(Model)
.Items(items =>
{
items.AddSimpleFor(m => m.Email)
.Editor(e => e
.TextBox()
.StylingMode(EditorStylingMode.Filled)
.Placeholder("Email")
.Mode(TextBoxMode.Email)
.Value("jheart@dx-email.com")
)
.Label(l => l.Visible(false));
items.AddSimpleFor(m => m.Password)
.Editor(e => e
.TextBox()
.StylingMode(EditorStylingMode.Filled)
.Placeholder("Password")
.Mode(TextBoxMode.Password)
).Label(l => l.Visible(false));
items.AddSimpleFor(m => m.ConfirmPassword)
.Editor(e => e
.TextBox()
.StylingMode(EditorStylingMode.Filled)
.Placeholder("Confirm Password")
.Mode(TextBoxMode.Password))
.Label(l => l.Visible(false));
items.AddSimple()
.Template(@<text>
<div class="policy-info">
By creating an account, you agree to the
<a href="@(Url.Action("Login", topLayout ? "Home" : "Auth"))" class="spa-link">Terms of
Service?</a> and
<a href="@(Url.Action("Login", topLayout ? "Home" : "Auth"))" class="spa-link">Privacy
Policy?</a>
</div>
</text>);
items.AddButton()
.ButtonOptions(b => b
.Width("100%")
.Type(ButtonType.Default)
.OnClick("window.uitgAppContext.AuthLayoutController.onCreateSubmit")
.Template(new TemplateName("auth-button"))
);
})
)
<div class="login-link">
Have an account?
<a href="@(Url.Action("Login", topLayout ? "Home" : "Auth"))" class="spa-link">Sign In</a>
</div>
</form>
<partial name="/Views/Auth/_OAuthButtons.cshtml" />
</div>
</div>
</div>
@await Html.PartialAsync("/Views/Auth/_AuthButtonTemplate.cshtml", ("accountLoadingIndicator", "Register"))