r75986 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75985‎ | r75986 | r75987 >
Date:03:44, 4 November 2010
Author:kaldari
Status:deferred
Tags:
Comment:
testing
Modified paths:
  • /trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumnLetter5.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumnLetter5.php
@@ -91,7 +91,29 @@
9292 */
9393
9494 // amount
95 - $form .= $this->getAmountField();
 95+ $otherChecked = false;
 96+ $amount = -1;
 97+ if ( $this->form_data['amount'] != 100 && $this->form_data['amount'] != 50 && $this->form_data['amount'] != 35 && $this->form_data['amount'] != 20 && $this->form_data['amountOther'] > 0 ) {
 98+ $otherChecked = true;
 99+ $amount = $this->form_data['amountOther'];
 100+ }
 101+ $form .= '<tr>';
 102+ $form .= '<td colspan="2"><span class="creditcard-error-msg">' . $this->form_errors['invalidamount'] . '</span></td>';
 103+ $form .= '</tr>';
 104+ $form .= '<tr>';
 105+ $form .= '<td class="label">' . Xml::label( wfMsg( 'payflowpro_gateway-donor-amount' ), 'amount' ) . '</td>';
 106+ $form .= '<td>' . Xml::radio( 'amount', 100, $this->form_data['amount'] == 100 ) . '100 ' .
 107+ Xml::radio( 'amount', 50, $this->form_data['amount'] == 50 ) . '50 ' .
 108+ Xml::radio( 'amount', 35, $this->form_data['amount'] == 35 ) . '35 ' .
 109+ Xml::radio( 'amount', 20, $this->form_data['amount'] == 20, 'onfocus' => 'clearField( document.getElementById(\'amountOther\'), "Other" )' ) . '20 ' .
 110+ '</td>';
 111+ $form .= '</tr>';
 112+ $form .= '<tr>';
 113+ $form .= '<td class="label"></td>';
 114+ $form .= '<td>' . Xml::radio( 'amount', $amount, $otherChecked, array( 'id' => 'otherRadio' ) ) . Xml::input( 'amountOther', '7', $this->form_data['amountOther'], array( 'type' => 'text', 'onfocus' => 'clearField( this, "Other" )', 'onblur' => 'document.getElementById("otherRadio").value = this.value;if (this.value > 0) document.getElementById("otherRadio").checked=true;', 'maxlength' => '10', 'id' => 'amountOther' ) ) .
 115+ ' ' . $this->generateCurrencyDropdown() . '</td>';
 116+ $form .= '</tr>';
 117+ return $form;
96118
97119 // name
98120 $form .= $this->getNameField();
@@ -100,12 +122,12 @@
101123 $form .= $this->getEmailField();
102124
103125 $form .= '<tr>';
104 - $form .= '<td class="label">' . Xml::label( wfMsg( 'payflowpro_gateway-payment-type' ), 'payment_method' ) . '</td>';
105 - $form .= '<td>' . Xml::radio( 'payment_method', 'cc1', $this->form_data['payment_method'] == 'cc1', array( 'onclick' => 'switchToCreditCard()' ) ) . Xml::element( 'img', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/card-visa.png" ) ) .
106 - Xml::radio( 'payment_method', 'cc2', $this->form_data['payment_method'] == 'cc2', array( 'onclick' => 'switchToCreditCard()' ) ) . Xml::element( 'img', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/card-mastercard.png" ) ) .
107 - Xml::radio( 'payment_method', 'cc3', $this->form_data['payment_method'] == 'cc3', array( 'onclick' => 'switchToCreditCard()' ) ) . Xml::element( 'img', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/card-amex.png" ) ) .
108 - Xml::radio( 'payment_method', 'cc4', $this->form_data['payment_method'] == 'cc4', array( 'onclick' => 'switchToCreditCard()' ) ) . Xml::element( 'img', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/card-discover.png" ) ) .
109 - Xml::radio( 'payment_method', 'pp', $this->form_data['payment_method'] == 'pp', array( 'onclick' => 'switchToPayPal()' ) ) . Xml::element( 'img', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/card-paypal.png" ) ) .
 126+ $form .= '<td class="label">' . Xml::label( wfMsg( 'payflowpro_gateway-payment-type' ), 'card' ) . '</td>';
 127+ $form .= '<td>' . Xml::radio( 'card', 'cc1', $this->form_data['card'] == 'cc1', array( 'onclick' => 'switchToCreditCard()' ) ) . Xml::element( 'img', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/card-visa.png" ) ) .
 128+ Xml::radio( 'card', 'cc2', $this->form_data['card'] == 'cc2', array( 'onclick' => 'switchToCreditCard()' ) ) . Xml::element( 'img', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/card-mastercard.png" ) ) .
 129+ Xml::radio( 'card', 'cc3', $this->form_data['card'] == 'cc3', array( 'onclick' => 'switchToCreditCard()' ) ) . Xml::element( 'img', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/card-amex.png" ) ) .
 130+ Xml::radio( 'card', 'cc4', $this->form_data['card'] == 'cc4', array( 'onclick' => 'switchToCreditCard()' ) ) . Xml::element( 'img', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/card-discover.png" ) ) .
 131+ Xml::radio( 'card', 'pp', $this->form_data['card'] == 'pp', array( 'onclick' => 'switchToPayPal()' ) ) . Xml::element( 'img', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/card-paypal.png" ) ) .
110132 '</td>';
111133 $form .= '</tr>';
112134

Status & tagging log