Editor
This commit is contained in:
1 parent
867770e14e
commit
0ef4daa019
369 files changed
+45861
-209
No files matched your search
@@ -0,0 +1,67 @@
|
||||
<div class="row mt-5">
|
||||
<div class="col-md-6 m-auto">
|
||||
<div class="card card-body">
|
||||
<h1 class="text-center mb-3">
|
||||
<i class="fas fa-user-plus"></i> Edit Account
|
||||
</h1>
|
||||
<% include ./partials/messages %>
|
||||
<form action="/users/edit" method="POST" enctype="multipart/form-data">
|
||||
|
||||
<!-- Catching _id -->
|
||||
<script>
|
||||
window.onload = function () {
|
||||
var url = document.location.href,
|
||||
params = url.split('?')[1].split('&'),
|
||||
data = {}, tmp;
|
||||
for (var i = 0, l = params.length; i < l; i++) {
|
||||
tmp = params[i].split('=');
|
||||
data[tmp[0]] = tmp[1];
|
||||
}
|
||||
document.getElementById('_id').value = data.name;
|
||||
}
|
||||
</script>
|
||||
<input id='_id' type='text' name='_id' value='' style='display: none'></input>
|
||||
<div class="form-group">
|
||||
<label for="name">Name</label>
|
||||
<input
|
||||
type="name"
|
||||
id="name"
|
||||
name="name"
|
||||
class="form-control"
|
||||
placeholder="Enter Name"
|
||||
value="<%= typeof name != 'undefined' ? name : '' %>"
|
||||
/>
|
||||
</div>
|
||||
<div class='form-group'>
|
||||
<label for='image'>Upload Profile Picture</label>
|
||||
<input class='form-control' type="file" id="image" name="image" value="">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password2">New Password</label>
|
||||
<input
|
||||
type="password"
|
||||
id="newPassword"
|
||||
name="newPassword"
|
||||
class="form-control"
|
||||
placeholder="New Password"
|
||||
value="<%= typeof password2 != 'undefined' ? password2 : '' %>"
|
||||
/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password2">Confirm New Password</label>
|
||||
<input
|
||||
type="password"
|
||||
id="newPassword2"
|
||||
name="newPassword2"
|
||||
class="form-control"
|
||||
placeholder="Confirm New Password"
|
||||
value="<%= typeof password2 != 'undefined' ? password2 : '' %>"
|
||||
/>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary btn-block">
|
||||
Save Changes
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in new issue
Block a user