[rt-users] stop form submit on ticket reply

Emmanuel Lacour elacour at easter-eggs.com
Wed Aug 24 11:15:08 EDT 2016


Le 24/08/2016 à 17:06, Hugo Escobar a écrit :
> Thanks Emmanuel for your response.
> 
> My initial post was a little inaccurate, I forgot to mention some details:
> 
> 1.    The user wants to add a ticket reply
> 2.    The user writes (and prepares her message, attachments, etc)
> 3.    The user presses the "Update Ticket", some condition is evaluated
> two possible outcomes (true, false)
> 3.1   If false => submit reply

ok

> 3.2   If true  => the user is asked if the reply should be submitted

use another callback in the same Update.html page to display a
confirmation button

> 3.2.1 User wants to continue => reply submitted

in you're first callback, get the submit value from $ARGSRef that say
the confirm button has been pressed.

> 3.2.2 User decides to abort reply submission => no ticket reply should
> be added
> 

the same, with a "Discard" button, you catch the value from $ARGSRef and
then use MaybeRedirectForResults to Display.html after emptying submited
values from $ARGSRef.




> I tried to implement something in javascript to handle "3.2.2" but the
> reply is always submitted
> 



no need for JS here, thought you can of course do this using only js ;)



More information about the rt-users mailing list