Pylons/deform — pull request #187 by dairiki (2013-10-01 12:51:06+00:00)
Title: deform2: Support horizontal and inline form layouts.

With these changes, `Form.bootstrap_form_style` can be set to `form-horizontal` or `form-inline` to trigger bootstrap's alternative form layouts. (If I were starting from scratch, I would have put this in `FormWidget.style`, but
`Form.bootstrap_form_style` is how `deform_bootstrap` currently does it.)

For *horizontal* forms the columns widths are controlled by a new setting `MappingWidget.column_classes` (a two-tuple of CSS classes).

Within a horizontal form, if `.column_classes` is a false value, classes will be set in order to simulate the default "vertical" layout for that mapping (this involves setting both the label and control columns widths to `col-xs-12` and omitting the `control-label` class from the control label.) By default `MappingWidget.column_classes` is `None`, while `FormWidget.column_classes` is not, so that the top level form will be laid out horizontally, while any nested mappings will use a faux-vertical layout. (This complication is necessary since, within a `.form-horizontal`, all `.form_groups` must be structured in the horizontal style (with columns).)

(Even if you don't like the rest of this, you should look at the first two commits.)