Toggle active/inactive class on the dialog element