DISIC / observatoire

🕵️‍♀️ Observatoire de la qualité des démarches en ligne
https://observatoire.numerique.gouv.fr/
GNU Lesser General Public License v3.0
10 stars 4 forks source link

Display the success message for saving the user feedback #62

Closed lucaa closed 6 years ago

lucaa commented 6 years ago

We need to display a message when the user feedback is saved, but without leaving the user on the page which is the response of the post of the form, to avoid re-posting the data (by browser refresh). We use PRG for this (https://en.wikipedia.org/wiki/Post/Redirect/Get) and we need a way to display a success message on the last Get. A transportation of the message on the session is probably the way to go, making sure we destroy it after using it the first time.

slauriere commented 6 years ago

Reference to a best practice: https://www.xwiki.org/xwiki/bin/view/Documentation/DevGuide/BestPractices/#HHandlingerrorswhenusingxredirectfornon-JavascriptUIs

slauriere commented 6 years ago

The message box was updated to a success box with the success macro instead of the info one.