move warning logic to template
Before, the warning was part of dispatch() and thus would get called and displayed twice (once for GET and POST). Moving the warning logic to the template prevents this.
Before, the warning was part of dispatch() and thus would get called and displayed twice (once for GET and POST). Moving the warning logic to the template prevents this.