Popup: 'enabled' flag, template event handlers