Index: civicrm/trunk/sites/all/themes/civicrm_custom/CRM/Contribute/Form/ContributionView.tpl |
— | — | @@ -0,0 +1,152 @@ |
| 2 | +<div class="form-item"> |
| 3 | +<fieldset><legend>{ts}View Contribution{/ts}</legend> |
| 4 | +<dl> |
| 5 | + <dt class="font-size12pt">{ts}From{/ts}</dt> |
| 6 | + <dd class="font-size12pt"><strong>{$displayName}</strong> </dd> |
| 7 | + |
| 8 | + <dt>{ts}Contribution Type{/ts}</dt> |
| 9 | + <dd>{$contribution_type} {if $is_test} {ts}(test){/ts} {/if}</dd> |
| 10 | + |
| 11 | + <dt>{ts}Total Amount{/ts}</dt> |
| 12 | + <dd class="bold">{$total_amount|crmMoney} |
| 13 | +{if $contribution_recur_id} |
| 14 | + <strong>{ts}Recurring Contribution{/ts}</strong> <br/> |
| 15 | + {ts}Installments{/ts}: {$recur_installments}, {ts}Interval{/ts}: {$recur_frequency_interval} {$recur_frequency_unit}(s) |
| 16 | +{/if} |
| 17 | +</dd> |
| 18 | + |
| 19 | + {if $non_deductible_amount} |
| 20 | + <dt>{ts}Non-deductible Amount{/ts}</dt> |
| 21 | + <dd>{$non_deductible_amount|crmMoney} </dd> |
| 22 | + {/if} |
| 23 | + |
| 24 | + {if $fee_amount} |
| 25 | + <dt>{ts}Fee Amount{/ts}</dt> |
| 26 | + <dd>{$fee_amount|crmMoney} </dd> |
| 27 | + {/if} |
| 28 | + |
| 29 | + {if $net_amount} |
| 30 | + <dt>{ts}Net Amount{/ts}</dt> |
| 31 | + <dd>{$net_amount|crmMoney} </dd> |
| 32 | + {/if} |
| 33 | + |
| 34 | + <dt>{ts}Received{/ts}</dt> |
| 35 | + <dd>{if $receive_date}{$receive_date|truncate:10:''|crmDate}{else}({ts}pending{/ts}){/if} </dd> |
| 36 | + |
| 37 | + <dt>{ts}Contribution Status{/ts}</dt> |
| 38 | + <dd {if $contribution_status_id eq 3} class="font-red bold"{/if}>{$contribution_status} |
| 39 | + {if $contribution_status_id eq 2} {if $is_pay_later}: {ts}Pay Later{/ts} {else} : {ts}Incomplete Transaction{/ts} {/if}{/if}</dd> |
| 40 | + |
| 41 | + {if $cancel_date} |
| 42 | + <dt>{ts}Cancelled Date{/ts}</dt> |
| 43 | + <dd>{$cancel_date|truncate:10:''|crmDate}</dd> |
| 44 | + |
| 45 | + {if $cancel_reason} |
| 46 | + <dt>{ts}Cancellation Reason{/ts}</dt> |
| 47 | + <dd>{$cancel_reason}</dd> |
| 48 | + {/if} |
| 49 | + {/if} |
| 50 | + |
| 51 | + <dt>{ts}Paid By{/ts}</dt> |
| 52 | + <dd>{$payment_instrument} </dd> |
| 53 | + |
| 54 | + {if $payment_instrument eq 'Check'} |
| 55 | + <dt>{ts}Check Number{/ts}</dt> |
| 56 | + <dd>{$check_number} </dd> |
| 57 | + {/if} |
| 58 | + |
| 59 | + <dt>{ts}Source{/ts}</dt> |
| 60 | + <dd>{$source} </dd> |
| 61 | + |
| 62 | + {if $receipt_date} |
| 63 | + <dt>{ts}Receipt Sent{/ts}</dt> |
| 64 | + <dd>{$receipt_date|truncate:10:''|crmDate}</dd> |
| 65 | + {/if} |
| 66 | + |
| 67 | + {foreach from=$note item="rec"} |
| 68 | + {if $rec } |
| 69 | + <dt>{ts}Note:{/ts}</dt> <dd>{$rec}</dd> |
| 70 | + {/if} |
| 71 | + {/foreach} |
| 72 | + |
| 73 | + {if $trxn_id} |
| 74 | + <dt>{ts}Transaction ID{/ts}</dt> |
| 75 | + <dd>{$trxn_id} </dd> |
| 76 | + {/if} |
| 77 | + |
| 78 | + {if $invoice_id} |
| 79 | + <dt>{ts}Invoice ID{/ts}</dt> |
| 80 | + <dd>{$invoice_id} </dd> |
| 81 | + {/if} |
| 82 | + |
| 83 | + {if $honor_display} |
| 84 | + <dt>{ts}{$honor_type}{/ts}</dt> |
| 85 | + <dd>{$honor_display} </dd> |
| 86 | + {/if} |
| 87 | + |
| 88 | + {if $thankyou_date} |
| 89 | + <dt>{ts}Thank-you Sent{/ts}</dt> |
| 90 | + <dd>{$thankyou_date|truncate:10:''|crmDate}</dd> |
| 91 | + {/if} |
| 92 | + |
| 93 | +</dl> |
| 94 | + |
| 95 | +{if $premium} |
| 96 | +<fieldset><legend>{ts}Premium Information{/ts}</legend> |
| 97 | +<dl> |
| 98 | + <dt>{ts}Premium{/ts}</dt><dd>{$premium} </dd> |
| 99 | + <dt>{ts}Option{/ts}</dt><dd>{$option} </dd> |
| 100 | + <dt>{ts}Fulfilled{/ts}</dt><dd>{$fulfilled|truncate:10:''|crmDate} </dd> |
| 101 | +</dl> |
| 102 | +</fieldset> |
| 103 | +{/if} |
| 104 | + |
| 105 | +{if $softCreditToName} |
| 106 | +<dl> |
| 107 | + <dt>{ts}Soft Credit To{/ts}</dt> |
| 108 | + <dd><a href="{crmURL p="civicrm/contact/view" q="reset=1&cid=`$soft_credit_to`"}" id="view_contact" title="{ts}View contact record{/ts}">{$softCreditToName}</a> </dd> |
| 109 | +</dl> |
| 110 | +{/if} |
| 111 | + |
| 112 | +{if $pcp_id} |
| 113 | +<fieldset><legend>{ts}Personal Campaign Page{/ts}</legend> |
| 114 | +<dl> |
| 115 | + <dt>{ts}Campaign Page{/ts}</dt> |
| 116 | + <dd><a href="{crmURL p="civicrm/contribute/pcp/info" q="reset=1&id=`$pcp_id`"}">{$pcp}</a><br /> |
| 117 | + <span class="description">{ts}Contribution was made through this personal campaign page.{/ts}</span> |
| 118 | + </dd> |
| 119 | + <dt>{ts}In Public Honor Roll?{/ts}</dt><dd>{if $pcp_display_in_roll}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}</dd> |
| 120 | + {if $pcp_roll_nickname} |
| 121 | + <dt>{ts}Honor Roll Name{/ts}</dt><dd>{$pcp_roll_nickname}</dd> |
| 122 | + {/if} |
| 123 | +</dl> |
| 124 | +</fieldset> |
| 125 | +{/if} |
| 126 | + |
| 127 | +{include file="CRM/Custom/Page/CustomDataView.tpl"} |
| 128 | + |
| 129 | +{if $billing_address} |
| 130 | +<fieldset><legend>{ts}Billing Address{/ts}</legend> |
| 131 | + <div class="form-item"> |
| 132 | + {$billing_address|nl2br} |
| 133 | + </div> |
| 134 | +</fieldset> |
| 135 | +{/if} |
| 136 | + |
| 137 | +<fieldset><legend>{ts}Contribution Comments{/ts}</legend> |
| 138 | +<dl> |
| 139 | +<dt>{$form.donor_comment.label}</dt> |
| 140 | +<dd>{$form.donor_comment.html}</dd> |
| 141 | +</dl> |
| 142 | +<dl> |
| 143 | +<dt>{ts}Public Page{/ts}</dt> |
| 144 | + <dd>{$form.comments_page.html}</dd> |
| 145 | +</dl> |
| 146 | +</fieldset> |
| 147 | + |
| 148 | +<dl> |
| 149 | + <dt></dt> |
| 150 | + <dd>{$form.buttons.html}</dd> |
| 151 | +</dl> |
| 152 | +</fieldset> |
| 153 | +</div> |
Property changes on: civicrm/trunk/sites/all/themes/civicrm_custom/CRM/Contribute/Form/ContributionView.tpl |
___________________________________________________________________ |
Name: svn:executable |
1 | 154 | + * |
Index: civicrm/trunk/sites/all/modules/civicrm_fix_notes/civicrm_fix_notes.module |
— | — | @@ -7,9 +7,9 @@ |
8 | 8 | |
9 | 9 | // if form is contribution edit |
10 | 10 | if( $form->getName() == 'Contribution' && $form->getAction() == '2') { |
11 | | - |
| 11 | + |
12 | 12 | //add element and assign it to the template (overridden elsewhere) |
13 | | - $form->addElement('text', 'donor_note', "Comment Submitted", $attributes = 'size=50', $required = false, $javascript = null ); |
| 13 | + $form->addElement('textarea', 'donor_note', "Comment Submitted", array('cols'=>60, 'rows'=>5)); |
14 | 14 | $form->assign( 'donor_note' ); |
15 | 15 | |
16 | 16 | //contribution id |
— | — | @@ -20,8 +20,42 @@ |
21 | 21 | $note = db_result(db_query("SELECT note FROM {civicrm_contribution} WHERE id = '%d'", $curr_id)); |
22 | 22 | |
23 | 23 | $form->setDefaults(array('donor_note' => $note)); |
| 24 | + |
| 25 | + |
24 | 26 | |
25 | | - }//end if |
| 27 | + }//end if |
| 28 | + |
| 29 | + if( $form->getName() == 'ContributionView') { |
| 30 | + |
| 31 | + //get contribution id from URL (not passed in $form data ?!?!) |
| 32 | + global $base_root; |
| 33 | + |
| 34 | + $curr_url = parse_url($base_root . request_uri(), PHP_URL_QUERY); |
| 35 | + $output = array(); |
| 36 | + parse_str($curr_url, $output); |
| 37 | + |
| 38 | + //contribution id |
| 39 | + $curr_id = $output['id']; |
| 40 | + |
| 41 | + //display current note as default |
| 42 | + $db = new civicrm_api_db(); |
| 43 | + $note = db_result(db_query("SELECT note FROM {civicrm_contribution} WHERE id = '%d'", $curr_id)); |
| 44 | + |
| 45 | + $form->addElement('static', 'donor_comment', "Donor Comment", $note); |
| 46 | + $form->assign( 'donor_comment' ); |
| 47 | + |
| 48 | + //get receive date as timestamp for offset param in URL |
| 49 | + $db = new civicrm_api_db(); |
| 50 | + $offset = db_result(db_query("SELECT UNIX_TIMESTAMP(receive_date) FROM {civicrm_contribution} WHERE id = '%d'", $output['id'])); |
| 51 | + |
| 52 | + //looks like this: 'http://wikimediafoundation.org/wiki/Special:ContributionHistory?offset=1262978021#506056' |
| 53 | + $link = 'http://wikimediafoundation.org/wiki/Special:ContributionHistory?offset=' . $offset . '#' . $output['id']; |
| 54 | + |
| 55 | + $form->addElement('link','comments_page','WM Comment Page:', $link, 'View on WM Public Page', 'target="_blank"'); |
| 56 | + $form->assign( 'comments_page' ); |
| 57 | + |
| 58 | + } |
| 59 | + |
26 | 60 | } |
27 | 61 | |
28 | 62 | /** |
Index: civicrm/trunk/sites/all/modules/civicrm/CRM/Dedupe/Finder.php |
— | — | @@ -67,7 +67,7 @@ |
68 | 68 | $dupes[] = array( $dao->id1, $dao->id2, $dao->weight ); |
69 | 69 | } |
70 | 70 | $dao->query($rgBao->tableDropQuery()); |
71 | | - |
| 71 | + |
72 | 72 | return $dupes; |
73 | 73 | } |
74 | 74 | |
— | — | @@ -136,6 +136,7 @@ |
137 | 137 | } |
138 | 138 | $ctype = $dao->contact_type; |
139 | 139 | } |
| 140 | + |
140 | 141 | $rgBao =& new CRM_Dedupe_BAO_RuleGroup(); |
141 | 142 | $rgBao->level = $level; |
142 | 143 | $rgBao->contact_type = $ctype; |
— | — | @@ -143,8 +144,9 @@ |
144 | 145 | if (!$rgBao->find(true)) { |
145 | 146 | CRM_Core_Error::fatal("$level rule for $ctype does not exist"); |
146 | 147 | } |
| 148 | + |
147 | 149 | $dupes = self::dupes($rgBao->id, array($cid)); |
148 | | - |
| 150 | + |
149 | 151 | // get the dupes for this cid |
150 | 152 | $result = array( ); |
151 | 153 | foreach ( $dupes as $dupe ) { |
Index: civicrm/trunk/sites/all/modules/civicrm/CRM/Contribute/Form/ContributionView.php |
— | — | @@ -114,7 +114,7 @@ |
115 | 115 | $noteValue = CRM_Core_BAO_Note::getNote( $values['id'], 'civicrm_contribution' ); |
116 | 116 | $values['note'] = array_values($noteValue); |
117 | 117 | |
118 | | - // show billing address location details, if exists |
| 118 | + // show billing address location details, if existsXXX |
119 | 119 | if ( CRM_Utils_Array::value( 'address_id', $values ) ) { |
120 | 120 | $addressParams = array( 'id' => CRM_Utils_Array::value( 'address_id', $values ) ); |
121 | 121 | $addressDetails = CRM_Core_BAO_Address::getValues( $addressParams, false, 'id' ); |
— | — | @@ -122,7 +122,7 @@ |
123 | 123 | $values['billing_address'] = $addressDetails[0]['display']; |
124 | 124 | } |
125 | 125 | |
126 | | - //get soft credit record if exists. |
| 126 | + //get soft credit record if existsXXX. |
127 | 127 | if( $softContribution = CRM_Contribute_BAO_Contribution::getSoftContribution( $softParams ) ) { |
128 | 128 | $softContribution['softCreditToName'] = CRM_Core_DAO::getFieldValue( 'CRM_Contact_DAO_Contact', $softContribution['soft_credit_to'], 'display_name' ); |
129 | 129 | //hack to avoid dispalyName conflict |
Index: civicrm/trunk/sites/all/modules/civicrm/CRM/Contribute/Form/Contribution.php |
— | — | @@ -643,7 +643,7 @@ |
644 | 644 | 'onClick' => "if (this.value != 3) status(); else return false", |
645 | 645 | 'onChange' => "return showHideByValue('contribution_status_id','3','cancelInfo','table-row','select',false);")); |
646 | 646 | // add various dates |
647 | | - $element =& $this->add('date', 'receive_date', ts('Received'), CRM_Core_SelectValues::date('activityDate'), false ); |
| 647 | + $element =& $this->add('date', 'receive_date', ts('Received'), CRM_Core_SelectValues::date('activityDatetime'), false ); |
648 | 648 | $this->addRule('receive_date', ts('Select a valid date.'), 'qfDate'); |
649 | 649 | if ( $this->_online ) { |
650 | 650 | $this->assign("hideCalender" , true ); |
— | — | @@ -1026,9 +1026,9 @@ |
1027 | 1027 | |
1028 | 1028 | foreach ( $dates as $d ) { |
1029 | 1029 | if ( ! CRM_Utils_System::isNull( $formValues[$d] ) ) { |
1030 | | - $formValues[$d]['H'] = '00'; |
1031 | | - $formValues[$d]['i'] = '00'; |
1032 | | - $formValues[$d]['s'] = '00'; |
| 1030 | + // $formValues[$d]['H'] = '00'; |
| 1031 | + // $formValues[$d]['i'] = '00'; |
| 1032 | + // $formValues[$d]['s'] = '00'; |
1033 | 1033 | $params[$d] = CRM_Utils_Date::format( $formValues[$d] ); |
1034 | 1034 | } else if ( array_key_exists( $d, $formValues ) ) { |
1035 | 1035 | $params[$d] = 'null'; |