CRM-12965, fixed defaults
authorKurund Jalmi <kurund@civicrm.org>
Tue, 9 Jul 2013 18:09:13 +0000 (23:39 +0530)
committerKurund Jalmi <kurund@civicrm.org>
Tue, 9 Jul 2013 18:09:13 +0000 (23:39 +0530)
CRM/Badge/Form/Layout.php

index aa5005b2f2baef812c22f1774b8044ae6927d68d..861e1940579329e5211b25e504bb863f79265f21 100644 (file)
@@ -125,6 +125,11 @@ class CRM_Badge_Form_Layout extends CRM_Admin_Form {
       $defaults = array_merge($this->_values,
         CRM_Badge_BAO_Layout::getDecodedData($this->_values['data']));
     }
+    else {
+      for ($i = 1; $i <= 4; $i++) {
+        $defaults['text_alignment'][$i] = "C";
+      }
+    }
 
     if ($this->_action == CRM_Core_Action::DELETE && isset($defaults['title'])) {
       $this->assign('delName', $defaults['title']);