Posted by j0rd on August 21, 2009 at 3:26am
Jump to:
| Project: | UC Attribute Stock Filter |
| Version: | 6.x-1.0-beta12 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Issue Summary
A lot of the sites I use overwrite the add to cart buttons with images. Some of these even get rid of the text and instead opt for full images.
Now with this, I'd ideally like the ability to have an "Out of Stock" button. Currently UC Attribute Stock Filter only disables the button, but does not include any way of styling this in CSS. I would request that you add an additional and distinct class name, so we can use it in CSS. Keep in mind some browsers do not support double classes in CSS like .edit-submit.nostock , so instead provide a distinct name like .edit-submit-nostock or edit-submit-disabled
Thanks.
Comments
#1
This is easy enough. I added this line
$form['submit']['#attributes']['class'] .= ' oos';right above
$form['submit']['#attributes']['disabled'] = 'disabled';To add an 'oos' class to the submit button.
#2
I just used css attribute selectors:
input[disabled="disabled"] { STYLES HERE }