Skip to content
Snippets Groups Projects
Commit c5b53a6f authored by colemanw's avatar colemanw
Browse files

Make form element css more consistent

parent 969c7859
No related branches found
No related tags found
No related merge requests found
......@@ -160,19 +160,19 @@ class CRM_Core_Form_Renderer extends HTML_QuickForm_Renderer_ArraySmarty {
$class = $element->getAttribute('class');
$type = $element->getType();
if (empty($class)) {
$class = 'form-' . $type;
if (!$class) {
if ($type == 'text') {
$size = $element->getAttribute('size');
if (!empty($size)) {
if (array_key_exists($size, self::$_sizeMapper)) {
$class = $class . ' ' . self::$_sizeMapper[$size];
$class .= ' ' . self::$_sizeMapper[$size];
}
}
}
}
$class .= ($class ? ' ' : '') . 'crm-form-' . $type;
if ($required) {
$class .= ' required';
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment