worked on CRM-12463, fixed add more
authorKurund Jalmi <kurund@civicrm.org>
Wed, 1 May 2013 00:26:41 +0000 (17:26 -0700)
committerKurund Jalmi <kurund@civicrm.org>
Wed, 1 May 2013 00:26:41 +0000 (17:26 -0700)
CRM/Contribute/Form/SoftCredit.php
templates/CRM/Contribute/Form/Contribution.tpl
templates/CRM/Contribute/Form/SoftCredit.js
templates/CRM/Contribute/Form/SoftCredit.tpl

index 14ac883c4f7629b72f1e53fdd2adb956774802ba..c4a82a64c90f3a34d554588920e975f9d3e4f8e6 100644 (file)
@@ -52,8 +52,7 @@ class CRM_Contribute_Form_SoftCredit {
     $form->_softCredit['item_count'] = 6;
     for ($rowNumber = 1; $rowNumber <= $form->_softCredit['item_count']; $rowNumber++) {
       CRM_Contact_Form_NewContact::buildQuickForm($form, $rowNumber, NULL, FALSE, $prefix);
-      $form->addMoney("{$prefix}amount[{$rowNumber}]", ts('Amount'), FALSE, NULL, TRUE,
-        "{$prefix}currency[{$rowNumber}]", NULL, TRUE);
+      $form->addMoney("{$prefix}amount[{$rowNumber}]", ts('Amount'));
     }
 
     $form->assign('rowCount', $form->_softCredit['item_count']);
index ca2cef2eafe74fbcffcd7c9425267cb243964d1d..aa8e405a29ac9902f8fd500bdb4581cf6ef34f6c 100644 (file)
     {if $customDataSubType}
       CRM.buildCustomData( '{$customDataType}', {$customDataSubType} );
     {/if}
+
+         {if $buildPriceSet}{literal}buildAmount( );{/literal}{/if}
     {literal}
     });
 
index d5b7319388888dbd451251aa924c0de5e79425b6..548c4bcb956519f591a6ed463ebea4cbc17dd220 100644 (file)
@@ -19,54 +19,12 @@ cj(function($) {
     }
     return false;
   });
-});
-/*
- var url = "{/literal}{$dataUrl}{literal}";
 
-  cj('#soft_credit_to').autocomplete( url, { width : 180, selectFirst : false, matchContains: true
-  }).result( function(event, data, formatted) {
-      cj( "#soft_contact_id" ).val( data[1] );
-  });
- {/literal}
-
-// load form during form rule.
-{if $buildPriceSet}{literal}buildAmount( );{/literal}{/if}
-
-{if $siteHasPCPs}
-  {literal}
-  var pcpUrl = "{/literal}{$pcpDataUrl}{literal}";
-
-  cj('#pcp_made_through').autocomplete( pcpUrl, { width : 360, selectFirst : false, matchContains: true
+  var pcpURL = CRM.url('civicrm/ajax/rest',
+    'className=CRM_Contact_Page_AJAX&fnName=getPCPList&json=1&context=contact&reset=1');
+  $('#pcp_made_through').autocomplete(pcpURL,
+    { width : 360, selectFirst : false, matchContains: true
   }).result( function(event, data, formatted) {
       cj( "#pcp_made_through_id" ).val( data[1] );
-  });
-{/literal}
-
-  {if $pcpLinked}
-    {literal}hideSoftCredit( );{/literal}{* hide soft credit on load if we have PCP linkage *}
-  {else}
-    {literal}cj('#pcpID').hide();{/literal}{* hide PCP section *}
-  {/if}
-
-  {literal}
-  function hideSoftCredit ( ){
-    cj("#softCreditID").hide();
-  }
-  function showPCP( ) {
-    cj('#pcpID').show();
-    cj("#softCreditID").hide();
-  }
-  function showSoftCredit( ) {
-    cj('#pcp_made_through_id').val('');
-    cj('#pcp_made_through').val('');
-    cj('#pcp_roll_nickname').val('');
-    cj('#pcp_personal_note').val('');
-    cj('#pcp_display_in_roll').attr('checked', false);
-    cj("#pcpID").hide();
-    cj('#softCreditID').show();
-  }
-  {/literal}
-{/if}
-</script>
-
-*/
+    });
+});
index 13d0814b0bb0fac418f9938b3f491fc601d5ab45..53ac6fadc47a3ae766c544d39263b3f812c4ffd7 100644 (file)
@@ -35,7 +35,7 @@
       prefix="soft_credit_"}
     </td>
          <td>
-                 {$form.soft_credit_currency.$blockNo.html|crmAddClass:eight}&nbsp;{$form.soft_credit_amount.$blockNo.html|crmAddClass:eight}
+                 {$form.soft_credit_amount.$rowNumber.label}&nbsp;{$form.soft_credit_amount.$rowNumber.html|crmAddClass:eight}
          </td>
   </tr>
 {/section}