dev/financial#12 move soft credit item count to object property
authorBrian Shaughnessy <brian@lcdservices.biz>
Sat, 21 Apr 2018 03:50:52 +0000 (23:50 -0400)
committerBrian Shaughnessy <brian@lcdservices.biz>
Sat, 21 Apr 2018 03:50:52 +0000 (23:50 -0400)
CRM/Contribute/Form/Contribution.php
CRM/Contribute/Form/SoftCredit.php

index 6b99be29fef7549956ce24690e849cf1f568b7df..b04867d69140548bd5b8437edc947bf7990d440b 100644 (file)
@@ -203,6 +203,14 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP
    */
   protected $statusMessageTitle;
 
+  /**
+   * @var int
+   *
+   * Max row count for soft credits. The value here is +1 the actual number of
+   * rows displayed.
+   */
+  public $_softCreditItemCount = 11;
+
   /**
    * Explicitly declare the form context.
    */
index c1bbd1b5e473904b72b2397ca1480cc977f07f7c..4b398d88874d991511f5a9a69e704e2082d7f2c0 100644 (file)
@@ -68,7 +68,7 @@ class CRM_Contribute_Form_SoftCredit {
     }
 
     // by default generate 10 blocks
-    $item_count = 11;
+    $item_count = $form->_softCreditItemCount;
 
     $showSoftCreditRow = 2;
     if ($form->getAction() & CRM_Core_Action::UPDATE) {