add html5 form validation and fix JS for theme submission (bug 830988)