Bug 34478: Fix style and markup of forms within dropdowns

This patch adds some CSS for handling the style of form buttons inside
Bootstrap dropdowns and corrects related markup in two places: Authority
search results and Suggestion management.

Buttons should look correct if we avoid using <fieldset> inside
dropdowns and make sure the button has "btn btn-default" classes.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Owen Leonard 2024-02-22 12:10:16 +00:00 committed by Jonathan Druart
parent d6cf04d7da
commit 16a05fa41a
Signed by: jonathan.druart
GPG key ID: A085E712BEF0E0F0
3 changed files with 32 additions and 12 deletions

View file

@ -1387,6 +1387,30 @@ dd {
text-decoration: none;
}
}
button {
&.btn {
background-color: transparent;
border: 0;
border-radius: 0;
clear: both;
color: #333;
display: block;
font-weight: 400;
line-height: 1.4285;
padding: 3px 20px;
text-align: left;
white-space: nowrap;
width: 100%;
&:hover {
background-color: #DADADA;
background-image: none;
color: #000;
text-decoration: none;
}
}
}
}
}

View file

@ -124,9 +124,7 @@
<input type="hidden" name="value" value="[% value | uri %]" />
<input type="hidden" name="startfrom" value="[% startfrom | html %]" />
<input type="hidden" name="resultsperpage" value="[% resultsperpage | html %]" />
<fieldset class="action">
<input type="submit" class="btn btn-primary" value="Delete" />
</fieldset>
<button type="submit" class="btn btn-default"><i class="fa fa-trash"></i> Delete</button>
</form></li>
[% END %]
<li class="authority_preview">

View file

@ -862,18 +862,16 @@
<a class="btn btn-default btn-xs" role="button" href="suggestion.pl?suggestionid=[% s.suggestionid | html %]&amp;op=edit_form"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a><a class="btn btn-default btn-xs dropdown-toggle" id="more_actions_[% s.suggestionid | html %]" role="button" data-toggle="dropdown" href="#"><b class="caret"></b></a>
<ul class="dropdown-menu pull-right" role="menu" aria-labelledby="more_actions_[% s.suggestionid | html %]">
<li>
<fieldset class="action">
<button class="trigger_action" data-op="cud-delete" data-suggestionid="[% s.suggestionid | html %]" class="btn btn-primary">Delete</button>
</fieldset>
<button data-op="cud-delete" data-suggestionid="[% s.suggestionid | html %]" class="btn btn-default trigger_action">Delete</button>
</li>
[% UNLESS s.archived %]
<li><fieldset class="action">
<button class="trigger_action" data-op="cud-archive" data-suggestionid="[% s.suggestionid | html %]" class="btn btn-primary">Archive</button>
</fieldset></li>
<li>
<button class="btn btn-default trigger_action" data-op="cud-archive" data-suggestionid="[% s.suggestionid | html %]">Archive</button>
</li>
[% ELSE %]
<li><fieldset class="action">
<button class="trigger_action" data-op="cud-unarchive" data-suggestionid="[% s.suggestionid | html %]" class="btn btn-primary">Unarchive</button>
</fieldset></li>
<li>
<button class="btn btn-default trigger_action" data-op="cud-unarchive" data-suggestionid="[% s.suggestionid | html %]">Unarchive</button>
</li>
[% END %]
</ul>
</div>