r77039 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77038‎ | r77039 | r77040 >
Date:22:33, 19 November 2010
Author:kaldari
Status:deferred
Tags:
Comment:
form fox for PaypalRedirect
Modified paths:
  • /trunk/extensions/DonationInterface/payflowpro_gateway/forms/OneStepTwoColumn.php (modified) (history)
  • /trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumnLetter.php (modified) (history)
  • /trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumnLetter2.php (modified) (history)
  • /trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumnLetter3.php (modified) (history)
  • /trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumnLetter4.php (modified) (history)
  • /trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumnLetter5.php (modified) (history)
  • /trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumnLetter6.php (modified) (history)
  • /trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoStepTwoColumn.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumnLetter2.php
@@ -90,7 +90,7 @@
9191 if ( !$this->paypal ) {
9292 // PayPal button
9393 $form .= '<tr>';
94 - $form .= '<td style="text-align:center;" colspan="2"><big><b>' . wfMsg( 'payflowpro_gateway-paypal-button' ) . '</b></big><br/><a href="#" onclick="document.payment.PaypalRedirect.value=\'true\';document.payment.submit();"><img src="' . $scriptPath . '/paypal.png"/></a><br/>' .
 94+ $form .= '<td style="text-align:center;" colspan="2"><big><b>' . wfMsg( 'payflowpro_gateway-paypal-button' ) . '</b></big><br/><a href="#" onclick="document.payment.PaypalRedirect.value=1;document.payment.submit();"><img src="' . $scriptPath . '/paypal.png"/></a><br/>' .
9595 '— ' . wfMsg( 'payflowpro_gateway-or' ) . ' —<br/><big><b>' . wfMsg( 'payflowpro_gateway-donate-wikipedia' ) . '</b></big></td>';
9696 $form .= '</tr>';
9797 }
@@ -111,7 +111,7 @@
112112 $form .= '<tr>';
113113 $form .= '<td class="label"></td>';
114114 $form .= '<td>';
115 - $form .= Html::hidden( 'PaypalRedirect', false );
 115+ $form .= Html::hidden( 'PaypalRedirect', 0 );
