-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathLogin.cshtml
More file actions
80 lines (71 loc) · 3.16 KB
/
Copy pathLogin.cshtml
File metadata and controls
80 lines (71 loc) · 3.16 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
<link href="~/css/views/CardAuth.css" rel="stylesheet" />
<link href="~/css/components/LoginForm.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", "Sign In")
<div class="content">
<form class="login-form">
@(Html.DevExtreme().Form<UserData>()
.ID("form-instance")
.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)
.Value("password")
).Label(l => l.Visible(false));
items.AddSimple()
.DataField("rememberMe")
.Editor(e => e
.CheckBox()
.Text("Remember me")
.ElementAttr(new { @class = "form-text" })
).Label(l => l.Visible(false));
items.AddButton()
.ButtonOptions(b => b
.Width("100%")
.Type(ButtonType.Default)
.OnClick("window.uitgAppContext.AuthLayoutController.onSubmit")
.Template(new TemplateName("auth-button"))
);
})
)
<div class="reset-link">
<a href="@(Url.Action("ForgotPassword", topLayout ? "Home" : "Auth"))" class="spa-link">Forgot
password?</a>
</div>
@(Html.DevExtreme().Button()
.Text("Register")
.Width("100%")
.StylingMode(ButtonStylingMode.Contained)
.OnClick("window.uitgAppContext.AuthLayoutController.onCreateAccountClick")
)
</form>
<partial name="/Views/Auth/_OAuthButtons.cshtml" />
</div>
</div>
</div>
@await Html.PartialAsync("/Views/Auth/_AuthButtonTemplate.cshtml", ("submitLoadingIndicator", "Sign In"))