Revert FieldRowPanel documentation removal, clarifying differences. Fix #10061

pull/10298/head
Thibaud Colas 2023-03-14 22:44:11 +00:00
rodzic 1d32d25cb8
commit d83a1cf193
1 zmienionych plików z 2 dodań i 0 usunięć

Wyświetl plik

@ -113,6 +113,8 @@ Note that you can use `classname="collapsed"` to load the panel collapsed under
Use of FieldRowPanel particularly helps reduce the "snow-blindness" effect of seeing so many fields on the page, for complex models. It also improves the perceived association between fields of a similar nature. For example if you created a model representing an "Event" which had a starting date and ending date, it may be intuitive to find the start and end date on the same "row".
By default, the panel is divided into equal-width columns, but this can be overridden by adding ``col*`` class names to each of the child Panels of the FieldRowPanel. The Wagtail editing interface is laid out using a grid system. Classes ``col1``-``col12`` can be applied to each child of a FieldRowPanel to define how many columns they span out of the total number of columns. When grid items add up to 12 columns, the class ``col3`` will ensure that field appears 3 columns wide or a quarter the width. ``col4`` would cause the field to be 4 columns wide, or a third the width.
.. attribute:: FieldRowPanel.children
A ``list`` or ``tuple`` of child panels to display on the row