116116 $form .= Xml::tags( 'div',
117117 array(),
118118 Xml::element( 'img', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/credit_card_logos.gif" ) )
@@ -162,8 +162,8 @@
163163 $form = Xml::openElement( 'div', array( 'id' => 'payflowpro_gateway-form-submit' ) );
164164 $form .= Xml::openElement( 'div', array( 'id' => 'mw-donate-submit-button' ) );
165165 if ( $this->paypal ) {
166 - $form .= Html::hidden( 'PaypalRedirect', false );
167 - $form .= Xml::element( 'input', array( 'class' => 'button-plain', 'value' => wfMsg( 'payflowpro_gateway-paypal-button' ), 'onclick' => 'document.payment.PaypalRedirect.value=\'true\';return true;', 'type' => 'submit' ) );
 166+ $form .= Html::hidden( 'PaypalRedirect', 0 );
 167+ $form .= Xml::element( 'input', array( 'class' => 'button-plain', 'value' => wfMsg( 'payflowpro_gateway-paypal-button' ), 'onclick' => 'document.payment.PaypalRedirect.value=1;return true;', 'type' => 'submit' ) );
168168 } else {
169169 $form .= Xml::element( 'input', array( 'class' => 'button-plain', 'value' => wfMsg( 'payflowpro_gateway-donor-submit' ), 'type' => 'submit' ) );
170170 $form .= Xml::closeElement( 'div' ); // close div#mw-donate-submit-button
Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumnLetter3.php
@@ -90,7 +90,7 @@
9191 if ( !$this->paypal ) {
9292 // PayPal button
9393 $form .= '<tr>';
94 - $form .= '<td style="text-align:center;" colspan="2"><big><b>' . wfMsg( 'payflowpro_gateway-paypal-button' ) . '</b></big><br/><a href="#" onclick="document.payment.PaypalRedirect.value=\'true\';document.payment.submit();"><img src="' . $scriptPath . '/paypal.png"/></a><br/>' .
 94+ $form .= '<td style="text-align:center;" colspan="2"><big><b>' . wfMsg( 'payflowpro_gateway-paypal-button' ) . '</b></big><br/><a href="#" onclick="document.payment.PaypalRedirect.value=1;document.payment.submit();"><img src="' . $scriptPath . '/paypal.png"/></a><br/>' .
9595 '— ' . wfMsg( 'payflowpro_gateway-or' ) . ' —<br/><big><b>' . wfMsg( 'payflowpro_gateway-donate-wikipedia' ) . '</b></big></td>';
9696 $form .= '</tr>';
9797 }
@@ -111,7 +111,7 @@
112112 $form .= '<tr>';
113113 $form .= '<td class="label"></td>';
114114 $form .= '<td>';
115 - $form .= Html::hidden( 'PaypalRedirect', false );
 115+ $form .= Html::hidden( 'PaypalRedirect', 0 );
116116 $form .= Xml::tags( 'div',
117117 array(),
118118 Xml::element( 'img', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/credit_card_logos.gif" ) )
@@ -162,8 +162,8 @@
163163 $form = Xml::openElement( 'div', array( 'id' => 'payflowpro_gateway-form-submit' ) );
164164 $form .= Xml::openElement( 'div', array( 'id' => 'mw-donate-submit-button' ) );
165165 if ( $this->paypal ) {
166 - $form .= Html::hidden( 'PaypalRedirect', false );
167 - $form .= Xml::element( 'input', array( 'class' => 'button-plain', 'value' => wfMsg( 'payflowpro_gateway-paypal-button' ), 'onclick' => 'document.payment.PaypalRedirect.value=\'true\';return true;', 'type' => 'submit' ) );
 166+ $form .= Html::hidden( 'PaypalRedirect', 0 );
 167+ $form .= Xml::element( 'input', array( 'class' => 'button-plain', 'value' => wfMsg( 'payflowpro_gateway-paypal-button' ), 'onclick' => 'document.payment.PaypalRedirect.value=1;return true;', 'type' => 'submit' ) );
168168 } else {
169169 $form .= Xml::element( 'input', array( 'class' => 'button-plain', 'value' => wfMsg( 'payflowpro_gateway-donor-submit' ), 'type' => 'submit' ) );
170170 $form .= Xml::closeElement( 'div' ); // close div#mw-donate-submit-button
Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumnLetter4.php
@@ -90,7 +90,7 @@
9191 if ( !$this->paypal ) {
9292 // PayPal button
9393 $form .= '<tr>';
94 - $form .= '<td style="text-align:center;" colspan="2"><big><b>' . wfMsg( 'payflowpro_gateway-paypal-button' ) . '</b></big><br/><a href="#" onclick="document.payment.PaypalRedirect.value=\'true\';document.payment.submit();"><img src="' . $scriptPath . '/paypal.png"/></a><br/>' .
 94+ $form .= '<td style="text-align:center;" colspan="2"><big><b>' . wfMsg( 'payflowpro_gateway-paypal-button' ) . '</b></big><br/><a href="#" onclick="document.payment.PaypalRedirect.value=1;document.payment.submit();"><img src="' . $scriptPath . '/paypal.png"/></a><br/>' .
9595 '— ' . wfMsg( 'payflowpro_gateway-or' ) . ' —<br/><big><b>' . wfMsg( 'payflowpro_gateway-donate-wikipedia' ) . '</b></big></td>';
9696 $form .= '</tr>';
9797 }
@@ -111,7 +111,7 @@
112112 $form .= '<tr>';
113113 $form .= '<td class="label"></td>';
114114 $form .= '<td>';
115 - $form .= Html::hidden( 'PaypalRedirect', false );
 115+ $form .= Html::hidden( 'PaypalRedirect', 0 );
116116 $form .= Xml::tags( 'div',
117117 array(),
118118 Xml::element( 'img', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/credit_card_logos.gif" ) )
@@ -162,8 +162,8 @@
163163 $form = Xml::openElement( 'div', array( 'id' => 'payflowpro_gateway-form-submit' ) );
164164 $form .= Xml::openElement( 'div', array( 'id' => 'mw-donate-submit-button' ) );
165165 if ( $this->paypal ) {
166 - $form .= Html::hidden( 'PaypalRedirect', false );
167 - $form .= Xml::element( 'input', array( 'class' => 'button-plain', 'value' => wfMsg( 'payflowpro_gateway-paypal-button' ), 'onclick' => 'document.payment.PaypalRedirect.value=\'true\';return true;', 'type' => 'submit' ) );
 166+ $form .= Html::hidden( 'PaypalRedirect', 0 );
 167+ $form .= Xml::element( 'input', array( 'class' => 'button-plain', 'value' => wfMsg( 'payflowpro_gateway-paypal-button' ), 'onclick' => 'document.payment.PaypalRedirect.value=1;return true;', 'type' => 'submit' ) );
168168 } else {
169169 $form .= Xml::element( 'input', array( 'class' => 'button-plain', 'value' => wfMsg( 'payflowpro_gateway-donor-submit' ), 'type' => 'submit' ) );
170170 $form .= Xml::closeElement( 'div' ); // close div#mw-donate-submit-button
Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumnLetter5.php
@@ -86,7 +86,7 @@
8787
8888 /*
8989 $form .= '<tr>';
90 - $form .= '<td style="text-align:center;" colspan="2"><big><b>' . wfMsg( 'payflowpro_gateway-paypal-button' ) . '</b></big><br/><a href="#" onclick="document.payment.PaypalRedirect.value=\'true\';document.payment.submit();"><img src="' . $scriptPath . '/paypal.png"/></a></td>';
 90+ $form .= '<td style="text-align:center;" colspan="2"><big><b>' . wfMsg( 'payflowpro_gateway-paypal-button' ) . '</b></big><br/><a href="#" onclick="document.payment.PaypalRedirect.value=1;document.payment.submit();"><img src="' . $scriptPath . '/paypal.png"/></a></td>';
9191 $form .= '</tr>';
9292 */
9393
@@ -195,7 +195,7 @@
196196 // cc submit button
197197 $form = Xml::openElement( 'div', array( 'id' => 'payflowpro_gateway-form-submit' ) );
198198 $form .= Xml::openElement( 'div', array( 'id' => 'mw-donate-submit-button' ) );
199 - $form .= Xml::element( 'input', array( 'class' => 'button-plain', 'value' => wfMsg( 'payflowpro_gateway-donor-submit' ), 'onclick' => 'document.payment.PaypalRedirect.value=\'false\';return true;', 'type' => 'submit' ) );
 199+ $form .= Xml::element( 'input', array( 'class' => 'button-plain', 'value' => wfMsg( 'payflowpro_gateway-donor-submit' ), 'onclick' => 'document.payment.PaypalRedirect.value=0;return true;', 'type' => 'submit' ) );
200200 $form .= Xml::closeElement( 'div' ); // close div#mw-donate-submit-button
201201 $form .= Xml::openElement( 'div', array( 'class' => 'mw-donate-submessage', 'id' => 'payflowpro_gateway-donate-submessage' ) ) .
202202 wfMsg( 'payflowpro_gateway-donate-click' );
@@ -205,8 +205,8 @@
206206 // paypal submit button
207207 $form .= Xml::openElement( 'div', array( 'id' => 'payflowpro_gateway-form-submit-paypal' ) );
208208 $form .= Xml::openElement( 'div', array( 'id' => 'mw-donate-submit-button' ) );
209 - $form .= Html::hidden( 'PaypalRedirect', false );
210 - $form .= Xml::element( 'input', array( 'class' => 'button-plain', 'value' => wfMsg( 'payflowpro_gateway-paypal-button' ), 'onclick' => 'document.payment.PaypalRedirect.value=\'true\';return true;', 'type' => 'submit' ) );
 209+ $form .= Html::hidden( 'PaypalRedirect', 0 );
 210+ $form .= Xml::element( 'input', array( 'class' => 'button-plain', 'value' => wfMsg( 'payflowpro_gateway-paypal-button' ), 'onclick' => 'document.payment.PaypalRedirect.value=1;return true;', 'type' => 'submit' ) );
211211 $form .= Xml::closeElement( 'div' ); // close div#payflowpro_gateway-donate-submessage
212212 $form .= Xml::closeElement( 'div' ); // close div#payflowpro_gateway-form-submit
213213
Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumnLetter6.php
@@ -86,7 +86,7 @@
8787
8888 /*
8989 $form .= '<tr>';
90 - $form .= '<td style="text-align:center;" colspan="2"><big><b>' . wfMsg( 'payflowpro_gateway-paypal-button' ) . '</b></big><br/><a href="#" onclick="document.payment.PaypalRedirect.value=\'true\';document.payment.submit();"><img src="' . $scriptPath . '/paypal.png"/></a></td>';
 90+ $form .= '<td style="text-align:center;" colspan="2"><big><b>' . wfMsg( 'payflowpro_gateway-paypal-button' ) . '</b></big><br/><a href="#" onclick="document.payment.PaypalRedirect.value=1;document.payment.submit();"><img src="' . $scriptPath . '/paypal.png"/></a></td>';
9191 $form .= '</tr>';
9292 */
9393
@@ -208,7 +208,7 @@
209209 $form = Xml::openElement( 'div', array( 'id' => 'payflowpro_gateway-form-submit', 'style' => 'display: none;' ) );
210210 }
211211 $form .= Xml::openElement( 'div', array( 'id' => 'mw-donate-submit-button' ) );
212 - $form .= Xml::element( 'input', array( 'class' => 'button-plain', 'value' => wfMsg( 'payflowpro_gateway-donor-submit' ), 'onclick' => 'document.payment.PaypalRedirect.value=\'false\';return true;', 'type' => 'submit' ) );
 212+ $form .= Xml::element( 'input', array( 'class' => 'button-plain', 'value' => wfMsg( 'payflowpro_gateway-donor-submit' ), 'onclick' => 'document.payment.PaypalRedirect.value=0;return true;', 'type' => 'submit' ) );
213213 $form .= Xml::closeElement( 'div' ); // close div#mw-donate-submit-button
214214 $form .= Xml::openElement( 'div', array( 'class' => 'mw-donate-submessage', 'id' => 'payflowpro_gateway-donate-submessage' ) ) .
215215 wfMsg( 'payflowpro_gateway-donate-click' );
@@ -222,8 +222,8 @@
223223 $form .= Xml::openElement( 'div', array( 'id' => 'payflowpro_gateway-form-submit-paypal' ) );
224224 }
225225 $form .= Xml::openElement( 'div', array( 'id' => 'mw-donate-submit-button' ) );
226 - $form .= Html::hidden( 'PaypalRedirect', false );
227 - $form .= Xml::element( 'input', array( 'class' => 'button-plain', 'value' => wfMsg( 'payflowpro_gateway-donor-submit' ), 'onclick' => 'document.payment.PaypalRedirect.value=\'true\';return true;', 'type' => 'submit' ) );
 226+ $form .= Html::hidden( 'PaypalRedirect', 0 );
 227+ $form .= Xml::element( 'input', array( 'class' => 'button-plain', 'value' => wfMsg( 'payflowpro_gateway-donor-submit' ), 'onclick' => 'document.payment.PaypalRedirect.value=1;return true;', 'type' => 'submit' ) );
228228 $form .= Xml::closeElement( 'div' ); // close div#payflowpro_gateway-donate-submessage
229229 $form .= Xml::closeElement( 'div' ); // close div#payflowpro_gateway-form-submit
230230 return $form;
Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumnLetter.php
@@ -115,10 +115,10 @@
116116 $form .= '<tr>';
117117 $form .= '<td class="label"></td>';
118118 $form .= '<td class="paypal-button">';
119 - $form .= Html::hidden( 'PaypalRedirect', false );
 119+ $form .= Html::hidden( 'PaypalRedirect', 0 );
120120 $form .= Xml::tags( 'div',
121121 array(),
122 - Xml::element( 'img', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/credit_card_logos2.gif" ) ) . '&nbsp;&nbsp;&nbsp;<a href="#" onclick="document.payment.PaypalRedirect.value=\'true\';document.payment.submit();"><img src="' . $scriptPath . '/donate_with_paypal.gif"/></a>'
 122+ Xml::element( 'img', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/credit_card_logos2.gif" ) ) . '&nbsp;&nbsp;&nbsp;<a href="#" onclick="document.payment.PaypalRedirect.value=1;document.payment.submit();"><img src="' . $scriptPath . '/donate_with_paypal.gif"/></a>'
123123 );
124124 $form .= '</td>';
125125 $form .= '</tr>';
Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoStepTwoColumn.php
@@ -69,6 +69,8 @@
7070 if( output ) {
7171 alert( output );
7272 return false;
 73+ } else {
 74+ return true;
7375 }
7476 }
7577 </script>
Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/OneStepTwoColumn.php
@@ -58,7 +58,7 @@
5959
6060 var doCheck = true;
6161 if( typeof( document.payment.PaypalRedirect.value ) !== 'undefined' ) {
62 - if( document.payment.PaypalRedirect.value == 'true' ) {
 62+ if( document.payment.PaypalRedirect.value == 1 ) {
6363 doCheck = false;
6464 }
6565 }

Status & tagging log