diff options
Diffstat (limited to 'Project-Unite/Views/Manage')
| -rw-r--r-- | Project-Unite/Views/Manage/AddPhoneNumber.cshtml | 29 | ||||
| -rw-r--r-- | Project-Unite/Views/Manage/ChangePassword.cshtml | 40 | ||||
| -rw-r--r-- | Project-Unite/Views/Manage/Index.cshtml | 81 | ||||
| -rw-r--r-- | Project-Unite/Views/Manage/ManageLogins.cshtml | 70 | ||||
| -rw-r--r-- | Project-Unite/Views/Manage/SetPassword.cshtml | 39 | ||||
| -rw-r--r-- | Project-Unite/Views/Manage/VerifyPhoneNumber.cshtml | 31 |
6 files changed, 290 insertions, 0 deletions
diff --git a/Project-Unite/Views/Manage/AddPhoneNumber.cshtml b/Project-Unite/Views/Manage/AddPhoneNumber.cshtml new file mode 100644 index 0000000..07f35b0 --- /dev/null +++ b/Project-Unite/Views/Manage/AddPhoneNumber.cshtml @@ -0,0 +1,29 @@ +@model Project_Unite.Models.AddPhoneNumberViewModel +@{ + ViewBag.Title = "Phone Number"; +} + +<h2>@ViewBag.Title.</h2> + +@using (Html.BeginForm("AddPhoneNumber", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) +{ + @Html.AntiForgeryToken() + <h4>Add a phone number</h4> + <hr /> + @Html.ValidationSummary("", new { @class = "text-danger" }) + <div class="form-group"> + @Html.LabelFor(m => m.Number, new { @class = "col-md-2 control-label" }) + <div class="col-md-10"> + @Html.TextBoxFor(m => m.Number, 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="Submit" /> + </div> + </div> +} + +@section Scripts { + @Scripts.Render("~/bundles/jqueryval") +} diff --git a/Project-Unite/Views/Manage/ChangePassword.cshtml b/Project-Unite/Views/Manage/ChangePassword.cshtml new file mode 100644 index 0000000..f008697 --- /dev/null +++ b/Project-Unite/Views/Manage/ChangePassword.cshtml @@ -0,0 +1,40 @@ +@model Project_Unite.Models.ChangePasswordViewModel +@{ + ViewBag.Title = "Change Password"; +} + +<h2>@ViewBag.Title.</h2> + +@using (Html.BeginForm("ChangePassword", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) +{ + @Html.AntiForgeryToken() + <h4>Change Password Form</h4> + <hr /> + @Html.ValidationSummary("", new { @class = "text-danger" }) + <div class="form-group"> + @Html.LabelFor(m => m.OldPassword, new { @class = "col-md-2 control-label" }) + <div class="col-md-10"> + @Html.PasswordFor(m => m.OldPassword, new { @class = "form-control" }) + </div> + </div> + <div class="form-group"> + @Html.LabelFor(m => m.NewPassword, new { @class = "col-md-2 control-label" }) + <div class="col-md-10"> + @Html.PasswordFor(m => m.NewPassword, 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" value="Change password" class="btn btn-default" /> + </div> + </div> +} +@section Scripts { + @Scripts.Render("~/bundles/jqueryval") +}
\ No newline at end of file diff --git a/Project-Unite/Views/Manage/Index.cshtml b/Project-Unite/Views/Manage/Index.cshtml new file mode 100644 index 0000000..8b18401 --- /dev/null +++ b/Project-Unite/Views/Manage/Index.cshtml @@ -0,0 +1,81 @@ +@model Project_Unite.Models.ApplicationUser +@{ + ViewBag.Title = "My profile"; +} + +<div class="row"> + <h3><img src="@Model.AvatarUrl" width="64" height="64" /> @if (string.IsNullOrWhiteSpace(Model.FullName)) + { <strong> @Model.DisplayName </strong>} + else { + <strong>@Model.FullName</strong> <em>(@Model.DisplayName)</em> + }</h3> +</div> + + +<p class="text-success">@ViewBag.StatusMessage</p> + +<div class="row"> + <ul id="tabs" data-tabs="tabs" class="nav nav-tabs" role="tablist"> + <li class="active"><a data-toggle="tab" href="#t_profile">Profile</a></li> + <li><a data-toggle="tab" href="#t_badges">Badges</a></li> + <li><a data-toggle="tab" href="#t_posts">Posts</a></li> + <li><a data-toggle="tab" href="#t_messages">Messages</a></li> + <li><a data-toggle="tab" href="#t_preferences">Preferences</a></li> + </ul> + + <div class="tab-content"> + <div class="tab-pane active" id="t_profile"> + <table class="table"> + <tr> + <td><strong>Full name:</strong></td> + <td> + @if (string.IsNullOrWhiteSpace(Model.FullName)) + { + <p><em>Not provided.</em></p> + } + else + { + <p>@Model.FullName</p> + } + </td> + </tr> + <tr> + <td><strong>Display name:</strong></td> + <td><p>@Model.DisplayName</p></td> + </tr> + <tr> + <td><strong>Codepoints:</strong><p>If you have your in-game system linked with your account, your Codepoints will be shown here.</p></td> + <td><p>@Model.Codepoints</p></td> + </tr> + <tr> + <td>Links</td> + <td> + @if (!string.IsNullOrWhiteSpace(Model.YoutubeUrl)) { + <a href="@Model.YoutubeUrl"><span class="glyphicon glyphicon-hd-video"></span></a> + } + + @if (!string.IsNullOrWhiteSpace(Model.Website)) { + <a href="@Model.Website">Website</a> + } + </td> + </tr> + </table> + </div> + <div class="tab-pane" id="t_badges"> + <h4>Not yet implemented.</h4> + <p>This feature has not been implemented just yet.</p> + </div> + <div class="tab-pane" id="t_posts"> + <h4>Not yet implemented.</h4> + <p>This feature has not been implemented just yet.</p> + </div> + <div class="tab-pane" id="t_messages"> + <h4>Not yet implemented.</h4> + <p>This feature has not been implemented just yet.</p> + </div> + <div class="tab-pane" id="t_preferences"> + <h4>Not yet implemented.</h4> + <p>This feature has not been implemented just yet.</p> + </div> + </div> +</div>
\ No newline at end of file diff --git a/Project-Unite/Views/Manage/ManageLogins.cshtml b/Project-Unite/Views/Manage/ManageLogins.cshtml new file mode 100644 index 0000000..709cedc --- /dev/null +++ b/Project-Unite/Views/Manage/ManageLogins.cshtml @@ -0,0 +1,70 @@ +@model Project_Unite.Models.ManageLoginsViewModel +@using Microsoft.Owin.Security +@{ + ViewBag.Title = "Manage your external logins"; +} + +<h2>@ViewBag.Title.</h2> + +<p class="text-success">@ViewBag.StatusMessage</p> +@{ + 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=313242">this article</a> + for details on setting up this ASP.NET application to support logging in via external services. + </p> + </div> + } + else + { + if (Model.CurrentLogins.Count > 0) + { + <h4>Registered Logins</h4> + <table class="table"> + <tbody> + @foreach (var account in Model.CurrentLogins) + { + <tr> + <td>@account.LoginProvider</td> + <td> + @if (ViewBag.ShowRemoveButton) + { + using (Html.BeginForm("RemoveLogin", "Manage")) + { + @Html.AntiForgeryToken() + <div> + @Html.Hidden("loginProvider", account.LoginProvider) + @Html.Hidden("providerKey", account.ProviderKey) + <input type="submit" class="btn btn-default" value="Remove" title="Remove this @account.LoginProvider login from your account" /> + </div> + } + } + else + { + @: + } + </td> + </tr> + } + </tbody> + </table> + } + if (Model.OtherLogins.Count > 0) + { + using (Html.BeginForm("LinkLogin", "Manage")) + { + @Html.AntiForgeryToken() + <div id="socialLoginList"> + <p> + @foreach (AuthenticationDescription p in Model.OtherLogins) + { + <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> + } + } + } +} diff --git a/Project-Unite/Views/Manage/SetPassword.cshtml b/Project-Unite/Views/Manage/SetPassword.cshtml new file mode 100644 index 0000000..e8711e9 --- /dev/null +++ b/Project-Unite/Views/Manage/SetPassword.cshtml @@ -0,0 +1,39 @@ +@model Project_Unite.Models.SetPasswordViewModel +@{ + ViewBag.Title = "Create Password"; +} + +<h2>@ViewBag.Title.</h2> +<p class="text-info"> + You do not have a local username/password for this site. Add a local + account so you can log in without an external login. +</p> + +@using (Html.BeginForm("SetPassword", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) +{ + @Html.AntiForgeryToken() + + <h4>Create Local Login</h4> + <hr /> + @Html.ValidationSummary("", new { @class = "text-danger" }) + <div class="form-group"> + @Html.LabelFor(m => m.NewPassword, new { @class = "col-md-2 control-label" }) + <div class="col-md-10"> + @Html.PasswordFor(m => m.NewPassword, 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" value="Set password" class="btn btn-default" /> + </div> + </div> +} +@section Scripts { + @Scripts.Render("~/bundles/jqueryval") +}
\ No newline at end of file diff --git a/Project-Unite/Views/Manage/VerifyPhoneNumber.cshtml b/Project-Unite/Views/Manage/VerifyPhoneNumber.cshtml new file mode 100644 index 0000000..8d3098d --- /dev/null +++ b/Project-Unite/Views/Manage/VerifyPhoneNumber.cshtml @@ -0,0 +1,31 @@ +@model Project_Unite.Models.VerifyPhoneNumberViewModel +@{ + ViewBag.Title = "Verify Phone Number"; +} + +<h2>@ViewBag.Title.</h2> + +@using (Html.BeginForm("VerifyPhoneNumber", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) +{ + @Html.AntiForgeryToken() + @Html.Hidden("phoneNumber", @Model.PhoneNumber) + <h4>Enter verification code</h4> + <h5>@ViewBag.Status</h5> + <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"> + <input type="submit" class="btn btn-default" value="Submit" /> + </div> + </div> +} + +@section Scripts { + @Scripts.Render("~/bundles/jqueryval") +} |
