Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Alert Box upon Creating New Ticket

How do I set a confirm box when a user wants to create a ticket?
Whereby when a user clicks submit form, the system prompts a message as the follow:-
"Are you sure you want to create trouble ticket?" --> Click “Create Ticket” to proceed or else click cancel.

Comments

  • This is not a feature in osTicket at this time.
    if the user took the time to create an account or log in and then fill out all the info for a ticket... its generally assumed that they are serious and want the ticket to be opened.
  • this is just a javascript feature that can be done, correct me if im wrong.
    would it be possible to point me towards the right file or script, so that I can try playing around with it?
    Thank you.
  • I can't as I dont know javascript.
  • found a solution whereby to include onsubmit="return show_alert(this);" on the <form>
    and my javascript function would be :-
    function show_alert() {
      if(confirm("Are you sure you want to create trouble ticket?"))
        document.forms[0].submit();
      else
        return false;
    }

    However upon clicking "No" in the alert box, the alert box disappears but the loading.gif appears and loops forever. Anyone here have encountered the same issue?
  • I doubt others are having the same issue since it's your modification.

    To hide the overlay use this command: $('#overlay, #loading').hide();
    And you may also want to add this $(window).bind('beforeunload', function(e) {
                    return __("Are you sure you want to leave? Any changes or info you've entered will be discarded!");
                 });
    Since it's being removed in the process of showing the loading window.
Sign In or Register to comment.