Closed (fixed)
Project:
Drulma
Version:
8.x-1.x-dev
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 May 2020 at 02:07 UTC
Updated:
14 Jun 2020 at 11:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
himanshu_sindhwani commentedComment #3
matija5 commentedHi, this is because 'themes/contrib/drulma/templates/fontawesome5/form/input--submit--addanotheritem.html.twig' extends 'input.html.twig' instead of 'input--submit.html.twig'.
I created a patch with extends 'input--submit.html.twig'.
Comment #4
rodrigoaguileraI think I have to test this locally.
@vebrovski Doesn't your change remove the icon from the button?
Comment #5
matija5 commented@rodrigoaguilera you are right, it does remove icon from button.
As @ptmkenny said, the problem is in
inputclass of<input>element.You could wrap
<input>element inside 'input.html.twig' with another block and then in 'input--submit--addanotheritem.html.twig' remove that class with<input{{ attributes.removeClass('input') }} />{{ children }}.Or refactor code for submit template by adding icon to it?
Comment #6
himanshu_sindhwani commentedI am not getting any icon on the button and the patch mentioned in #3 solves the problem for me. Can you please let me know if I am missing anything?
Here is what i am having before the patch:

and this after the patch:

Comment #7
matija5 commentedThere is an element
<span class="icon is-left">missing if patch is applied.Comment #8
matija5 commentedAnother take with solution from #5 with keeping
{% extends 'input.html.twig' %}in templates/fontawesome5/form/input--submit--addanotheritem.html.twig and removing input class from button.Comment #9
rodrigoaguileraI finally had the chance to look at it locally in my computer this weekend.
First, the file had the wrong filename so it was picked even when no fontawesome was enabled.
To fix this what I did is just imitate what is done in input--submit--remove--fa5.html.twig with the proper icon.
Thank you for your input.