-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEdit-Admin-Account.aspx
More file actions
192 lines (183 loc) · 10.8 KB
/
Edit-Admin-Account.aspx
File metadata and controls
192 lines (183 loc) · 10.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<%@ Page Title="Edit Admin Profile" Language="C#" MasterPageFile="~/Admin-Dashboard.Master" AutoEventWireup="true" CodeBehind="Edit-Admin-Account.aspx.cs" Inherits="Z_Wallet.Edit_Admin_Account" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<main>
<div class="dashboard-wrapper">
<div class="container-fluid dashboard-content">
<div class="row">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="page-header">
<h2 class="pageheader-title"><i class="fa fa-fw fa-user"></i>Edit Admin Profile </h2>
<div class="page-breadcrumb">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="Admin" class="breadcrumb-link">Dashboard</a></li>
<li class="breadcrumb-item"><a href="Edit-Admin-Profile" class="breadcrumb-link">Edit Admin Profile</a></li>
</ol>
</nav>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-4">
<div class="card">
<div class="card-header">
<h4 class="mb-0">Edit Admin Picture</h4>
</div>
<div class="card-body text-center">
<div class="rounded-circle overflow-hidden profile-picture">
<asp:Image ID="previewImage" runat="server" CssClass="img-fluid" Style="max-width: 100%; height: auto;" ImageUrl="~/Content/assets/images/2.jpg" />
</div>
<br />
<div class="d-flex justify-content-center">
<div class="w-75">
<asp:FileUpload ID="fileUpload" runat="server" CssClass="mb-3" Style="display: none;" onchange="previewFile()" />
</div>
</div>
<asp:Button ID="btnChooseFile" runat="server" Text="Choose File" CssClass="btn btn-secondary mt-3 mr-1" OnClientClick="chooseFile();return false;" />
<asp:Button ID="btnUpload" runat="server" Text="Upload" CssClass="btn btn-primary mt-3" OnClick="btnUpload_Click" />
<asp:RegularExpressionValidator ID="revImageFile" runat="server" ControlToValidate="fileUpload" ErrorMessage="<br />Invalid file format. Please choose an image." ValidationExpression="^.*\.(jpg|JPG|jpeg|JPEG|png|PNG)$" CssClass="text-danger"></asp:RegularExpressionValidator>
<div class="form-group row text-center">
<div class="col-lg-12">
<asp:Label ID="lblAvatarSuccessMessage" runat="server" CssClass="text-success font-16" Visible="false"></asp:Label>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-8">
<div class="card">
<div class="card-header">
<h4 class="mb-0">Profile Information</h4>
</div>
<div class="card-body">
<div class="row">
<div class="col-md-6 mb-3">
<label for="firstName">First name</label>
<asp:TextBox ID="txtFirstName" runat="server" CssClass="form-control" placeholder=""></asp:TextBox>
</div>
<div class="col-md-6 mb-3">
<label for="lastName">Last name</label>
<asp:TextBox ID="txtLastName" runat="server" CssClass="form-control" placeholder=""></asp:TextBox>
</div>
<div class="col-md-12 mb-3">
<label for="email">Email</label>
<asp:TextBox ID="txtEmail" runat="server" CssClass="form-control" placeholder=""></asp:TextBox>
</div>
</div>
<div class="form-group row text-right">
<div class="col col-sm-10 col-lg-12 offset-lg-0">
<asp:Button ID="btnUpdate" runat="server" Text="Update" CssClass="btn btn-space btn-primary" OnClick="btnUpdate_Click" />
<asp:Button ID="btnCancel" runat="server" Text="Cancel" CssClass="btn btn-space btn-secondary" OnClick="btnCancel_Click" />
</div>
</div>
<div class="form-group row text-center">
<div class="col-lg-12">
<asp:Label ID="lblSuccessMessage" runat="server" CssClass="text-success font-16" Visible="false"></asp:Label>
<asp:Label ID="lblErrorMessage" runat="server" CssClass="text-danger font-16" Visible="false"></asp:Label>
</div>
</div>
</div>
</div>
<br />
<div class="card">
<div class="card-header">
<h4 class="mb-0">Change Password</h4>
</div>
<div class="card-body">
<div class="row">
<div class="col-md-6 mb-3">
<label for="oldPassword">Old Password</label>
<asp:TextBox ID="txtOldPassword" runat="server" TextMode="Password" CssClass="form-control" placeholder=""></asp:TextBox>
</div>
<div class="col-md-6 mb-3">
<label for="newPassword">New Password</label>
<asp:TextBox ID="txtNewPassword" runat="server" TextMode="Password" CssClass="form-control" placeholder=""></asp:TextBox>
</div>
<div class="col-md-6 mb-3">
<label for="confirmNewPassword">Confirm New Password</label>
<asp:TextBox ID="txtConfirmNewPassword" runat="server" TextMode="Password" CssClass="form-control" placeholder=""></asp:TextBox>
<asp:CompareValidator ID="cvPasswordMatch" runat="server" ControlToValidate="txtConfirmNewPassword" ControlToCompare="txtNewPassword" ErrorMessage="Passwords do not match." CssClass="text-danger"></asp:CompareValidator>
</div>
</div>
<div class="form-group row text-right">
<div class="col col-sm-10 col-lg-12 offset-lg-0">
<asp:Button ID="btnChangePassword" runat="server" Text="Change Password" CssClass="btn btn-space btn-primary" OnClick="btnChangePassword_Click" />
<asp:Button ID="btnCancelPassword" runat="server" Text="Cancel" CssClass="btn btn-space btn-secondary" OnClick="btnCancelPassword_Click" />
</div>
</div>
<div class="form-group row text-center">
<div class="col-lg-12">
<asp:Label ID="lblPasswordSuccessMessage" runat="server" CssClass="text-success font-16" Visible="false"></asp:Label>
<br />
<asp:Label ID="lblPasswordErrorMessage" runat="server" CssClass="text-danger font-16" Visible="false"></asp:Label>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
<style>
.profile-picture {
width: 150px;
height: 150px;
border-radius: 50%;
overflow: hidden;
margin: 0 auto;
}
.profile-picture img {
width: 100%;
height: 100%;
object-fit: cover;
}
.custom-file-input {
position: relative;
overflow: hidden;
margin-top: 8px;
}
.custom-file-label {
position: absolute;
top: 0;
left: 0;
right: 0;
padding: 0.375rem 0.75rem;
line-height: 1.5;
color: #495057;
background-color: #fff;
border: 1px solid #ced4da;
border-radius: 0.25rem;
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
cursor: pointer;
}
.custom-file-input:focus ~ .custom-file-label {
border-color: #80bdff;
box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}
</style>
<script>
function chooseFile() {
var fileInput = document.getElementById('<%=fileUpload.ClientID%>');
fileInput.click();
}
function previewFile() {
var preview = document.getElementById('<%=previewImage.ClientID%>');
var fileInput = document.getElementById('<%=fileUpload.ClientID%>');
var file = fileInput.files[0];
var reader = new FileReader();
reader.onloadend = function () {
preview.src = reader.result;
preview.style.display = "block";
};
if (file) {
reader.readAsDataURL(file);
document.getElementById('<%= lblAvatarSuccessMessage.ClientID %>').style.display = 'none';
} else {
preview.src = "";
preview.style.display = "none";
}
}
</script>
</asp:Content>