From: Jagadedes Date: Fri, 31 Oct 2014 09:28:53 +0000 (+0530) Subject: #30845, #30847 bug fixes. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=540f65309121129572ceb6078cd0b5a9b25382ec;p=com.zyxware.civiwci.git #30845, #30847 bug fixes. --- diff --git a/CRM/Wci/Form/CreateWidget.php b/CRM/Wci/Form/CreateWidget.php index f28ccb6..9c5acb9 100644 --- a/CRM/Wci/Form/CreateWidget.php +++ b/CRM/Wci/Form/CreateWidget.php @@ -30,7 +30,7 @@ class CRM_Wci_Form_CreateWidget extends CRM_Core_Form { FALSE, '#2786C2', ), - 'color_title_bg' => array(ts('Widget title background color'), + 'color_title_bg' => array(ts('Title background color'), 'text', FALSE, '#FFFFFF', @@ -40,32 +40,32 @@ class CRM_Wci_Form_CreateWidget extends CRM_Core_Form { FALSE, '#FFFFFF', ), - 'color_widget_bg' => array(ts('Widget background color'), + 'color_widget_bg' => array(ts('Background color'), 'text', FALSE, '#96C0E7', ), - 'color_description' => array(ts('Widget description color'), + 'color_description' => array(ts('Description color'), 'text', FALSE, '#000000', ), - 'color_border' => array(ts('Widget border color'), + 'color_border' => array(ts('Border color'), 'text', FALSE, '#96C0E7', ), - 'color_button' => array(ts('Widget button text color'), + 'color_button' => array(ts('Button text color'), 'text', FALSE, '#000000', ), - 'color_button_bg' => array(ts('Widget button background color'), + 'color_button_bg' => array(ts('Button background color'), 'text', FALSE, '#96C0E7', ), - 'color_button_bg' => array(ts('Widget button background color'), + 'color_button_bg' => array(ts('Button background color'), 'text', FALSE, '#96C0E7', @@ -189,8 +189,10 @@ where w.id=" . $this->_id;*/ $elem->setValue($output); } } + CRM_Utils_System::setTitle(ts('Edit Widget')); } else { + CRM_Utils_System::setTitle(ts('Create Widget')); /** Keep template in civicrm-wci/templates folder*/ $output = file_get_contents('templates/CRM/Wci/Page/wciwidget.tpl',FILE_USE_INCLUDE_PATH); $elem = $this->getElement('custom_template'); diff --git a/CRM/Wci/Form/ProgressBar.php b/CRM/Wci/Form/ProgressBar.php index 09217e0..6b58eb5 100644 --- a/CRM/Wci/Form/ProgressBar.php +++ b/CRM/Wci/Form/ProgressBar.php @@ -19,7 +19,7 @@ class CRM_Wci_Form_ProgressBar extends CRM_Core_Form { } function fillData() { $count = 1; - if (isset($this->_id)) { + if (isset($this->_id)) { /** Updating existing progress bar*/ $query = "SELECT * FROM civicrm_wci_progress_bar where id=" . $this->_id; $params = array(); @@ -69,6 +69,7 @@ class CRM_Wci_Form_ProgressBar extends CRM_Core_Form { $count++; } + CRM_Utils_System::setTitle(ts('Edit Progress Bar')); $count--; // because last iteration increments it to the next } else { @@ -86,6 +87,7 @@ class CRM_Wci_Form_ProgressBar extends CRM_Core_Form { 'Percentage', // field label true // is required ); + CRM_Utils_System::setTitle(ts('Create Progress Bar')); } $this->addElement('hidden', 'contrib_count', $count); @@ -126,7 +128,7 @@ class CRM_Wci_Form_ProgressBar extends CRM_Core_Form { // export form elements $this->assign('elementNames', $this->getRenderableElementNames()); - + parent::buildQuickForm(); } diff --git a/CRM/Wci/Page/ProgressBarList.php b/CRM/Wci/Page/ProgressBarList.php index acc2de1..02f8e1c 100644 --- a/CRM/Wci/Page/ProgressBarList.php +++ b/CRM/Wci/Page/ProgressBarList.php @@ -43,7 +43,7 @@ class CRM_Wci_Page_ProgressBarList extends CRM_Core_Page { } } // Example: Set the page-title dynamically; alternatively, declare a static title in xml/Menu/*.xml - CRM_Utils_System::setTitle(ts('ProgressBarList')); + CRM_Utils_System::setTitle(ts('Progress Bar List')); $query = "SELECT * FROM civicrm_wci_progress_bar"; $params = array(); @@ -78,7 +78,7 @@ class CRM_Wci_Page_ProgressBarList extends CRM_Core_Page { self::$_actionLinks = array( CRM_Core_Action::UPDATE => array( - 'name' => ts('Update'), + 'name' => ts('Edit'), 'url' => CRM_Utils_System::currentPath(), 'qs' => 'action=update&reset=1&id=%%id%%', 'title' => ts('Update'), diff --git a/CRM/Wci/Page/WidgetList.php b/CRM/Wci/Page/WidgetList.php index a6e5811..6f9d5e9 100644 --- a/CRM/Wci/Page/WidgetList.php +++ b/CRM/Wci/Page/WidgetList.php @@ -78,7 +78,7 @@ class CRM_Wci_Page_WidgetList extends CRM_Core_Page { self::$_actionLinks = array( CRM_Core_Action::UPDATE => array( - 'name' => ts('Update'), + 'name' => ts('Edit'), 'url' => CRM_Utils_System::currentPath(), 'qs' => 'action=update&reset=1&id=%%id%%', 'title' => ts('Update'), diff --git a/wci.php b/wci.php index 71a0e25..d24c29f 100644 --- a/wci.php +++ b/wci.php @@ -131,7 +131,7 @@ function wci_civicrm_navigationMenu( &$params ) { 'child' => array ( '1' => array ( 'attributes' => array ( - 'label' => ts('New widget'), + 'label' => ts('New Widget'), 'name' => 'new_widget', 'url' => 'civicrm/wci/widget/add', 'permission' => 'access CiviReport,access CiviContribute', @@ -143,7 +143,7 @@ function wci_civicrm_navigationMenu( &$params ) { '2' => array ( 'attributes' => array ( - 'label' => ts('Manage widget'), + 'label' => ts('Manage Widget'), 'name' => 'manage_widget', 'url' => 'civicrm/wci/widget?reset=1', 'permission' => 'access CiviReport,access CiviContribute', @@ -155,7 +155,7 @@ function wci_civicrm_navigationMenu( &$params ) { '3' => array ( 'attributes' => array ( - 'label' => ts('New Progress bar'), + 'label' => ts('New Progress Bar'), 'name' => 'new_progress_bar', 'url' => 'civicrm/wci/progress-bar/add', 'permission' => 'access CiviReport,access CiviContribute', @@ -167,7 +167,7 @@ function wci_civicrm_navigationMenu( &$params ) { '4' => array ( 'attributes' => array ( - 'label' => ts('Manage Progress bar'), + 'label' => ts('Manage Progress Bar'), 'name' => 'manage_progress_bar', 'url' => 'civicrm/wci/progress-bar?reset=1', 'permission' => 'access CiviReport,access CiviContribute',