Bug 31028: (follow-up) Consistently style help-block
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Wed, 2 Nov 2022 11:37:09 +0000 (11:37 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 6 Mar 2023 14:23:17 +0000 (11:23 -0300)
This patch updates the opac and staff modals to set the help-block
inside a div instead of a paragraph element allowing for the wysiwyg
edited content to display as prescribed.

We move the scss inside the fieldset definition to ensure we are
specific enough to catch only the intended elements.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss
koha-tmpl/intranet-tmpl/prog/en/includes/modals/add_catalog_concern.inc
koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss
koha-tmpl/opac-tmpl/bootstrap/en/includes/modals/catalog_concern.inc

index e984030..be6cfda 100644 (file)
@@ -885,6 +885,20 @@ fieldset {
             padding: .3em 0;
         }
     }
+
+    div {
+        &.help-block {
+            display: block;
+            margin-top: 5px;
+            margin-bottom: 10px;
+            color: #737373;
+
+            li {
+                list-style-type: unset;
+                list-style-position: inside;
+            }
+        }
+    }
 }
 
 details {
index 8f446a1..a657e0d 100644 (file)
                             <label class="required" for="concern_body">Please describe your concern: </label>
                             <textarea class="form-control" id="concern_body" name="concern_body" required="required" rows="15"></textarea>
                             [%- IF CatalogConcernHelp && CatalogConcernHelp.content && CatalogConcernHelp.content.count > 0 -%]
+                            <div class="help-block">
                             [%- FOREACH help IN CatalogConcernHelp.content -%]
-                            <p id="helpBlock" class="help-block">[%- help.content | $raw -%]</p>
+                                [%- help.content | $raw -%]
                             [%- END -%]
+                            </div>
                             [%- END -%]
                             <div class="hidden" id="concern_template">
                             [%- IF CatalogConcernTemplate && CatalogConcernTemplate.content && CatalogConcernTemplate.content.count > 0 -%]
index f5a7ec6..31d2e3d 100644 (file)
@@ -148,13 +148,6 @@ textarea {
     width: 50%;
 }
 
-.help-block {
-    display: block;
-    margin-top: 5px;
-    margin-bottom: 10px;
-    color: #737373;
-}
-
 legend {
     color: #727272;
     font-size: 110%;
@@ -997,6 +990,15 @@ fieldset {
         }
     }
 
+    div {
+        &.help-block {
+            display: block;
+            margin-top: 5px;
+            margin-bottom: 10px;
+            color: #737373;
+        }
+    }
+
     &.action {
         border: 0;
         clear: both;
index cd9bf7b..5b3d235 100644 (file)
                         <label for="concern_body">Please describe your concerns: </label>
                         <textarea class="form-control" name="concern_body" id="concern_body" aria-describedby="helpBlock" required="required" rows="15"></textarea>
                         [%- IF CatalogConcernHelp && CatalogConcernHelp.content && CatalogConcernHelp.content.count > 0 -%]
+                        <div class="help-block">
                         [%- FOREACH help IN CatalogConcernHelp.content -%]
-                        <p id="helpBlock" class="help-block">[%- help.content | $raw -%]</p>
+                            [%- help.content | $raw -%]
                         [%- END -%]
+                        </div>
                         [%- END -%]
                         <div id="concern_template" style="display: none;">
                         [%- IF CatalogConcernTemplate && CatalogConcernTemplate.content && CatalogConcernTemplate.content.count > 0 -%]