Added ability to change cancel button type.