[IMP] Improved code and now the ticket window will be opened in modal.