diff options
Diffstat (limited to 'Project-Unite/Views/Account')
| -rw-r--r-- | Project-Unite/Views/Account/ConfirmEmail.cshtml | 10 | ||||
| -rw-r--r-- | Project-Unite/Views/Account/ExternalLoginConfirmation.cshtml | 36 | ||||
| -rw-r--r-- | Project-Unite/Views/Account/ExternalLoginFailure.cshtml | 8 | ||||
| -rw-r--r-- | Project-Unite/Views/Account/ForgotPassword.cshtml | 29 | ||||
| -rw-r--r-- | Project-Unite/Views/Account/ForgotPasswordConfirmation.cshtml | 13 | ||||
| -rw-r--r-- | Project-Unite/Views/Account/Login.cshtml | 62 | ||||
| -rw-r--r-- | Project-Unite/Views/Account/Register.cshtml | 47 | ||||
| -rw-r--r-- | Project-Unite/Views/Account/ResendConf.cshtml | 23 | ||||
| -rw-r--r-- | Project-Unite/Views/Account/ResetPassword.cshtml | 42 | ||||
| -rw-r--r-- | Project-Unite/Views/Account/ResetPasswordConfirmation.cshtml | 12 | ||||
| -rw-r--r-- | Project-Unite/Views/Account/SendCode.cshtml | 24 | ||||
| -rw-r--r-- | Project-Unite/Views/Account/VerifyCode.cshtml | 38 | ||||
| -rw-r--r-- | Project-Unite/Views/Account/_ExternalLoginsListPartial.cshtml | 28 |
13 files changed, 372 insertions, 0 deletions
diff --git a/Project-Unite/Views/Account/ConfirmEmail.cshtml b/Project-Unite/Views/Account/ConfirmEmail.cshtml new file mode 100644 index 0000000..ed02ad8 --- /dev/null +++ b/Project-Unite/Views/Account/ConfirmEmail.cshtml @@ -0,0 +1,10 @@ +@{ + ViewBag.Title = "Confirm Email"; +} + +<h2>@ViewBag.Title.</h2> +<div> + <p> + Thank you for confirming your email. Please @Html.ActionLink("Click here to Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" }) + </p> +</div> diff --git a/Project-Unite/Views/Account/ExternalLoginConfirmation.cshtml b/Project-Unite/Views/Account/ExternalLoginConfirmation.cshtml new file mode 100644 index 0000000..bcc491c --- /dev/null +++ b/Project-Unite/Views/Account/ExternalLoginConfirmation.cshtml @@ -0,0 +1,36 @@ +@model Project_Unite.Models.ExternalLoginConfirmationViewModel +@{ + ViewBag.Title = "Register"; +} +<h2>@ViewBag.Title.</h2> +<h3>Associate your @ViewBag.LoginProvider account.</h3> + +@using (Html.BeginForm("ExternalLoginConfirmation", "Account", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) +{ + @Html.AntiForgeryToken() + + <h4>Association Form</h4> + <hr /> + @Html.ValidationSummary(true, "", new { @class = "text-danger" }) + <p class="text-info"> + You've successfully authenticated with <strong>@ViewBag.LoginProvider</strong>. + Please enter a user name for this site below and click the Register button to finish + logging in. + </p> + <div class="form-group"> + @Html.LabelFor(m => m.Email, new { @class = "col-md-2 control-label" }) + <div class="col-md-10"> + @Html.TextBoxFor(m => m.Email, new { @class = "form-control" }) + @Html.ValidationMessageFor(m => m.Email, "", new { @class = "text-danger" }) + </div> + </div> + <div class="form-group"> + <div class="col-md-offset-2 col-md-10"> + <input type="submit" class="btn btn-default" value="Register" /> + </div> + </div> +} + +@section Scripts { + @Scripts.Render("~/bundles/jqueryval") +} diff --git a/Project-Unite/Views/Account/ExternalLoginFailure.cshtml b/Project-Unite/Views/Account/ExternalLoginFailure.cshtml new file mode 100644 index 0000000..3be4ab3 --- /dev/null +++ b/Project-Unite/Views/Account/ExternalLoginFailure.cshtml @@ -0,0 +1,8 @@ +@{ + ViewBag.Title = "Login Failure"; +} + +<hgroup> + <h2>@ViewBag.Title.</h2> + <h3 class="text-danger">Unsuccessful login with service.</h3> +</hgroup> diff --git a/Project-Unite/Views/Account/ForgotPassword.cshtml b/Project-Unite/Views/Account/ForgotPassword.cshtml new file mode 100644 index 0000000..1bb2611 --- /dev/null +++ b/Project-Unite/Views/Account/ForgotPassword.cshtml @@ -0,0 +1,29 @@ +@model Project_Unite.Models.ForgotPasswordViewModel +@{ + ViewBag.Title = "Forgot your password?"; +} + +<h2>@ViewBag.Title.</h2> + +@using (Html.BeginForm("ForgotPassword", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) +{ + @Html.AntiForgeryToken() + <h4>Enter your email.</h4> + <hr /> + @Html.ValidationSummary("", new { @class = "text-danger" }) + <div class="form-group"> + @Html.LabelFor(m => m.Email, new { @class = "col-md-2 control-label" }) + <div class="col-md-10"> + @Html.TextBoxFor(m => m.Email, new { @class = "form-control" }) + </div> + </div> + <div class="form-group"> + <div class="col-md-offset-2 col-md-10"> + <input type="submit" class="btn btn-default" value="Email Link" /> + </div> + </div> +} + +@section Scripts { + @Scripts.Render("~/bundles/jqueryval") +} diff --git a/Project-Unite/Views/Account/ForgotPasswordConfirmation.cshtml b/Project-Unite/Views/Account/ForgotPasswordConfirmation.cshtml new file mode 100644 index 0000000..dd7af8c --- /dev/null +++ b/Project-Unite/Views/Account/ForgotPasswordConfirmation.cshtml @@ -0,0 +1,13 @@ +@{ + ViewBag.Title = "Forgot Password Confirmation"; +} + +<hgroup class="title"> + <h1>@ViewBag.Title.</h1> +</hgroup> +<div> + <p> + Please check your email to reset your password. + </p> +</div> + diff --git a/Project-Unite/Views/Account/Login.cshtml b/Project-Unite/Views/Account/Login.cshtml new file mode 100644 index 0000000..1244c62 --- /dev/null +++ b/Project-Unite/Views/Account/Login.cshtml @@ -0,0 +1,62 @@ +@using Project_Unite.Models +@model LoginViewModel +@{ + ViewBag.Title = "Log in"; +} + +<h2>@ViewBag.Title.</h2> +<div class="row"> + <div class="col-md-8"> + <section id="loginForm"> + @using (Html.BeginForm("Login", "Account", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) + { + @Html.AntiForgeryToken() + <h4>Use a local account to log in.</h4> + <hr /> + @Html.ValidationSummary(true, "", new { @class = "text-danger" }) + <div class="form-group"> + @Html.LabelFor(m => m.Email, new { @class = "col-md-2 control-label" }) + <div class="col-md-10"> + @Html.TextBoxFor(m => m.Email, new { @class = "form-control" }) + @Html.ValidationMessageFor(m => m.Email, "", new { @class = "text-danger" }) + </div> + </div> + <div class="form-group"> + @Html.LabelFor(m => m.Password, new { @class = "col-md-2 control-label" }) + <div class="col-md-10"> + @Html.PasswordFor(m => m.Password, new { @class = "form-control" }) + @Html.ValidationMessageFor(m => m.Password, "", new { @class = "text-danger" }) + </div> + </div> + <div class="form-group"> + <div class="col-md-offset-2 col-md-10"> + <div class="checkbox"> + @Html.CheckBoxFor(m => m.RememberMe) + @Html.LabelFor(m => m.RememberMe) + </div> + </div> + </div> + <div class="form-group"> + <div class="col-md-offset-2 col-md-10"> + <input type="submit" value="Log in" class="btn btn-default" /> + </div> + </div> + <p> + @Html.ActionLink("Register as a new user", "Register") + </p> + <p> + @Html.ActionLink("Forgot your password?", "ForgotPassword") + </p> + } + </section> + </div> + <div class="col-md-4"> + <section id="socialLoginForm"> + @Html.Partial("_ExternalLoginsListPartial", new ExternalLoginListViewModel { ReturnUrl = ViewBag.ReturnUrl }) + </section> + </div> +</div> + +@section Scripts { + @Scripts.Render("~/bundles/jqueryval") +}
\ No newline at end of file diff --git a/Project-Unite/Views/Account/Register.cshtml b/Project-Unite/Views/Account/Register.cshtml new file mode 100644 index 0000000..a1d1225 --- /dev/null +++ b/Project-Unite/Views/Account/Register.cshtml @@ -0,0 +1,47 @@ +@model Project_Unite.Models.RegisterViewModel +@{ + ViewBag.Title = "Register"; +} + +<h2>@ViewBag.Title.</h2> + +@using (Html.BeginForm("Register", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) +{ + @Html.AntiForgeryToken() + <h4>Create a new account.</h4> + <hr /> + @Html.ValidationSummary("", new { @class = "text-danger" }) + <div class="form-group"> + @Html.LabelFor(m => m.Email, new { @class = "col-md-2 control-label" }) + <div class="col-md-10"> + @Html.TextBoxFor(m => m.Email, new { @class = "form-control" }) + </div> + </div> + <div class="form-group"> + @Html.LabelFor(m => m.Username, new { @class = "col-md-2 control-label" }) + <div class="col-md-10"> + @Html.TextBoxFor(m => m.Username, new { @class = "form-control" }) + </div> + </div> + <div class="form-group"> + @Html.LabelFor(m => m.Password, new { @class = "col-md-2 control-label" }) + <div class="col-md-10"> + @Html.PasswordFor(m => m.Password, new { @class = "form-control" }) + </div> + </div> + <div class="form-group"> + @Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" }) + <div class="col-md-10"> + @Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" }) + </div> + </div> + <div class="form-group"> + <div class="col-md-offset-2 col-md-10"> + <input type="submit" class="btn btn-default" value="Register" /> + </div> + </div> +} + +@section Scripts { + @Scripts.Render("~/bundles/jqueryval") +} diff --git a/Project-Unite/Views/Account/ResendConf.cshtml b/Project-Unite/Views/Account/ResendConf.cshtml new file mode 100644 index 0000000..beb8c6f --- /dev/null +++ b/Project-Unite/Views/Account/ResendConf.cshtml @@ -0,0 +1,23 @@ + +@{ + ViewBag.Title = "Confirmation email resent."; +} +@if (ViewBag.IsConfirmed == true) +{ + <h2>Email already confirmed!</h2> + + <p>We've already confirmed that your email is valid! There's no need to send a confirmation link! But, if that warning is still nagging you, there might be a bug on our end - contact @ACL.UserNameFromEmailRaw("[email protected]") ASAP!</p> +} +else +{ +<h2>Confirmation email resent.</h2> + +<p>We have just sent an email to @User.Identity.Name</p> + +<h4>We value your security.</h4> + +<p>Security within the multi-user domain is paramount. You must protect yourself the best you can, and so must we. Since you are in the process of confirming your email address, we can soon ensure you are secure within the multi-user domain by allowing us to contact you when suspicious activity occurs on your account or when you need to reset your password.</p> + +<p>Still not there? @Html.ActionLink("Resend it again, please.", "ResendConf")</p> + +}
\ No newline at end of file diff --git a/Project-Unite/Views/Account/ResetPassword.cshtml b/Project-Unite/Views/Account/ResetPassword.cshtml new file mode 100644 index 0000000..de239b8 --- /dev/null +++ b/Project-Unite/Views/Account/ResetPassword.cshtml @@ -0,0 +1,42 @@ +@model Project_Unite.Models.ResetPasswordViewModel +@{ + ViewBag.Title = "Reset password"; +} + +<h2>@ViewBag.Title.</h2> + +@using (Html.BeginForm("ResetPassword", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) +{ + @Html.AntiForgeryToken() + <h4>Reset your password.</h4> + <hr /> + @Html.ValidationSummary("", new { @class = "text-danger" }) + @Html.HiddenFor(model => model.Code) + <div class="form-group"> + @Html.LabelFor(m => m.Email, new { @class = "col-md-2 control-label" }) + <div class="col-md-10"> + @Html.TextBoxFor(m => m.Email, new { @class = "form-control" }) + </div> + </div> + <div class="form-group"> + @Html.LabelFor(m => m.Password, new { @class = "col-md-2 control-label" }) + <div class="col-md-10"> + @Html.PasswordFor(m => m.Password, new { @class = "form-control" }) + </div> + </div> + <div class="form-group"> + @Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" }) + <div class="col-md-10"> + @Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" }) + </div> + </div> + <div class="form-group"> + <div class="col-md-offset-2 col-md-10"> + <input type="submit" class="btn btn-default" value="Reset" /> + </div> + </div> +} + +@section Scripts { + @Scripts.Render("~/bundles/jqueryval") +} diff --git a/Project-Unite/Views/Account/ResetPasswordConfirmation.cshtml b/Project-Unite/Views/Account/ResetPasswordConfirmation.cshtml new file mode 100644 index 0000000..3804516 --- /dev/null +++ b/Project-Unite/Views/Account/ResetPasswordConfirmation.cshtml @@ -0,0 +1,12 @@ +@{ + ViewBag.Title = "Reset password confirmation"; +} + +<hgroup class="title"> + <h1>@ViewBag.Title.</h1> +</hgroup> +<div> + <p> + Your password has been reset. Please @Html.ActionLink("click here to log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" }) + </p> +</div> diff --git a/Project-Unite/Views/Account/SendCode.cshtml b/Project-Unite/Views/Account/SendCode.cshtml new file mode 100644 index 0000000..a11a3a6 --- /dev/null +++ b/Project-Unite/Views/Account/SendCode.cshtml @@ -0,0 +1,24 @@ +@model Project_Unite.Models.SendCodeViewModel +@{ + ViewBag.Title = "Send"; +} + +<h2>@ViewBag.Title.</h2> + +@using (Html.BeginForm("SendCode", "Account", new { ReturnUrl = Model.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) { + @Html.AntiForgeryToken() + @Html.Hidden("rememberMe", @Model.RememberMe) + <h4>Send verification code</h4> + <hr /> + <div class="row"> + <div class="col-md-8"> + Select Two-Factor Authentication Provider: + @Html.DropDownListFor(model => model.SelectedProvider, Model.Providers) + <input type="submit" value="Submit" class="btn btn-default" /> + </div> + </div> +} + +@section Scripts { + @Scripts.Render("~/bundles/jqueryval") +} diff --git a/Project-Unite/Views/Account/VerifyCode.cshtml b/Project-Unite/Views/Account/VerifyCode.cshtml new file mode 100644 index 0000000..0f47757 --- /dev/null +++ b/Project-Unite/Views/Account/VerifyCode.cshtml @@ -0,0 +1,38 @@ +@model Project_Unite.Models.VerifyCodeViewModel +@{ + ViewBag.Title = "Verify"; +} + +<h2>@ViewBag.Title.</h2> + +@using (Html.BeginForm("VerifyCode", "Account", new { ReturnUrl = Model.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) { + @Html.AntiForgeryToken() + @Html.Hidden("provider", @Model.Provider) + @Html.Hidden("rememberMe", @Model.RememberMe) + <h4>Enter verification code</h4> + <hr /> + @Html.ValidationSummary("", new { @class = "text-danger" }) + <div class="form-group"> + @Html.LabelFor(m => m.Code, new { @class = "col-md-2 control-label" }) + <div class="col-md-10"> + @Html.TextBoxFor(m => m.Code, new { @class = "form-control" }) + </div> + </div> + <div class="form-group"> + <div class="col-md-offset-2 col-md-10"> + <div class="checkbox"> + @Html.CheckBoxFor(m => m.RememberBrowser) + @Html.LabelFor(m => m.RememberBrowser) + </div> + </div> + </div> + <div class="form-group"> + <div class="col-md-offset-2 col-md-10"> + <input type="submit" class="btn btn-default" value="Submit" /> + </div> + </div> +} + +@section Scripts { + @Scripts.Render("~/bundles/jqueryval") +} diff --git a/Project-Unite/Views/Account/_ExternalLoginsListPartial.cshtml b/Project-Unite/Views/Account/_ExternalLoginsListPartial.cshtml new file mode 100644 index 0000000..8b85588 --- /dev/null +++ b/Project-Unite/Views/Account/_ExternalLoginsListPartial.cshtml @@ -0,0 +1,28 @@ +@model Project_Unite.Models.ExternalLoginListViewModel +@using Microsoft.Owin.Security + +<h4>Use another service to log in.</h4> +<hr /> +@{ + var loginProviders = Context.GetOwinContext().Authentication.GetExternalAuthenticationTypes(); + if (loginProviders.Count() == 0) { + <div> + <p> + There are no external authentication services configured. See <a href="http://go.microsoft.com/fwlink/?LinkId=403804">this article</a> + for details on setting up this ASP.NET application to support logging in via external services. + </p> + </div> + } + else { + using (Html.BeginForm("ExternalLogin", "Account", new { ReturnUrl = Model.ReturnUrl })) { + @Html.AntiForgeryToken() + <div id="socialLoginList"> + <p> + @foreach (AuthenticationDescription p in loginProviders) { + <button type="submit" class="btn btn-default" id="@p.AuthenticationType" name="provider" value="@p.AuthenticationType" title="Log in using your @p.Caption account">@p.AuthenticationType</button> + } + </p> + </div> + } + } +} |
