Download ContactManagementAPI/Views/Admin/EditUser.cshtml from abrahamcbe/contact-management-system: direct link, hf CLI and curl.
- Browser
- Download file 2.88 kB
-
https://huggingface.co/spaces/abrahamcbe/contact-management-system/resolve/main/ContactManagementAPI/Views/Admin/EditUser.cshtml
- Command line
-
hf download hf://spaces/abrahamcbe/contact-management-system/ContactManagementAPI/Views/Admin/EditUser.cshtml
-
curl -L -o EditUser.cshtml https://huggingface.co/spaces/abrahamcbe/contact-management-system/resolve/main/ContactManagementAPI/Views/Admin/EditUser.cshtml
2.88 kB
| @model ContactManagementAPI.ViewModels.UserEditViewModel | |
| @{ | |
| ViewData["Title"] = "Edit User"; | |
| var groups = ViewData["Groups"] as IEnumerable<ContactManagementAPI.Models.UserGroup>; | |
| } | |
| <div class="form-container"> | |
| <h2><i class="fas fa-user-edit"></i> Edit User</h2> | |
| <form method="post" asp-action="EditUser"> | |
| @Html.AntiForgeryToken() | |
| <input type="hidden" asp-for="Id" /> | |
| <div class="form-group"> | |
| <label asp-for="UserName"></label> | |
| <input asp-for="UserName" class="form-control" /> | |
| <span asp-validation-for="UserName" class="text-danger"></span> | |
| </div> | |
| <div class="form-group"> | |
| <label asp-for="FullName"></label> | |
| <input asp-for="FullName" class="form-control" /> | |
| <span asp-validation-for="FullName" class="text-danger"></span> | |
| </div> | |
| <div class="form-group"> | |
| <label>Group <span style="color:red;">*</span></label> | |
| <select asp-for="GroupId" class="form-control"> | |
| <option value="">-- Select Group --</option> | |
| @if (groups != null) | |
| { | |
| foreach (var group in groups) | |
| { | |
| if (Model.GroupId == group.Id) | |
| { | |
| <option value="@group.Id" selected="selected">@group.Name</option> | |
| } | |
| else | |
| { | |
| <option value="@group.Id">@group.Name</option> | |
| } | |
| } | |
| } | |
| </select> | |
| </div> | |
| <div class="form-group"> | |
| <label asp-for="NewPassword">Reset Password</label> | |
| <input asp-for="NewPassword" class="form-control" type="password" placeholder="Leave blank to keep current password" /> | |
| <span asp-validation-for="NewPassword" class="text-danger"></span> | |
| </div> | |
| <div class="form-row" style="display:flex; gap:20px;"> | |
| <div class="form-check"> | |
| <input asp-for="IsAdmin" class="form-check-input" type="checkbox" /> | |
| <label asp-for="IsAdmin" class="form-check-label">Admin</label> | |
| </div> | |
| <div class="form-check"> | |
| <input asp-for="IsActive" class="form-check-input" type="checkbox" /> | |
| <label asp-for="IsActive" class="form-check-label">Active</label> | |
| </div> | |
| </div> | |
| <div class="form-actions"> | |
| <button type="submit" class="btn btn-primary">Save</button> | |
| <a href="/admin/users" class="btn btn-secondary">Cancel</a> | |
| <a href="/admin/userrights/@Model.Id" class="btn btn-info">Manage Rights</a> | |
| </div> | |
| </form> | |
| </div> | |
| @section Scripts { | |
| <partial name="_ValidationScriptsPartial" /> | |
| } | |