dokterbob/django-newsletter — pull request #68 by jkuczm (2013-05-31 19:38:24+00:00)
Title: Fix JavaScript error on "Add submission" page

On "Add submission" page following error occurred:
```
Uncaught exception: TypeError: Cannot convert 'submitlink' to object
Error thrown at line 6, column 8 in (submitname) in http://127.0.0.1:8000/static/newsletter/admin/js/submit_interface.js:
submitlink.href = 'javascript:SubmitInterface.process()';
called from line 177, column 64 in (e) in http://127.0.0.1:8000/admin/newsletter/submission/add/:
SubmitInterface.init('submitlink');
```

Template admin/newsletter/submission/change_form.htm always tried to add some JavaScript event for `#submitlink`, even on "Add submission" page where there's no `#submitlink`.

Fixed by wrapping relevant JavaScript in template with the same conditions that surround `#submitlink`. But maybe JavaScript should be made more bulletproof?