Overview
- Title
- enable post button only after all required data is given
- Duration
- 288
- Difficulty
- Hard
- Types
- Code
- Tags
- javascript, jinja2
- Mentors
- thomaswaldmann,rb_proj,waldi,esyr,pkumar_7
- Count
- -100 # see discussion
Description
Abstract
Currently one can post data of a form without entering all required data. If required data is missing the submission fails. This task should enable the post button only after all required data is given.
Details
On a moin wiki e.g. http://test.moinmo.in:8080/+register one can currently post the data by a simple <enter> before one entered all data. Usually this happens because someone believes the <enter> key works similiar to the tab key. Or he did not see which form fields are required.
Hints:
- there are many forms that need a minimum of required entries before posting makes sense
- a generic solution is wanted
- find the required fields of forms
- highlight them
- enable post button if all required fields have content
- disable post button if not all required fields have content
- verify that pasting content using the middle mouse button behaves like keyboard entry (and can activate the button)
Deliverables: patch
Skill Requirements
see tags
Links
Note: unless otherwise noted, tasks usually refer to moin2 (http://moinmo.in/MoinMoin2.0)!
http://hg.moinmo.in/moin/2.0-dev repository of moin2
http://hg.moinmo.in/moin/1.9 repository of moin 1.9
Discussion
Please note that this task is maybe not as easy as it first looks.
To do this right and in a generic way, one would need this:
- js-based validation for all sorts of data to run in the browser
- do same validation again in python (flatland) as not everyone is required to have js active and one could cheat maybe (we shouldn't trust the client)
So I guess before we implement such stuff (if ever), we rather first work on more basic and easier stuff.