Fixed admin modal's button handling, respecting different button types

- 'Cancel' buttons are now properly working