Merge branch 'Jagadees-zyxware-master'
[com.zyxware.civiwci.git] / CRM / Wci / Form / ProgressBar.php
index 6b58eb5484711e5f24775b68d4a0229c2190479d..ed380464b0bc9c58b2152abb8f27a70ac0e6507e 100644 (file)
@@ -100,19 +100,19 @@ class CRM_Wci_Form_ProgressBar extends CRM_Core_Form {
       'progressbar_name', // field name
       'Name', // field label
       true // is required
-    );
+    )->setSize(35);
     $this->add(
       'text', // field type
       'starting_amount', // field name
       'Starting amount', // field label
       true // is required
-    );
+    )->setSize(35);
     $this->add(
       'text', // field type
       'goal_amount', // field name
       'Goal amount', // field label
       true // is required
-    );
+    )->setSize(35);
     
     $this->fillData();
     
@@ -157,12 +157,11 @@ class CRM_Wci_Form_ProgressBar extends CRM_Core_Form {
         }
         
         $transaction->commit();
-
+        CRM_Core_Session::setStatus(ts('Progress bar created successfuly'), '', 'success');
         CRM_Utils_System::redirect('progress-bar?reset=1');
       }
       catch (Exception $e) {
-        //TODO
-        print_r($e->getMessage());
+        CRM_Core_Session::setStatus(ts('Failed to create progress bar'), '', 'error');
         $transaction->rollback();
       }