Motivation: Checkboxes and Radiobuttons get an ugly
border, if one sets the background-colour of
input-elements. On the other hand, textboxes and submit
buttons can benefit from that. A couple of browsers
don't support the needed selectors to address them
directly, so why not introduce classes to do so?
As most modules rely on the PWS Form-classes to get the
job done, only two changes in core/Form.php are needed:
formRadio():
70 $radio = "<input type=\"radio\"
name=\"$name\" value=\"$value\" ";
71
becomes
70 $radio = "<input type=\"radio\"
name=\"$name\" value=\"$value\" class=\"rb\" ";
71
and
formCheckBox():
263 $checkbox = "<input type=\"checkbox\"
name=\"$name\" value=\"$value\" ";
becomes
263 $checkbox = "<input type=\"checkbox\"
name=\"$name\" value=\"$value\" class=\"cb\" ";
...to use that in your theme, add something like this
in the <head> section of your theme.tpl:
<style>
.rb, .cb {
background-color: transparent;
}
</style>
Logged In: YES
user_id=1126375
I have added your suggestion to EZelement, and checkboxes
and radio buttons will now have a class by default. I have
decided to change the class names, and use "checkbox" for
checkboxes and "radio" for radio buttons.
Some modules do not use EZforms and I will add the classes
manually.
Your request has been added to CVS. Look for it in the next
release of phpWebSite (0.10.3).
- Michael (TechElephant)