Minor Changes
This commit is contained in:
1 parent
05d6b58062
commit
743efa5e7a
2 files changed
+15
-2
No files matched your search
@@ -223,7 +223,6 @@ router.post('/edit', upload.single('image'), (req, res, next) => {
|
||||
console.log('With defaultImage');
|
||||
db.close()
|
||||
});
|
||||
res.flash('Success')
|
||||
res.redirect('/users/login');
|
||||
}
|
||||
);
|
||||
|
||||
@@ -36,6 +36,11 @@
|
||||
top: 0px;
|
||||
right: 0px;
|
||||
}
|
||||
#edit-btn {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
right: 85px;
|
||||
}
|
||||
#welcome {
|
||||
position: absolute;
|
||||
left: 115px;
|
||||
@@ -88,7 +93,16 @@
|
||||
|
||||
<!-- Action Buttons -->
|
||||
<a id='logout-btn' href="/users/logout" class="btn btn-secondary">Logout</a>
|
||||
<button onClick='passData()' class='btn btn-secondary'>Edit</button>
|
||||
<button id='edit-btn' onClick='passData()' class='btn btn-secondary'>Edit</button>
|
||||
|
||||
<!-- Passing user _id to edit page script -->
|
||||
<script>
|
||||
function passData() {
|
||||
let url = '/users/edit?name=' + encodeURIComponent('<%= user._id %>');
|
||||
|
||||
document.location.href = url;
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
Reference in new issue
Block a user