Advertisement
Guest User

Untitled

a guest
Jan 19th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.92 KB | None | 0 0
  1. @using (Html.BeginForm())
  2. {
  3. @Html.AntiForgeryToken()
  4.  
  5. <div class="form-horizontal">
  6. <h4>User</h4>
  7. <hr />
  8. @Html.ValidationSummary(true, "", new { @class = "text-danger" })
  9. @Html.HiddenFor(model => model.Id)
  10.  
  11. @if (this.User.IsInRole("Staff"))
  12. {
  13. <div class="form-group">
  14. @Html.LabelFor(model => model.Role, "Role", htmlAttributes: new { @class = "control-label col-md-2" })
  15. <div class="col-md-10">
  16. @Html.DropDownList("Role", null, htmlAttributes: new { @class = "form-control" })
  17. @Html.ValidationMessageFor(model => model.Role, "", new { @class = "text-danger" })
  18. </div>
  19. </div>
  20. }
  21. else
  22. {
  23. @Html.HiddenFor(model => model.Role)
  24. }
  25.  
  26. <div class="form-group">
  27. @Html.LabelFor(model => model.Email, htmlAttributes: new { @class = "control-label col-md-2" })
  28. <div class="col-md-10">
  29. @Html.EditorFor(model => model.Email, new { htmlAttributes = new { @class = "form-control" } })
  30. @Html.ValidationMessageFor(model => model.Email, "", new { @class = "text-danger" })
  31. @Html.ValidationMessage("emailInUse")
  32. </div>
  33. </div>
  34.  
  35. <div class="form-group">
  36. @Html.LabelFor(model => model.EmailConfirmed, htmlAttributes: new { @class = "control-label col-md-2" })
  37. <div class="col-md-10">
  38. <div class="checkbox">
  39. @Html.EditorFor(model => model.EmailConfirmed)
  40. @Html.ValidationMessageFor(model => model.EmailConfirmed, "", new { @class = "text-danger" })
  41. </div>
  42. </div>
  43. </div>
  44.  
  45. <div class="form-group">
  46. @Html.LabelFor(model => model.PasswordHash, htmlAttributes: new { @class = "control-label col-md-2" })
  47. <div class="col-md-10">
  48. @Html.EditorFor(model => model.PasswordHash, new { htmlAttributes = new { @class = "form-control" } })
  49. @Html.ValidationMessageFor(model => model.PasswordHash, "", new { @class = "text-danger" })
  50. </div>
  51. </div>
  52.  
  53. <div class="form-group">
  54. @Html.LabelFor(model => model.SecurityStamp, htmlAttributes: new { @class = "control-label col-md-2" })
  55. <div class="col-md-10">
  56. @Html.EditorFor(model => model.SecurityStamp, new { htmlAttributes = new { @class = "form-control" } })
  57. @Html.ValidationMessageFor(model => model.SecurityStamp, "", new { @class = "text-danger" })
  58. </div>
  59. </div>
  60.  
  61. <div class="form-group">
  62. @Html.LabelFor(model => model.PhoneNumber, htmlAttributes: new { @class = "control-label col-md-2" })
  63. <div class="col-md-10">
  64. @Html.EditorFor(model => model.PhoneNumber, new { htmlAttributes = new { @class = "form-control" } })
  65. @Html.ValidationMessageFor(model => model.PhoneNumber, "", new { @class = "text-danger" })
  66. </div>
  67. </div>
  68.  
  69. <div class="form-group">
  70. @Html.LabelFor(model => model.PhoneNumberConfirmed, htmlAttributes: new { @class = "control-label col-md-2" })
  71. <div class="col-md-10">
  72. <div class="checkbox">
  73. @Html.EditorFor(model => model.PhoneNumberConfirmed)
  74. @Html.ValidationMessageFor(model => model.PhoneNumberConfirmed, "", new { @class = "text-danger" })
  75. </div>
  76. </div>
  77. </div>
  78.  
  79. <div class="form-group">
  80. @Html.LabelFor(model => model.TwoFactorEnabled, htmlAttributes: new { @class = "control-label col-md-2" })
  81. <div class="col-md-10">
  82. <div class="checkbox">
  83. @Html.EditorFor(model => model.TwoFactorEnabled)
  84. @Html.ValidationMessageFor(model => model.TwoFactorEnabled, "", new { @class = "text-danger" })
  85. </div>
  86. </div>
  87. </div>
  88.  
  89. <div class="form-group">
  90. @Html.LabelFor(model => model.LockoutEndDateUtc, htmlAttributes: new { @class = "control-label col-md-2" })
  91. <div class="col-md-10">
  92. @Html.EditorFor(model => model.LockoutEndDateUtc, new { htmlAttributes = new { @class = "form-control" } })
  93. @Html.ValidationMessageFor(model => model.LockoutEndDateUtc, "", new { @class = "text-danger" })
  94. </div>
  95. </div>
  96.  
  97. <div class="form-group">
  98. @Html.LabelFor(model => model.LockoutEnabled, htmlAttributes: new { @class = "control-label col-md-2" })
  99. <div class="col-md-10">
  100. <div class="checkbox">
  101. @Html.EditorFor(model => model.LockoutEnabled)
  102. @Html.ValidationMessageFor(model => model.LockoutEnabled, "", new { @class = "text-danger" })
  103. </div>
  104. </div>
  105. </div>
  106.  
  107. <div class="form-group">
  108. @Html.LabelFor(model => model.AccessFailedCount, htmlAttributes: new { @class = "control-label col-md-2" })
  109. <div class="col-md-10">
  110. @Html.EditorFor(model => model.AccessFailedCount, new { htmlAttributes = new { @class = "form-control" } })
  111. @Html.ValidationMessageFor(model => model.AccessFailedCount, "", new { @class = "text-danger" })
  112. </div>
  113. </div>
  114.  
  115. <div class="form-group">
  116. @Html.LabelFor(model => model.UserName, htmlAttributes: new { @class = "control-label col-md-2" })
  117. <div class="col-md-10">
  118. @Html.EditorFor(model => model.UserName, new { htmlAttributes = new { @class = "form-control" } })
  119. @Html.ValidationMessageFor(model => model.UserName, "", new { @class = "text-danger" })
  120. </div>
  121. </div>
  122.  
  123. <div class="form-group">
  124. @Html.LabelFor(model => model.FirstName, htmlAttributes: new { @class = "control-label col-md-2" })
  125. <div class="col-md-10">
  126. @Html.EditorFor(model => model.FirstName, new { htmlAttributes = new { @class = "form-control" } })
  127. @Html.ValidationMessageFor(model => model.FirstName, "", new { @class = "text-danger" })
  128. </div>
  129. </div>
  130.  
  131. <div class="form-group">
  132. @Html.LabelFor(model => model.LastName, htmlAttributes: new { @class = "control-label col-md-2" })
  133. <div class="col-md-10">
  134. @Html.EditorFor(model => model.LastName, new { htmlAttributes = new { @class = "form-control" } })
  135. @Html.ValidationMessageFor(model => model.LastName, "", new { @class = "text-danger" })
  136. </div>
  137. </div>
  138.  
  139. <div class="form-group">
  140. @Html.LabelFor(model => model.Town, htmlAttributes: new { @class = "control-label col-md-2" })
  141. <div class="col-md-10">
  142. @Html.EditorFor(model => model.Town, new { htmlAttributes = new { @class = "form-control" } })
  143. @Html.ValidationMessageFor(model => model.Town, "", new { @class = "text-danger" })
  144. </div>
  145. </div>
  146.  
  147. <div class="form-group">
  148. @Html.LabelFor(model => model.Role, htmlAttributes: new { @class = "control-label col-md-2" })
  149. <div class="col-md-10">
  150. @Html.EditorFor(model => model.Role, new { htmlAttributes = new { @class = "form-control" } })
  151. @Html.ValidationMessageFor(model => model.Role, "", new { @class = "text-danger" })
  152. </div>
  153. </div>
  154.  
  155. <div class="form-group">
  156. <div class="col-md-offset-2 col-md-10">
  157. <input type="submit" value="Save" class="btn btn-default" />
  158. </div>
  159. </div>
  160. </div>
  161. }
  162.  
  163. <div>
  164. @Html.ActionLink("Back to List", "Index")
  165. </div>
  166.  
  167. @section Scripts {
  168. @Scripts.Render("~/bundles/jqueryval")
  169. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement