CRM-16415 - updated crmButton so that there is no empty space if there are no additio...
authorStephanie Gray <stephanie@freeform.ca>
Wed, 30 Sep 2015 16:23:40 +0000 (12:23 -0400)
committerColeman Watts <coleman@civicrm.org>
Tue, 13 Oct 2015 18:50:12 +0000 (14:50 -0400)
CRM/Core/Smarty/plugins/block.crmButton.php

index fa98b5e41f118a75b060e6339d103cb8df29eddf..4833e7934a04a320130868d1cb354308ea03e7cd 100644 (file)
@@ -52,7 +52,7 @@ function smarty_block_crmButton($params, $text, &$smarty) {
     $params['href'] = CRM_Utils_System::crmURL($params + array('h' => FALSE));
   }
   // Always add class 'button' - fixme probably should be crm-button
-  $params['class'] = 'button ' . CRM_Utils_Array::value('class', $params, '');
+  $params['class'] = empty($params['class']) ? 'button' : 'button ' . $params['class'];
   // Any jQuery-UI icon works
   $icon = CRM_Utils_Array::value('icon', $params, 'pencil');
   // All other params are treated as html attributes