Skip to content

Commit

Permalink
Fix form staying around after saving post edit
Browse files Browse the repository at this point in the history
  • Loading branch information
itismadness committed Aug 15, 2021
1 parent da55641 commit 3a6fb02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions public/static/functions/comments.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,15 +192,15 @@ function Save_Edit(postid) {
if (location.href.match(/forums\.php/)) {
ajax.post("forums.php?action=takeedit","form" + postid, function (response) {
$('#bar' + postid).raw().innerHTML = "<a href=\"reports.php?action=report&amp;type=post&amp;id="+postid+"\" class=\"brackets\">Report</a>&nbsp;<a href=\"#\">&uarr;</a>";
$('#preview' + postid).raw().innerHTML = response;
$('#content' + postid).raw().innerHTML = response;
$('#editbox' + postid).ghide();
$('#pmbox' + postid).ghide();
$('#postcontrol-' + postid).gshow();
});
} else {
ajax.post("comments.php?action=take_edit","form" + postid, function (response) {
$('#bar' + postid).raw().innerHTML = "";
$('#preview' + postid).raw().innerHTML = response;
$('#content' + postid).raw().innerHTML = response;
$('#editbox' + postid).ghide();
$('#pmbox' + postid).ghide();
$('#postcontrol-' + postid).gshow();
Expand Down

0 comments on commit 3a6fb02

Please sign in to comment.