PyBossa/pybossa Issue 866 refactor forms

PR 2/3 of PyBossa/pybossa#866