most l10n form buttons are not themable with my-theme_button in template.php because they are not correctly defined in l10n_client.module.
Fix: change things like:
$form['copy'] = array(
'#value' => "",
);
into:
$form['copy'] = array(
'#value' => t('Copy Source') ,
'#type' =>'button',
'#id' =>'edit-copy',
);
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | theme-buttons.patch | 2.62 KB | gábor hojtsy |
| #3 | themeable-buttons.patch | 3.16 KB | gábor hojtsy |
Comments
Comment #1
gábor hojtsyHave you actually tried this? I believe this will theme them as buttons which might not be what we want.
Comment #2
wouter99999 commentedDear Gábor,
yes, I tried it and it worked for me. For the submit button it is already done correctly in l10nclient.module.
Wouter
Comment #3
gábor hojtsyIt is all too logical to use the theme API properly, so themes can style buttons as they wish. However using #type => button makes the buttons actual submit types. So we should counter that by returning false from their click handlers. Then they behave like before but are much more standardized and support theming as you wish. Committing to D6 and needs porting to D7.
Comment #4
gábor hojtsyHere is the D7 port. Committing.