From e78a52814eb16b225142b1a75fd9f9b503b0be29 Mon Sep 17 00:00:00 2001 From: Parag Bhilkar Date: Mon, 28 Jul 2014 15:52:45 +0530 Subject: [PATCH] VAT-572 Added CKeditor for notes or standard terms on CiviContribute component setting page. --- CRM/Admin/Form/Preferences/Contribute.php | 26 +++++++---------- templates/CRM/Form/basicForm.tpl | 35 ++++++++++++++++++++++- 2 files changed, 45 insertions(+), 16 deletions(-) diff --git a/CRM/Admin/Form/Preferences/Contribute.php b/CRM/Admin/Form/Preferences/Contribute.php index ae629dda4a..0503e2c662 100644 --- a/CRM/Admin/Form/Preferences/Contribute.php +++ b/CRM/Admin/Form/Preferences/Contribute.php @@ -17,48 +17,42 @@ class CRM_Admin_Form_Preferences_Contribute extends CRM_Admin_Form_Preferences { $this->_varNames = array( CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME => array( - 'invoicing' => array( - 'html_type' => 'checkbox', - 'title' => ts('Sales Taxes and Invoicing'), - 'weight' => 1, - ), 'invoice_prefix' => array( 'html_type' => 'text', 'title' => ts('Invoice Prefix'), - 'weight' => 2, + 'weight' => 1, 'description' => ts('Enter prefix to be display on PDF for invoice'), ), 'credit_notes_prefix' => array( 'html_type' => 'text', 'title' => ts('Credit Notes Prefix'), - 'weight' => 3, + 'weight' => 2, 'description' => ts('Enter prefix to be display on PDF for credit notes.'), ), 'due_date' => array( 'html_type' => 'text', 'title' => ts('Due Date'), - 'weight' => 4, + 'weight' => 3, ), 'due_date_period' => array( 'html_type' => 'select', - 'weight' => 5, + 'weight' => 4, 'description' => ts('Select the interval for due date.'), ), 'notes' => array( - 'html_type' => 'textarea', + 'html_type' => 'CKeditor', 'title' => ts('Notes or Standard Terms'), - 'weight' => 6, - 'description' => ts('Enter note or message to be display on PDF invoice or credit notes '), + 'weight' => 5, + 'description' => ts('Enter note or message to be displayed on PDF invoice or credit notes '), ), - 'tax_term' => array( 'html_type' => 'text', 'title' => ts('Tax Term'), - 'weight' => 7, + 'weight' => 6, ), 'tax_display_settings'=> array( 'html_type' => 'select', - 'weight' => 8, + 'weight' => 7, ), ), ); @@ -88,6 +82,8 @@ class CRM_Admin_Form_Preferences_Contribute extends CRM_Admin_Form_Preferences { 'Exclusive' => ts('Show [tax term] exclusive price - i.e. '.$config->defaultCurrencySymbol.'100.00 + '.$config->defaultCurrencySymbol.'20.00 [tax term]') ) ); + $this->add('checkbox', 'invoicing', ts('Sales Taxes and Invoicing')); + $this->addWysiwyg('notes', ts('Notes or Standard Terms'), array('rows' => 2, 'cols' => 40)); parent::buildQuickForm(); } diff --git a/templates/CRM/Form/basicForm.tpl b/templates/CRM/Form/basicForm.tpl index 5eea79330b..28550a622e 100644 --- a/templates/CRM/Form/basicForm.tpl +++ b/templates/CRM/Form/basicForm.tpl @@ -25,7 +25,16 @@ *}
{include file="CRM/common/formButtons.tpl" location="top"}
- + {if $formName == "Contribute_Preferences" } +
+ + + +
+ {$form.invoicing.html} {$form.invoicing.label} +
+ {/if} + {foreach from=$fields item=field key=fieldName} {assign var=n value=$fieldName} {if $form.$n} @@ -54,3 +63,27 @@
{include file="CRM/common/formButtons.tpl" location="bottom"}
+{if $formName == "Contribute_Preferences"} + {literal} + + {/literal} +{/if} \ No newline at end of file -- 2.25.1