浏览代码

Apply list styles for MultipleChoceFields

Seb 3 年之前
父节点
当前提交
a9f13d2dfb
共有 4 个文件被更改,包括 8 次插入2 次删除
  1. 1 0
      CHANGELOG.txt
  2. 4 2
      client/scss/components/_forms.scss
  3. 2 0
      client/scss/elements/_forms.scss
  4. 1 0
      docs/releases/2.15.rst

+ 1 - 0
CHANGELOG.txt

@@ -20,6 +20,7 @@ Changelog
  * Fix: Make ModelAdmin IndexView keyboard-navigable (Saptak Sengupta)
  * Fix: Prevent error on refreshing page previews when multiple preview tabs are open (Alex Tomkins)
  * Fix: Admin fields and Icon visibility issues in Windows high contrast mode (Dmitrii Faiazov)
+ * Fix: `blocks.MultipleChoiceBlock`, `forms.CheckboxSelectMultiple` and `ArrayField` checkboxes will now stack instead of display inline to align with all other checkboxes fields (Seb Brown)
 
 
 2.14.1 (12.08.2021)

+ 4 - 2
client/scss/components/_forms.scss

@@ -254,14 +254,17 @@ label.required:after {
     }
 }
 
-// This is specifically for model that are a generated set of checkboxes/radios
+// This is specifically for list of radios/checkboxes
 .model_multiple_choice_field .input li,
+.checkbox_select_multiple .input li,
+.multiple_choice_field .input li,
 .choice_field .input li {
     label {
         display: block;
         width: auto;
         float: none;
         padding-top: 0; // Negates padding added to label for the group of fields as a whole
+        padding-bottom: 0.8em;
     }
 }
 
@@ -331,7 +334,6 @@ li.inline:first-child {
     margin-left: -$grid-gutter-width / 2;
 }
 
-
 // search-bars
 .search-bar {
     .required .field > label:after {

+ 2 - 0
client/scss/elements/_forms.scss

@@ -55,7 +55,9 @@ label,
         padding-left: 0;
 
         .radio_select &,
+        .multiple_choice_field &,
         .model_multiple_choice_field &,
+        .checkbox_select_multiple &,
         .boolean_field &,
         .model_choice_field &,
         .image_field & {

+ 1 - 0
docs/releases/2.15.rst

@@ -35,6 +35,7 @@ Bug fixes
  * Make ModelAdmin IndexView keyboard-navigable (Saptak Sengupta)
  * Prevent error on refreshing page previews when multiple preview tabs are open (Alex Tomkins)
  * Admin fields and Icon visibility issues in Windows high contrast mode (Dmitrii Faiazov)
+ * `blocks.MultipleChoiceBlock`, `forms.CheckboxSelectMultiple` and `ArrayField` checkboxes will now stack instead of display inline to align with all other checkboxes fields (Seb Brown)
 
 Upgrade considerations
 ======================