Bug 31028: (follow-up) Consistently style help-block

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>
This commit is contained in:
Martin Renvoize 2022-11-02 11:37:09 +00:00 committed by Tomas Cohen Arazi
parent 01d03b2242
commit 30ee65e4c3
4 changed files with 29 additions and 9 deletions

View 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 {

View File

@ -25,9 +25,11 @@
<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 -%]

View 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;

View File

@ -22,9 +22,11 @@
<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 -%]