Maybe someone knows why when you change the name of the button, its class changes from btn-primary to btn-default. btn-primary only if there is a submit in the button name (Without spaces before or after).
1 Answer
Thank you so much for Clive help. As it turned out, the _bootstrap_colorize_button function is responsible for choosing which class will be assigned depending on the label. To add a new word to this function, you need to implement hook_bootstrap_colorize_text_alter(). My code.
function myTheme_bootstrap_colorize_text_alter(array &$texts){
$texts['contains'][t('Register')] = 'primary';
}
Instead of t ('Register'), you need the word and assign the bootstrap class you need.
_bootstrap_colorize_button()
)