When you have "Iconize Buttons" disabled at /admin/appearance/settings/bootstrap then the buttons don't show any text - it has class sr-only. In my opinion it should show text if icons are disabled.

Screenshot of search buttons broken

Bootstrap settings

Comments

hkirsman created an issue. See original summary.

hkirsman’s picture

Issue summary: View changes
Grimreaper’s picture

Assigned: Unassigned » Grimreaper

I will provide a patch.

Grimreaper’s picture

Assigned: Grimreaper » Unassigned
Status: Active » Needs review
FileSize
2.16 KB

Here is a patch that fix the issue.

Thanks for the review.

ybenitezf’s picture

In the same line you get the same result if you have a multi-language site, when you translate 'search' to to target language the glyph icon don't show and the button get broken.

markcarver’s picture

Status: Needs review » Needs work
+++ b/src/Plugin/Form/SearchBlockForm.php
@@ -23,7 +23,9 @@ class SearchBlockForm extends FormBase {
-    $form->actions->submit->setProperty('icon_only', TRUE);
+    if (Bootstrap::getTheme()->getSetting('button_iconize')) {
+      $form->actions->submit->setProperty('icon_only', TRUE);
+    }

This shouldn't have to check the setting to set this property.

If anything, I'd say that the template just needs to also check if there's an icon input--button.html.twig (line 34).

Grimreaper’s picture

Status: Needs work » Needs review
FileSize
872 bytes

Hello,

@markcarver: ok, here is reworked patch.

hkirsman’s picture

The last patch worked for me. Thank you!

@ybenitezf, does this work for you too?

ybenitezf’s picture

Be testing it in a moment ... Yes thanks a lot it work the right way in all languages.

  • markcarver committed 15a4319 on 8.x-3.x authored by Grimreaper
    Issue #2877263 by Grimreaper, hkirsman: Search button broken when glyph...
markcarver’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.