Align panel checkboxes and radio choices with their labels
Coulobre Panel CI / Checks (Python 3.12) (pull_request) Successful in 1m47s
Coulobre Panel CI / Checks (Python 3.14) (pull_request) Successful in 1m59s

This commit is contained in:
parkel committed 2026-12-03 23:51:47 +01:00
1 parent fc62f52419
commit f596f092fb
6 files changed
+92 -12

No files matched your search

+22
View File
@@ -58,6 +58,28 @@ heading, help, fields, and actions should share a left edge.
and its theme tokens for type, color, spacing, and focus states. Avoid
fixed control widths, inline styles, and page-specific font sizes.
### Checkboxes and radio choices
Place the native control before its label, on the same row. The visible
label should toggle the control, and a long label should wrap underneath
its own text. Keep descriptions and errors below the label text. Preserve
Django's label association, error state, and description IDs.
- For Django-generated forms, use `form.as_div`. When rendering a single
bound field, put `field.as_field_group` in its own wrapper. The shared
stylesheet aligns the control and label without replacing the widget.
- For a handwritten confirmation, wrap the input and text in one label.
Keep radio choices and multi-checkbox groups in a fieldset with a
visible legend naming the group.
- Keep a compound control, such as a numeric quota with **Unlimited**,
in its own editor row. Its checkbox still sits next to its own label.
- Use the shared stylesheet in both Core and Premium. Check click and
keyboard operation, wrapping, and focus in both themes at a narrow width.
```html
<label><input type="checkbox" name="confirm" required> Confirm this change</label>
```
## Review a UI change
Compare the result with a Core page that serves the same purpose. In light