CA Service Management

 View Only
  • 1.  Close confirmation on edit mode

    Posted Aug 17, 2016 06:49 AM

    Hi,

    When the ticket is in edit mode and if the user tries to close the window using "Close Window" option, I need to show a popup to confirm the close as "Are you sure to close the window?"

    Please help me to achieve this

     

    -Saravana



  • 2.  Re: Close confirmation on edit mode
    Best Answer

    Posted Aug 17, 2016 07:57 AM

    You probably need to add a JavaScript function, something like...

     

    window.confirm("Are you sure to close window?");



  • 3.  Re: Close confirmation on edit mode

    Posted Aug 18, 2016 06:54 AM

    Thank you Brian.

    I added below code in welcome_banner.htmpl and it is working for all windows in edit mode

    ----------------------------------------------

    if(typeof ahdframe._dtl != "undefined" && ahdframe._dtl.edit) {

      var txt;

      var r = window.confirm("Are you sure you want to close this window before saving?  Click OK to close, Cancel to go back to edit.");

      if (r != true) {

      return;

      }

      }

    --------------------------------------------------------------

    I want to enable this for only ticket detail page in edit mode. Please help on this

    -Saravana



  • 4.  Re: Close confirmation on edit mode

    Posted Aug 24, 2016 04:36 AM

    Hi,

    Just adding the corresponding propformName in your if statement must do the trick

    /J



  • 5.  Re: Close confirmation on edit mode

    Posted Aug 24, 2016 06:42 AM

    Thanks JMayer.

     

    I added role id checking statement in if condition and that worked

     

    Thanks all

    -Saravana



  • 6.  Re: Close confirmation on edit mode

    Posted Aug 24, 2016 08:55 AM

    Love it when a plan comes together...