Commit 63cd818f authored by Jérome Perrin's avatar Jérome Perrin

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 a7eae8e0
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