Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumnLetter2.php |
— | — | @@ -90,7 +90,7 @@ |
91 | 91 | if ( !$this->paypal ) { |
92 | 92 | // PayPal button |
93 | 93 | $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/>' . |
95 | 95 | '— ' . wfMsg( 'payflowpro_gateway-or' ) . ' —<br/><big><b>' . wfMsg( 'payflowpro_gateway-donate-wikipedia' ) . '</b></big></td>'; |
96 | 96 | $form .= '</tr>'; |
97 | 97 | } |
— | — | @@ -111,7 +111,7 @@ |
112 | 112 | $form .= '<tr>'; |
113 | 113 | $form .= '<td class="label"></td>'; |
114 | 114 | $form .= '<td>'; |
115 | | - $form .= Html::hidden( 'PaypalRedirect', false ); |
| 115 | + $form .= Html::hidden( 'PaypalRedirect', 0 ); |
116 | 116 | $form .= Xml::tags( 'div', |
117 | 117 | array(), |
118 | 118 | Xml::element( 'img', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/credit_card_logos.gif" ) ) |
— | — | @@ -162,8 +162,8 @@ |
163 | 163 | $form = Xml::openElement( 'div', array( 'id' => 'payflowpro_gateway-form-submit' ) ); |
164 | 164 | $form .= Xml::openElement( 'div', array( 'id' => 'mw-donate-submit-button' ) ); |
165 | 165 | 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' ) ); |
168 | 168 | } else { |
169 | 169 | $form .= Xml::element( 'input', array( 'class' => 'button-plain', 'value' => wfMsg( 'payflowpro_gateway-donor-submit' ), 'type' => 'submit' ) ); |
170 | 170 | $form .= Xml::closeElement( 'div' ); // close div#mw-donate-submit-button |
Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumnLetter3.php |
— | — | @@ -90,7 +90,7 @@ |
91 | 91 | if ( !$this->paypal ) { |
92 | 92 | // PayPal button |
93 | 93 | $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/>' . |
95 | 95 | '— ' . wfMsg( 'payflowpro_gateway-or' ) . ' —<br/><big><b>' . wfMsg( 'payflowpro_gateway-donate-wikipedia' ) . '</b></big></td>'; |
96 | 96 | $form .= '</tr>'; |
97 | 97 | } |
— | — | @@ -111,7 +111,7 @@ |
112 | 112 | $form .= '<tr>'; |
113 | 113 | $form .= '<td class="label"></td>'; |
114 | 114 | $form .= '<td>'; |
115 | | - $form .= Html::hidden( 'PaypalRedirect', false ); |
| 115 | + $form .= Html::hidden( 'PaypalRedirect', 0 ); |
116 | 116 | $form .= Xml::tags( 'div', |
117 | 117 | array(), |
118 | 118 | Xml::element( 'img', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/credit_card_logos.gif" ) ) |
— | — | @@ -162,8 +162,8 @@ |
163 | 163 | $form = Xml::openElement( 'div', array( 'id' => 'payflowpro_gateway-form-submit' ) ); |
164 | 164 | $form .= Xml::openElement( 'div', array( 'id' => 'mw-donate-submit-button' ) ); |
165 | 165 | 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' ) ); |
168 | 168 | } else { |
169 | 169 | $form .= Xml::element( 'input', array( 'class' => 'button-plain', 'value' => wfMsg( 'payflowpro_gateway-donor-submit' ), 'type' => 'submit' ) ); |
170 | 170 | $form .= Xml::closeElement( 'div' ); // close div#mw-donate-submit-button |
Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumnLetter4.php |
— | — | @@ -90,7 +90,7 @@ |
91 | 91 | if ( !$this->paypal ) { |
92 | 92 | // PayPal button |
93 | 93 | $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/>' . |
95 | 95 | '— ' . wfMsg( 'payflowpro_gateway-or' ) . ' —<br/><big><b>' . wfMsg( 'payflowpro_gateway-donate-wikipedia' ) . '</b></big></td>'; |
96 | 96 | $form .= '</tr>'; |
97 | 97 | } |
— | — | @@ -111,7 +111,7 @@ |
112 | 112 | $form .= '<tr>'; |
113 | 113 | $form .= '<td class="label"></td>'; |
114 | 114 | $form .= '<td>'; |
115 | | - $form .= Html::hidden( 'PaypalRedirect', false ); |
| 115 | + $form .= Html::hidden( 'PaypalRedirect', 0 ); |
116 | 116 | $form .= Xml::tags( 'div', |
117 | 117 | array(), |
118 | 118 | Xml::element( 'img', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/credit_card_logos.gif" ) ) |
— | — | @@ -162,8 +162,8 @@ |
163 | 163 | $form = Xml::openElement( 'div', array( 'id' => 'payflowpro_gateway-form-submit' ) ); |
164 | 164 | $form .= Xml::openElement( 'div', array( 'id' => 'mw-donate-submit-button' ) ); |
165 | 165 | 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' ) ); |
168 | 168 | } else { |
169 | 169 | $form .= Xml::element( 'input', array( 'class' => 'button-plain', 'value' => wfMsg( 'payflowpro_gateway-donor-submit' ), 'type' => 'submit' ) ); |
170 | 170 | $form .= Xml::closeElement( 'div' ); // close div#mw-donate-submit-button |
Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumnLetter5.php |
— | — | @@ -86,7 +86,7 @@ |
87 | 87 | |
88 | 88 | /* |
89 | 89 | $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>'; |
91 | 91 | $form .= '</tr>'; |
92 | 92 | */ |
93 | 93 | |
— | — | @@ -195,7 +195,7 @@ |
196 | 196 | // cc submit button |
197 | 197 | $form = Xml::openElement( 'div', array( 'id' => 'payflowpro_gateway-form-submit' ) ); |
198 | 198 | $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' ) ); |
200 | 200 | $form .= Xml::closeElement( 'div' ); // close div#mw-donate-submit-button |
201 | 201 | $form .= Xml::openElement( 'div', array( 'class' => 'mw-donate-submessage', 'id' => 'payflowpro_gateway-donate-submessage' ) ) . |
202 | 202 | wfMsg( 'payflowpro_gateway-donate-click' ); |
— | — | @@ -205,8 +205,8 @@ |
206 | 206 | // paypal submit button |
207 | 207 | $form .= Xml::openElement( 'div', array( 'id' => 'payflowpro_gateway-form-submit-paypal' ) ); |
208 | 208 | $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' ) ); |
211 | 211 | $form .= Xml::closeElement( 'div' ); // close div#payflowpro_gateway-donate-submessage |
212 | 212 | $form .= Xml::closeElement( 'div' ); // close div#payflowpro_gateway-form-submit |
213 | 213 | |
Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumnLetter6.php |
— | — | @@ -86,7 +86,7 @@ |
87 | 87 | |
88 | 88 | /* |
89 | 89 | $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>'; |
91 | 91 | $form .= '</tr>'; |
92 | 92 | */ |
93 | 93 | |
— | — | @@ -208,7 +208,7 @@ |
209 | 209 | $form = Xml::openElement( 'div', array( 'id' => 'payflowpro_gateway-form-submit', 'style' => 'display: none;' ) ); |
210 | 210 | } |
211 | 211 | $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' ) ); |
213 | 213 | $form .= Xml::closeElement( 'div' ); // close div#mw-donate-submit-button |
214 | 214 | $form .= Xml::openElement( 'div', array( 'class' => 'mw-donate-submessage', 'id' => 'payflowpro_gateway-donate-submessage' ) ) . |
215 | 215 | wfMsg( 'payflowpro_gateway-donate-click' ); |
— | — | @@ -222,8 +222,8 @@ |
223 | 223 | $form .= Xml::openElement( 'div', array( 'id' => 'payflowpro_gateway-form-submit-paypal' ) ); |
224 | 224 | } |
225 | 225 | $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' ) ); |
228 | 228 | $form .= Xml::closeElement( 'div' ); // close div#payflowpro_gateway-donate-submessage |
229 | 229 | $form .= Xml::closeElement( 'div' ); // close div#payflowpro_gateway-form-submit |
230 | 230 | return $form; |
Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumnLetter.php |
— | — | @@ -115,10 +115,10 @@ |
116 | 116 | $form .= '<tr>'; |
117 | 117 | $form .= '<td class="label"></td>'; |
118 | 118 | $form .= '<td class="paypal-button">'; |
119 | | - $form .= Html::hidden( 'PaypalRedirect', false ); |
| 119 | + $form .= Html::hidden( 'PaypalRedirect', 0 ); |
120 | 120 | $form .= Xml::tags( 'div', |
121 | 121 | array(), |
122 | | - Xml::element( 'img', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/credit_card_logos2.gif" ) ) . ' <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" ) ) . ' <a href="#" onclick="document.payment.PaypalRedirect.value=1;document.payment.submit();"><img src="' . $scriptPath . '/donate_with_paypal.gif"/></a>' |
123 | 123 | ); |
124 | 124 | $form .= '</td>'; |
125 | 125 | $form .= '</tr>'; |
Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoStepTwoColumn.php |
— | — | @@ -69,6 +69,8 @@ |
70 | 70 | if( output ) { |
71 | 71 | alert( output ); |
72 | 72 | return false; |
| 73 | + } else { |
| 74 | + return true; |
73 | 75 | } |
74 | 76 | } |
75 | 77 | </script> |
Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/OneStepTwoColumn.php |
— | — | @@ -58,7 +58,7 @@ |
59 | 59 | |
60 | 60 | var doCheck = true; |
61 | 61 | if( typeof( document.payment.PaypalRedirect.value ) !== 'undefined' ) { |
62 | | - if( document.payment.PaypalRedirect.value == 'true' ) { |
| 62 | + if( document.payment.PaypalRedirect.value == 1 ) { |
63 | 63 | doCheck = false; |
64 | 64 | } |
65 | 65 | } |