mozilla/bedrock — pull request #1179 by jpetto (2013-08-19 16:01:34+00:00)
Title: Add error messages to partnership forms. Bug 904161.

**Probably not ready to merge!**

Looking for overall feedback on this approach. The forms affected by this PR can be found at `/about/partnerships/` & `/firefox/partners/`, but looking to have this be a general approach to all forms going forward.

To give each form a good test, try submitting without JS and/or with native validation disabled (add `novalidate` attr to the form tag...or use an old browser).

From the Django/Python side:

* Without JS, failed submissions will end up at the URL /about/partnerships/contact-bizdev/. Not sure if that's desired, but /firefox/partners/ needs to gracefully degrade somewhere. If we want both forms to share a Django endpoint, not sure we can avoid this.

* How will these new error messages affect l10n? What about the placeholder text being moved from the template to forms.py?

From the HTML/JS side:

* The common `displayErrors` function relies on each form field being wrapped in a containing element with the class `field`. That works for these two forms, and likely many others, but perhaps should be configurable?

* This error UI has been left alone, as it's being addressed in PR #1067.