Commit 84d85fa3 authored by Jérome Perrin's avatar Jérome Perrin

Revert "discussion: remove temporary hidden input added for click"

This reverts commit 7aa5fb76
parent c3304c6f
function clickSaveButtonWithDiscussionPostUidHidden(id, buttonName) {
/* this will add respective input box for reply post id (so multiple reply buttons can
safely coexist in one HTML page with one HTML form.
Once the button was clicked, the hidden input is removed (so that this can be used
multiple times without reloading).
*/
var hiddenInput = $('<input type="hidden" name="discussion_post_uid">'),
form = $('form');
hiddenInput.val(id);
form.append(hiddenInput);
clickSaveButton(buttonName);
hiddenInput.remove();
function deleteDiscussionPost(id){
/* this will add respective input box for delete post id (so multiple delete buttons can
safely coexist in one HTML page with one HTML form */
$("form").append('<input type="hidden" name="discussion_post_uid" value="' +id + '">');
clickSaveButton("DiscussionThread_deleteDiscussionPost");
}
function deleteDiscussionPost(id) {
clickSaveButtonWithDiscussionPostUidHidden(
id,
'DiscussionThread_deleteDiscussionPost'
);
function redirectCreateCitedNewDiscussionPost(id){
/* this will add respective input box for reply post id (so multiple reply buttons can
safely coexist in one HTML page with one HTML form */
$("form").append('<input type="hidden" name="discussion_post_uid" value="' +id + '">');
clickSaveButton("DiscussionThread_redirectCreateNewDiscussionPost");
}
function redirectCreateCitedNewDiscussionPost(id) {
clickSaveButtonWithDiscussionPostUidHidden(
id,
'DiscussionThread_redirectCreateNewDiscussionPost'
);
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment