Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumnLetter5.php |
— | — | @@ -101,20 +101,17 @@ |
102 | 102 | |
103 | 103 | $form .= '<tr>'; |
104 | 104 | $form .= '<td class="label">' . Xml::label( wfMsg( 'payflowpro_gateway-payment-type' ), 'payment_method' ) . '</td>'; |
105 | | - $form .= '<td>' . Xml::radio( 'payment_method', 1, $this->form_data['payment_method'] == 1 ) . Xml::element( 'img', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/card-visa.png" ) ) . |
106 | | - Xml::radio( 'payment_method', 2, $this->form_data['payment_method'] == 2 ) . Xml::element( 'img', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/card-mastercard.png" ) ) . |
107 | | - Xml::radio( 'payment_method', 3, $this->form_data['payment_method'] == 3 ) . Xml::element( 'img', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/card-amex.png" ) ) . |
108 | | - Xml::radio( 'payment_method', 4, $this->form_data['payment_method'] == 4 ) . Xml::element( 'img', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/card-discover.png" ) ) . |
109 | | - Xml::radio( 'payment_method', 5, $this->form_data['payment_method'] == 5, array( 'onclick' => 'document.getElementById(\'payflow-table-cc\').style.display = \'none\';' ) ) . Xml::element( 'img', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/card-paypal.png" ) ) . |
| 105 | + $form .= '<td>' . Xml::radio( 'payment_method', 1, $this->form_data['payment_method'] == 1, array( 'onclick' => 'document.getElementById(\'payflow-table-paypal\').style.display = \'none\';document.getElementById(\'payflow-table-cc\').style.display = \'table\';' ) ) . Xml::element( 'img', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/card-visa.png" ) ) . |
| 106 | + Xml::radio( 'payment_method', 2, $this->form_data['payment_method'] == 2, array( 'onclick' => 'document.getElementById(\'payflow-table-paypal\').style.display = \'none\';document.getElementById(\'payflow-table-cc\').style.display = \'table\';' ) ) . Xml::element( 'img', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/card-mastercard.png" ) ) . |
| 107 | + Xml::radio( 'payment_method', 3, $this->form_data['payment_method'] == 3, array( 'onclick' => 'document.getElementById(\'payflow-table-paypal\').style.display = \'none\';document.getElementById(\'payflow-table-cc\').style.display = \'table\';' ) ) . Xml::element( 'img', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/card-amex.png" ) ) . |
| 108 | + Xml::radio( 'payment_method', 4, $this->form_data['payment_method'] == 4, array( 'onclick' => 'document.getElementById(\'payflow-table-paypal\').style.display = \'none\';document.getElementById(\'payflow-table-cc\').style.display = \'table\';' ) ) . Xml::element( 'img', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/card-discover.png" ) ) . |
| 109 | + Xml::radio( 'payment_method', 5, $this->form_data['payment_method'] == 5, array( 'onclick' => 'document.getElementById(\'payflow-table-cc\').style.display = \'none\';document.getElementById(\'payflow-table-paypal\').style.display = \'table\';' ) ) . Xml::element( 'img', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/card-paypal.png" ) ) . |
110 | 110 | '</td>'; |
111 | 111 | $form .= '</tr>'; |
112 | 112 | |
113 | 113 | $form .= '</table>'; |
114 | 114 | |
115 | | - $form .= Xml::openElement( 'table', array( 'id' => 'payflow-table-cc' ) ); |
116 | | - |
117 | | - /* |
118 | | - // make sure we have a paypal url set to redirect the user to before displaying the button |
| 115 | + $form .= Xml::openElement( 'table', array( 'id' => 'payflow-table-paypal', 'style' => 'display:none;' ) ); |
119 | 116 | if ( strlen( $wgPayflowGatewayPaypalURL ) ) { |
120 | 117 | $form .= '<tr>'; |
121 | 118 | $form .= '<td class="label"></td>'; |
— | — | @@ -122,12 +119,14 @@ |
123 | 120 | $form .= Html::hidden( 'PaypalRedirect', false ); |
124 | 121 | $form .= Xml::tags( 'div', |
125 | 122 | array(), |
126 | | - Xml::element( 'img', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/card-visa.png" ) ) |
| 123 | + 'test' ) |
127 | 124 | ); |
128 | 125 | $form .= '</td>'; |
129 | 126 | $form .= '</tr>'; |
130 | 127 | } |
131 | | - */ |
| 128 | + $form .= '</table>'; |
| 129 | + |
| 130 | + $form .= Xml::openElement( 'table', array( 'id' => 'payflow-table-cc' ) ); |
132 | 131 | |
133 | 132 | // card number |
134 | 133 | $form .= $this->getCardNumberField(); |