From 9148c27748f9263baf0d6c3b56208ac33f55d3c4 Mon Sep 17 00:00:00 2001 From: Parag Bhilkar Date: Wed, 6 Aug 2014 21:04:33 +0530 Subject: [PATCH] VAT-638 Code indented properly. --- CRM/Admin/Form/Preferences/Contribute.php | 10 ++++------ CRM/Admin/Form/Preferences/Display.php | 4 ++-- CRM/Contribute/Task.php | 2 +- .../CRM/Admin/Form/Preferences/Display.hlp | 20 +++++++++---------- .../CRM/Admin/Form/Preferences/Display.tpl | 4 ++-- 5 files changed, 19 insertions(+), 21 deletions(-) diff --git a/CRM/Admin/Form/Preferences/Contribute.php b/CRM/Admin/Form/Preferences/Contribute.php index 3b829fd4f3..8a39faa7a2 100644 --- a/CRM/Admin/Form/Preferences/Contribute.php +++ b/CRM/Admin/Form/Preferences/Contribute.php @@ -113,21 +113,19 @@ class CRM_Admin_Form_Preferences_Contribute extends CRM_Admin_Form_Preferences { // to set default value for 'Invoices / Credit Notes' checkbox on display preferences $values = CRM_Core_BAO_Setting::getItem("CiviCRM Preferences"); - $optionValues = CRM_Core_BAO_OptionValue::getOptionValuesAssocArrayFromName("user_dashboard_options"); + $optionValues = CRM_Core_OptionGroup::values('user_dashboard_options', FALSE, FALSE, FALSE, NULL, 'name'); $setKey = array_search('Invoices / Credit Notes', $optionValues); if (isset($params['invoicing'])) { $value = array($setKey => $optionValues[$setKey]); - $setInvoice = CRM_Core_DAO::VALUE_SEPARATOR . implode(CRM_Core_DAO::VALUE_SEPARATOR, - array_keys($value)) . CRM_Core_DAO::VALUE_SEPARATOR; - CRM_Core_BAO_Setting::setItem($values['user_dashboard_options'].$setInvoice, 'CiviCRM Preferences', 'user_dashboard_options'); + $setInvoice = CRM_Core_DAO::VALUE_SEPARATOR . implode(CRM_Core_DAO::VALUE_SEPARATOR, array_keys($value)) . CRM_Core_DAO::VALUE_SEPARATOR; + CRM_Core_BAO_Setting::setItem($values['user_dashboard_options'] . $setInvoice, 'CiviCRM Preferences', 'user_dashboard_options'); } else { $setting = explode(CRM_Core_DAO::VALUE_SEPARATOR, substr($values['user_dashboard_options'], 1, -1)); $invoiceKey = array_search ($setKey, $setting); unset($setting[$invoiceKey]); - $settingName = CRM_Core_DAO::VALUE_SEPARATOR . implode(CRM_Core_DAO::VALUE_SEPARATOR, - array_values($setting)) . CRM_Core_DAO::VALUE_SEPARATOR; + $settingName = CRM_Core_DAO::VALUE_SEPARATOR . implode(CRM_Core_DAO::VALUE_SEPARATOR, array_values($setting)) . CRM_Core_DAO::VALUE_SEPARATOR; CRM_Core_BAO_Setting::setItem($settingName, 'CiviCRM Preferences', 'user_dashboard_options'); } } diff --git a/CRM/Admin/Form/Preferences/Display.php b/CRM/Admin/Form/Preferences/Display.php index 871e91b6ca..01e60a8240 100644 --- a/CRM/Admin/Form/Preferences/Display.php +++ b/CRM/Admin/Form/Preferences/Display.php @@ -149,7 +149,7 @@ class CRM_Admin_Form_Preferences_Display extends CRM_Admin_Form_Preferences { $wysiwyg_options = array('' => ts('Textarea')) + CRM_Core_OptionGroup::values('wysiwyg_editor'); //changes for freezing the invoices/credit notes checkbox if invoicing is uncheck - $invoiceSettings = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME,'contribution_invoice_settings'); + $invoiceSettings = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, 'contribution_invoice_settings'); $invoicing = CRM_Utils_Array::value('invoicing', $invoiceSettings); $this->assign('invoicing', $invoicing); $config = CRM_Core_Config::singleton(); @@ -197,7 +197,7 @@ class CRM_Admin_Form_Preferences_Display extends CRM_Admin_Form_Preferences { $this->addElement('hidden', 'contact_edit_preferences', NULL, array('id' => 'contact_edit_preferences')); - $optionValues = CRM_Core_BAO_OptionValue::getOptionValuesAssocArrayFromName("user_dashboard_options"); + $optionValues = CRM_Core_OptionGroup::values('user_dashboard_options', FALSE, FALSE, FALSE, NULL, 'name'); $invoicesKey = array_search('Invoices / Credit Notes', $optionValues); $this->assign('invoicesKey', $invoicesKey); parent::buildQuickForm(); diff --git a/CRM/Contribute/Task.php b/CRM/Contribute/Task.php index b0e45c5316..19495b0763 100644 --- a/CRM/Contribute/Task.php +++ b/CRM/Contribute/Task.php @@ -127,7 +127,7 @@ class CRM_Contribute_Task { } // remove action "Print or Email Contribution Invoices" - $invoiceSettings = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME,'contribution_invoice_settings'); + $invoiceSettings = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, 'contribution_invoice_settings'); $invoicing = CRM_Utils_Array::value('invoicing', $invoiceSettings); if (!$invoicing) { unset(self::$_tasks[9]); diff --git a/templates/CRM/Admin/Form/Preferences/Display.hlp b/templates/CRM/Admin/Form/Preferences/Display.hlp index 49da061251..feb228e63f 100644 --- a/templates/CRM/Admin/Form/Preferences/Display.hlp +++ b/templates/CRM/Admin/Form/Preferences/Display.hlp @@ -1,6 +1,6 @@ {* +--------------------------------------------------------------------+ - | CiviCRM version 4.4 | + | CiviCRM version 4.5 | +--------------------------------------------------------------------+ | Copyright CiviCRM LLC (c) 2004-2013 | +--------------------------------------------------------------------+ @@ -27,19 +27,19 @@ {ts}WYSIWYG Editor{/ts} {/htxt} {htxt id="id-editor_id"} -

{ts}Select the HTML WYSIWYG Editor provided for fields that allow HTML formatting. Select 'Textarea' if you don't want to provide a WYSIWYG Editor (users will type text and / or HTML code into plain text fields).{/ts}

-

{ts}Spell-checking: ckEditor includes a Spell-check button by default. There is also an optional plugin which does spell-checking automatically (as you type). However, this plugin is not enabled by default since it sends user input to a 3rd party service (spellchecker.net) without informing the user - and this may pose privacy issues for some sites.{/ts} -

{ts}To enable auto spell check, in packages/ckeditor/config.js - change this value to true:{/ts}
-config.scayt_autoStartup = false; -

{ts}To remove the Spell Check button, in packages/ckeditor/config.js - remove this item in the config.toolbar_Full list:{/ts}
-'SpellChecker' -

{ts}NOTE: If you are modifying config.js you should first have configured a Custom PHP Path under Administer > System Settings > Directories, and place your modified version in the custom path.{/ts}

+

{ts}Select the HTML WYSIWYG Editor provided for fields that allow HTML formatting. Select 'Textarea' if you don't want to provide a WYSIWYG Editor (users will type text and / or HTML code into plain text fields).{/ts}

+

{ts}Spell-checking: ckEditor includes a Spell-check button by default. There is also an optional plugin which does spell-checking automatically (as you type). However, this plugin is not enabled by default since it sends user input to a 3rd party service (spellchecker.net) without informing the user - and this may pose privacy issues for some sites.{/ts} +

{ts}To enable auto spell check, in packages/ckeditor/config.js - change this value to true:{/ts}
+ config.scayt_autoStartup = false; +

{ts}To remove the Spell Check button, in packages/ckeditor/config.js - remove this item in the config.toolbar_Full list:{/ts}
+ 'SpellChecker' +

{ts}NOTE: If you are modifying config.js you should first have configured a Custom PHP Path under Administer > System Settings > Directories, and place your modified version in the custom path.{/ts}

{/htxt} {htxt id="id-invoices_id-title"} {ts}Invoices / Credit Notes{/ts} {/htxt} {htxt id="id-invoices_id"} -{capture assign=invoiceURL}{crmURL p='civicrm/admin/setting/preferences/contribute' q="reset=1"}{/capture} -{ts 1=$invoiceURL}In order to enable logged in users to download invoices and credit notes from the dashboard. Please first enable CiviCRM invoicing functionality Administer > CiviContribute > CiviContribute Component Settings{/ts} + {capture assign=invoiceURL}{crmURL p='civicrm/admin/setting/preferences/contribute' q="reset=1"}{/capture} + {ts 1=$invoiceURL}In order to enable logged in users to download invoices and credit notes from the dashboard. Please first enable CiviCRM invoicing functionality Administer > CiviContribute > CiviContribute Component Settings{/ts} {/htxt} diff --git a/templates/CRM/Admin/Form/Preferences/Display.tpl b/templates/CRM/Admin/Form/Preferences/Display.tpl index a73dd34579..ea85646667 100644 --- a/templates/CRM/Admin/Form/Preferences/Display.tpl +++ b/templates/CRM/Admin/Form/Preferences/Display.tpl @@ -262,9 +262,9 @@ var invoicesKey = '{/literal}{$invoicesKey}{literal}'; var invoicing = '{/literal}{$invoicing}{literal}'; if (!invoicing) { - cj('#user_dashboard_options_'+invoicesKey).attr("disabled", true); + cj('#user_dashboard_options_' + invoicesKey).attr("disabled", true); } - cj("#invoice_help").insertAfter("label[for='user_dashboard_options_"+invoicesKey+"']"); + cj("#invoice_help").insertAfter("label[for='user_dashboard_options_" + invoicesKey + "']"); }); {/literal} -- 2.25.1