From: kurund Date: Tue, 9 Dec 2014 09:23:16 +0000 (+0530) Subject: Merge remote-tracking branch 'upstream/4.5' into 4.5-master-2014-12-09-14-48-51 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=ab2e3179d57fbd8b60c0730ec38b6cb678100a28;p=civicrm-core.git Merge remote-tracking branch 'upstream/4.5' into 4.5-master-2014-12-09-14-48-51 Conflicts: CRM/Core/BAO/ActionSchedule.php templates/CRM/Core/BillingBlock.tpl --- ab2e3179d57fbd8b60c0730ec38b6cb678100a28 diff --cc CRM/Core/BAO/ActionSchedule.php index 94b8e0ea66,ba2e5c3a63..a69aa57b77 mode 100644,100755..100644 --- a/CRM/Core/BAO/ActionSchedule.php +++ b/CRM/Core/BAO/ActionSchedule.php @@@ -896,15 -886,7 +895,15 @@@ WHERE reminder.action_schedule_id = %1 'activity_type_id' => $activityTypeID, 'source_record_id' => $dao->entityID, ); - CRM_Activity_BAO_Activity::create($activityParams); + $activity = CRM_Activity_BAO_Activity::create($activityParams); ++ + //file reminder on case if source activity is a case activity + if (!empty($dao->case_id)) { + $caseActivityParams = array(); + $caseActivityParams['case_id'] = $dao->case_id; + $caseActivityParams['activity_id'] = $activity->id; + CRM_Case_BAO_Case::processCaseActivity($caseActivityParams); + } - } } diff --cc templates/CRM/Core/BillingBlock.tpl index f172e866ba,936410cde2..7dd10711d5 --- a/templates/CRM/Core/BillingBlock.tpl +++ b/templates/CRM/Core/BillingBlock.tpl @@@ -24,184 -24,277 +24,184 @@@ +--------------------------------------------------------------------+ *} {crmRegion name="billing-block"} -{* Add 'required' marker to billing fields in this template for front-end / online contribution and event registration forms only. *} -{if $context EQ 'front-end'} - {assign var=reqMark value=' *'} -{else} - {assign var=reqMark value=''} -{/if} - -{if $form.credit_card_number or $form.bank_account_number} -
-
- - {if $paymentProcessor.payment_type & 2} - {ts}Direct Debit Information{/ts} - {else} - {ts}Credit Card Information{/ts} - {/if} - - {if $paymentProcessor.billing_mode & 2 and !$hidePayPalExpress } -
-
- {ts}If you have a PayPal account, you can click the PayPal button to continue. Otherwise, fill in the credit card and billing information on this form and click Continue at the bottom of the page.{/ts} -
+
+ {if $paymentFields|@count} +
+ + {$paymentTypeLabel} + + {if $form.$expressButtonName} + {include file= "CRM/Core/paypalexpress.tpl"} + {/if} +
+ {foreach from=$paymentFields item=paymentField} +
+
{$form.$paymentField.label}
+
{$form.$paymentField.html} + {if $paymentField == 'cvv2'}{* @todo move to form assignment*} + + {/if} + {if $paymentField == 'credit_card_type'} +
+ {/if}
-
-
- {$form.$expressButtonName.html} -
Save time. Checkout securely. Pay without sharing your financial information.
-
-
- {/if} - - {if $paymentProcessor.billing_mode & 1} -
- {if $paymentProcessor.payment_type & 2} -
-
{$form.account_holder.label}
-
{$form.account_holder.html}
-
-
- -
-
{$form.bank_identification_number.label}
-
{$form.bank_identification_number.html}
-
-
-
-
{$form.bank_name.label}
-
{$form.bank_name.html}
-
-
- {else} -
-
{$form.credit_card_type.label} {$reqMark}
-
- {$form.credit_card_type.html} -
-
-
-
-
-
{$form.credit_card_number.label} {$reqMark}
-
{$form.credit_card_number.html|crmAddClass:creditcard}
-
-
-
-
{$form.cvv2.label} {$reqMark}
-
- {$form.cvv2.html} - -
-
-
-
-
{$form.credit_card_exp_date.label} {$reqMark}
-
{$form.credit_card_exp_date.html}
-
-
- {/if} -
-
- - {if $profileAddressFields} - - {/if} -
- {ts}Billing Name and Address{/ts} -
-
-
{$form.billing_first_name.label} {$reqMark}
-
{$form.billing_first_name.html}
-
-
-
-
{$form.billing_middle_name.label}
-
{$form.billing_middle_name.html}
-
-
-
-
{$form.billing_last_name.label} {$reqMark}
-
{$form.billing_last_name.html}
-
-
- {assign var=n value=billing_street_address-$bltID} -
-
{$form.$n.label} {$reqMark}
-
{$form.$n.html}
-
-
- {assign var=n value=billing_city-$bltID} -
-
{$form.$n.label} {$reqMark}
-
{$form.$n.html}
-
-
- {assign var=n value=billing_country_id-$bltID} -
-
{$form.$n.label} {$reqMark}
-
{$form.$n.html|crmAddClass:big}
-
-
- {assign var=n value=billing_state_province_id-$bltID} -
-
{$form.$n.label} {$reqMark}
-
{$form.$n.html|crmAddClass:big}
-
-
- {assign var=n value=billing_postal_code-$bltID} -
-
{$form.$n.label} {$reqMark}
-
{$form.$n.html}
-
-
-
-
+
+
+ {/foreach} +
+
+ {/if} + {if $billingDetailsFields|@count} + {if $profileAddressFields} + + + {/if} +
+ {ts}Billing Name and Address{/ts} +
+ {foreach from=$billingDetailsFields item=billingField} +
+
{$form.$billingField.label}
+ {if $form.$billingField.type == 'text'} +
{$form.$billingField.html}
{else} -
+
{$form.$billingField.html|crmAddClass:big}
{/if} -
- - {if $profileAddressFields} - -{/if} + + // toggle show/hide + $('#billingcheckbox').click(function () { + if (this.checked) { - if (CRM.billing.billingProfileIsHideable) { ++ if (!CRM.billing || CRM.billing.billingProfileIsHideable) { + $('.billing_name_address-group').hide(200); + } + + // copy all values + for (var id in input_ids) { + orig_id = input_ids[id]; + $(orig_id).val($(id).val()); + } + for (var id in select_ids) { + orig_id = select_ids[id]; + $(orig_id + ' option').prop('selected', false); + $(orig_id + ' option[value="' + $(id).val() + '"]').prop('selected', true); + } + } else { + $('.billing_name_address-group').show(200); + } + }); + + // remove spaces, dashes from credit card number + $('#credit_card_number').change(function () { + var cc = $('#credit_card_number').val() + .replace(/ /g, '') + .replace(/-/g, ''); + $('#credit_card_number').val(cc); + }); + }); + {/literal} + {/if} + {/crmRegion}