Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumnLetter6.php |
— | — | @@ -140,7 +140,11 @@ |
141 | 141 | |
142 | 142 | $form .= '</table>'; |
143 | 143 | |
144 | | - $form .= Xml::openElement( 'table', array( 'id' => 'payflow-table-cc' ) ); |
| 144 | + if ( $this->form_data['card'] == 'cc1' || $this->form_data['card'] == 'cc2' || $this->form_data['card'] == 'cc3' || $this->form_data['card'] == 'cc4' ) { |
| 145 | + $form .= Xml::openElement( 'table', array( 'id' => 'payflow-table-cc' ) ); |
| 146 | + } else { |
| 147 | + $form .= Xml::openElement( 'table', array( 'id' => 'payflow-table-cc', 'style' => 'display: none;' ) ); |
| 148 | + } |
145 | 149 | |
146 | 150 | // name |
147 | 151 | $form .= $this->getNameField(); |
— | — | @@ -196,8 +200,13 @@ |
197 | 201 | } |
198 | 202 | |
199 | 203 | public function generateFormSubmit() { |
| 204 | + |
200 | 205 | // cc submit button |
201 | | - $form = Xml::openElement( 'div', array( 'id' => 'payflowpro_gateway-form-submit' ) ); |
| 206 | + if ( $this->form_data['card'] == 'cc1' || $this->form_data['card'] == 'cc2' || $this->form_data['card'] == 'cc3' || $this->form_data['card'] == 'cc4' ) { |
| 207 | + $form = Xml::openElement( 'div', array( 'id' => 'payflowpro_gateway-form-submit' ) ); |
| 208 | + } else { |
| 209 | + $form = Xml::openElement( 'div', array( 'id' => 'payflowpro_gateway-form-submit', 'style' => 'display: none;' ) ); |
| 210 | + } |
202 | 211 | $form .= Xml::openElement( 'div', array( 'id' => 'mw-donate-submit-button' ) ); |
203 | 212 | $form .= Xml::element( 'input', array( 'class' => 'button-plain', 'value' => wfMsg( 'payflowpro_gateway-donor-submit' ), 'onclick' => 'document.payment.PaypalRedirect.value=0;submit_form( this );', 'type' => 'submit' ) ); |
204 | 213 | $form .= Xml::closeElement( 'div' ); // close div#mw-donate-submit-button |
— | — | @@ -207,13 +216,16 @@ |
208 | 217 | $form .= Xml::closeElement( 'div' ); // close div#payflowpro_gateway-form-submit |
209 | 218 | |
210 | 219 | // paypal submit button |
211 | | - $form .= Xml::openElement( 'div', array( 'id' => 'payflowpro_gateway-form-submit-paypal' ) ); |
| 220 | + if ( $this->form_data['card'] == 'cc1' || $this->form_data['card'] == 'cc2' || $this->form_data['card'] == 'cc3' || $this->form_data['card'] == 'cc4' ) { |
| 221 | + $form .= Xml::openElement( 'div', array( 'id' => 'payflowpro_gateway-form-submit-paypal', 'style' => 'display: none;' ) ); |
| 222 | + } else { |
| 223 | + $form .= Xml::openElement( 'div', array( 'id' => 'payflowpro_gateway-form-submit-paypal' ) ); |
| 224 | + } |
212 | 225 | $form .= Xml::openElement( 'div', array( 'id' => 'mw-donate-submit-button' ) ); |
213 | 226 | $form .= Html::hidden( 'PaypalRedirect', 0 ); |
214 | 227 | $form .= Xml::element( 'input', array( 'class' => 'button-plain', 'value' => wfMsg( 'payflowpro_gateway-donor-submit' ), 'onclick' => 'document.payment.PaypalRedirect.value=1;document.payment.submit();', 'type' => 'submit' ) ); |
215 | 228 | $form .= Xml::closeElement( 'div' ); // close div#payflowpro_gateway-donate-submessage |
216 | 229 | $form .= Xml::closeElement( 'div' ); // close div#payflowpro_gateway-form-submit |
217 | | - |
218 | 230 | return $form; |
219 | 231 | } |
220 | 232 | |
Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/css/TwoColumnLetter6.css |
— | — | @@ -105,16 +105,6 @@ |
106 | 106 | input.fullwidth { |
107 | 107 | width:300px !important; |
108 | 108 | } |
109 | | - |
110 | | -div#payflowpro_gateway-form-submit-paypal { |
111 | | - display: block; |
112 | | -} |
113 | | -div#payflowpro_gateway-form-submit { |
114 | | - display: none; |
115 | | -} |
116 | | -table#payflow-table-cc { |
117 | | - display: none; |
118 | | -} |
119 | 109 | #footer { |
120 | 110 | background-image: none !important; |
121 | 111 | } |