Commit a82e35cb authored by Jérome Perrin's avatar Jérome Perrin Committed by Cédric Le Ninivin

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

This reverts commit 7aa5fb76

> this change makes title empty when reply
nexedi/erp5!823 (comment 73439)

/reviewed-on nexedi/erp5!826
parent 3bca7c6d
function clickSaveButtonWithDiscussionPostUidHidden(id, buttonName) { function deleteDiscussionPost(id){
/* this will add respective input box for reply post id (so multiple reply buttons can /* 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. 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 $("form").append('<input type="hidden" name="discussion_post_uid" value="' +id + '">');
multiple times without reloading). clickSaveButton("DiscussionThread_deleteDiscussionPost");
*/
var hiddenInput = $('<input type="hidden" name="discussion_post_uid">'),
form = $('form');
hiddenInput.val(id);
form.append(hiddenInput);
clickSaveButton(buttonName);
hiddenInput.remove();
} }
function deleteDiscussionPost(id) { function redirectCreateCitedNewDiscussionPost(id){
clickSaveButtonWithDiscussionPostUidHidden( /* this will add respective input box for reply post id (so multiple reply buttons can
id, safely coexist in one HTML page with one HTML form */
'DiscussionThread_deleteDiscussionPost' $("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