Rewrite confirmation dialog box feature

The previous implementation was not generic enough to accomodate all the
use cases I predicted before.

Ticket:	#5144
(cherry picked from commit d729f55eed7b14a4a6425834a4f9d204de146072)
Catch up changes in the API

Ticket:	#5144
(cherry picked from commit d02f309ad7cc5866b7940351a960adc0c0af05d2)