Disable closing modal dialogs by clicking close link, clicking outside or pressing escape key.
Re-add accidentally deleted 'else'.
Fix variable name.
Rename checkbox.
Remove unnecessary code.