Re: [xwiki-users] How to add a button with confirmation to save my page?

2015-10-08 Thread Eduard Moraru
Hi, As far as I can see, you submit the form to '/bin/save/FormSMQ/MyCurrentPage' in javascript and *immediately* after the submit(), you send the redirect to 'FormSMQ/MyCurrentPage?docName=LauchNextProcess' which adds the object. IMO, the problem is that you are not making sure that the save op

Re: [xwiki-users] How to add a button with confirmation to save my page?

2015-10-07 Thread Pascal BASTIEN
Hi, I think I found a way to do what i want but I identify some issue (probably due to my ugly code) - my button SaveAndStuff launch this JS $('#inline').attr('action','/bin/save/FormSMQ/MyCurrentPage'); // I save my CurrentPage $('#inline').submit(); // I reopen my CurrentPage in view mo

Re: [xwiki-users] How to add a button with confirmation to save my page?

2015-10-05 Thread Eduard Moraru
Hi, You might want to have a look at the javascript [1] events that are thrown when pressing the standard save / save & continue buttons that you might want to catch and insert a confirmation to the user. Depending on the user's answer, you can either cancel the event or modify the dom (to add som

Re: [xwiki-users] How to add a button with confirmation to save my page?

2015-10-05 Thread Marius Dumitru Florea
I think the Save action supports an 'xredirect' parameter. So if your form has a hidden input field with name='xredirect' then the user will be redirected to the specified URL after the page is saved. So what you can do is: * catch the click event on the button * ask for confirmation https://devel

[xwiki-users] How to add a button with confirmation to save my page?

2015-10-05 Thread Pascal BASTIEN
Hi, I have my application with MyClass, MySheet and MyTemplate. When I have a new page (based on MySheet/Class), in edit mode I can modify all my fields of Myclass Object but I want to add a button to save my page after confirmation... For the moment I have a button to redirect in a new page BU