Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @model WebStore.Models.IndexViewModel
- @{
- ViewBag.Title = "My Profile";
- }
- <h2>@ViewBag.Title.</h2>
- <p class="text-success">@ViewBag.StatusMessage</p>
- <div>
- <h4>Change your account settings</h4>
- <hr />
- <dl class="dl-horizontal">
- <dt>FirstName</dt>
- <dd>@Html.TextBoxFor(m => Model.User.FirstName, new { @disabled = "disabled", @class = "personal" })</dd>
- <dt>LastName</dt>
- <dd>@Html.TextBoxFor(m => Model.User.LastName, new { @disabled = "disabled", @class = "personal" })</dd>
- <dt>Country</dt>
- <dd>@Html.TextBoxFor(m => Model.User.Country, new { @disabled = "disabled", @class = "personal" })</dd>
- <dt>City</dt>
- <dd>@Html.TextBoxFor(m => Model.User.City, new { @disabled = "disabled", @class = "personal" })</dd>
- <dt>Street</dt>
- <dd>@Html.TextBoxFor(m => Model.User.Street, new { @disabled = "disabled", @class = "personal" })</dd>
- <dt>House</dt>
- <dd>@Html.TextBoxFor(m => Model.User.House, new { @disabled = "disabled", @class = "personal" })</dd>
- <dt>Building</dt>
- <dd>@Html.TextBoxFor(m => Model.User.Building, new { @disabled = "disabled", @class = "personal" })</dd>
- <dt>Password:</dt>
- <dd>
- [
- @if (Model.HasPassword)
- {
- @Html.ActionLink("Change your password", "ChangePassword")
- }
- else
- {
- @Html.ActionLink("Create", "SetPassword")
- }
- ]
- </dd>
- <dt>External Logins:</dt>
- <dd>
- @Model.Logins.Count [
- @Html.ActionLink("Manage", "ManageLogins") ]
- </dd>
- @*
- Phone Numbers can used as a second factor of verification in a two-factor authentication system.
- See <a href="https://go.microsoft.com/fwlink/?LinkId=403804">this article</a>
- for details on setting up this ASP.NET application to support two-factor authentication using SMS.
- Uncomment the following block after you have set up two-factor authentication
- *@
- @*
- <dt>Phone Number:</dt>
- <dd>
- @(Model.PhoneNumber ?? "None")
- @if (Model.PhoneNumber != null)
- {
- <br />
- <text>[ @Html.ActionLink("Change", "AddPhoneNumber") ]</text>
- using (Html.BeginForm("RemovePhoneNumber", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
- {
- @Html.AntiForgeryToken()
- <text>[<input type="submit" value="Remove" class="btn-link" />]</text>
- }
- }
- else
- {
- <text>[ @Html.ActionLink("Add", "AddPhoneNumber")
- }
- </dd>
- *@
- <dt>Two-Factor Authentication:</dt>
- <dd>
- <p>
- Not implemented.
- </p>
- @*@if (Model.TwoFactor)
- {
- using (Html.BeginForm("DisableTwoFactorAuthentication", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
- {
- @Html.AntiForgeryToken()
- <text>Enabled
- <input type="submit" value="Disable" class="btn btn-link" />
- </text>
- }
- }
- else
- {
- using (Html.BeginForm("EnableTwoFactorAuthentication", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
- {
- @Html.AntiForgeryToken()
- <text>Disabled
- <input type="submit" value="Enable" class="btn btn-link" />
- </text>
- }
- }*@
- </dd>
- </dl>
- <div class="form-group">
- <div class="col-md-offset-2 col-md-10">
- <input type="submit" class="btn btn-default" value="Сохранить" />
- <input id ="submitbt" type="button" onclick="change()" class="btn btn-default" value="Редактировать" />
- </div>
- </div>
- @*<button id="submitbt" disabled="disabled" type="submit">Сохранить</button>
- <button onclick="change()">Редактировать</button>*@
- </div>
- <script>
- function change() {
- var e = document.getElementsByClassName("personal");
- var arr = Array.prototype.slice.call(e);
- for (var i = 0; i < arr.length; i++) {
- arr[i].disabled = false;
- arr[i].classList.remove("personal");
- }
- var b = document.getElementById("submitbt");
- b.disabled = false;
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement