Added Javascript to template.
Adjusted CSS so the max width can be a bit wider.
This won't affect Javascript.
Still need to refactor so code is tidier - right now same code included
multiple times on pages.
Note: removed class from span containing value box and put it around span
containing choice's text
Choice text will wrap if necessary.
Currently, width of choice text is 35% - see questionnaire.css
choice-multiple-freeform.html: Text box and % sign wrapped up in the same
SPAN that now has a dependency check instead of the dependency check being
on the text box inside.
questionnaire.css: No need for styling disabled input boxes anymore for
this question type. Span disappears, not box.
questionset.js: Added ability to show/hide spans (with triggers).
choice.py: Had to change jstriggers to set off containing SPAN, not
input box.
Works both on page load and when user interacts. Remembers to
enable/disable checkbox on returning.
choice.py: Added jstriggers for text fields (so they'd be triggered when
checkboxes are checked/unchecked), and return a new dict item qvalues
which contains string qnum_value for each choice selected.
choice-multiple-freeform.html: Now has a dependency check for each
input box - dependent on associated checkbox being checked.
views.py: show_questionnaire() now processes qdict['qvalues'] to send
to questionset.html to trigger initial valchanged() calls - to make sure
inputs are properly enabled/disabled when page loads.
*** This may also allow display of other questions to be conditional on
values of choice-multiple questions.
* For older browsers there's a javascript fallback which ensures that the values entered into the text input are fall within min-max and are divisable by step.
* The new widget adds two new checks - step and unit.
* The unit is displayed next to the input element.
With the newline / nobreak feature a user could align multiple questions horizontally.
Apart from the fact that I'm not sure if it is even used I would rather implement it by using css instead of <br/> calls in different widgets. As it was it didn't really work well with twitter bootstrap, so I'd rather take it out of the equation for now and concentrate on good default rendering.