r75113 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75112‎ | r75113 | r75114 >
Date:21:32, 20 October 2010
Author:kaldari
Status:deferred
Tags:
Comment:
more formatting changes
Modified paths:
  • /trunk/extensions/DonationInterface/payflowpro_gateway/forms/Form.php (modified) (history)
  • /trunk/extensions/DonationInterface/payflowpro_gateway/forms/OneStepTwoColumn.php (modified) (history)
  • /trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoStepTwoColumn.php (modified) (history)
  • /trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.i18n.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoStepTwoColumn.php
@@ -10,6 +10,7 @@
1111 // we only want to load this JS if the form is being rendered
1212 $this->loadValidateJs(); // validation JS
1313
 14+ // form placeholder values
1415 $first = wfMsg( 'payflowpro_gateway-first' );
1516 $last = wfMsg( 'payflowpro_gateway-last' );
1617 $js = <<<EOT
Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/Form.php
@@ -432,7 +432,7 @@
433433 protected function getAmountField() {
434434 $otherChecked = false;
435435 $amount = -1;
436 - if ( $this->form_data['amount'] != 250 && $this->form_data['amount'] != 100 && $this->form_data['amount'] != 75 && $this->form_data['amount'] != 35 && $this->form_data['amountOther'] > 0 ) {
 436+ 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 ) {
437437 $otherChecked = true;
438438 $amount = $this->form_data['amountOther'];
439439 }
@@ -441,10 +441,10 @@
442442 $form .= '</tr>';
443443 $form .= '<tr>';
444444 $form .= '<td class="label">' . Xml::label(wfMsg( 'payflowpro_gateway-donor-amount' ), 'amount') . '</td>';
445 - $form .= '<td>' . Xml::radio( 'amount', 250, $this->form_data['amount'] == 250 ) . '250 ' .
446 - Xml::radio( 'amount', 100, $this->form_data['amount'] == 100 ) . '100 ' .
447 - Xml::radio( 'amount', 75, $this->form_data['amount'] == 75 ) . '75 ' .
448 - Xml::radio( 'amount', 35, $this->form_data['amount'] == 35 ) . '35 ' .
 445+ $form .= '<td>' . Xml::radio( 'amount', 100, $this->form_data['amount'] == 100 ) . '100 ' .
 446+ Xml::radio( 'amount', 50, $this->form_data['amount'] == 50 ) . '50 ' .
 447+ Xml::radio( 'amount', 35, $this->form_data['amount'] == 35 ) . '35 ' .
 448+ Xml::radio( 'amount', 20, $this->form_data['amount'] == 20 ) . '20 ' .
449449 '</td>';
450450 $form .= '</tr>';
451451 $form .= '<tr>';
Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/OneStepTwoColumn.php
@@ -15,7 +15,30 @@
1616 $this->loadValidateJs(); // validation JS
1717
1818 $this->loadApiJs(); // API/Ajax JS
 19+
 20+ // form placeholder values
 21+ $first = wfMsg( 'payflowpro_gateway-first' );
 22+ $last = wfMsg( 'payflowpro_gateway-last' );
 23+ $js = <<<EOT
 24+<script type="text/javascript">
 25+function loadPlaceholders() {
 26+ var fname = document.getElementById('fname');
 27+ var lname = document.getElementById('lname');
 28+ var amountOther = document.getElementById('amountOther');
 29+ if (fname.value == '') {
 30+ fname.style.color = '#999999';
 31+ fname.value = '$first';
1932 }
 33+ if (lname.value == '') {
 34+ lname.style.color = '#999999';
 35+ lname.value = '$last';
 36+ }
 37+}
 38+addEvent( window, 'load', loadPlaceholders );
 39+</script>
 40+EOT;
 41+ $wgOut->addHeadItem( 'placeholders', $js );
 42+ }
2043
2144 /**
2245 * Required method for constructing the entire form
Index: trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.i18n.php
@@ -110,7 +110,8 @@
111111 'payflowpro_gateway-last' => 'Last',
112112 'payflowpro_gateway-noscript-msg' => 'It appears that you do not have JavaScript enabled, or your browser does not support it.
113113 In order to provide a safe, secure and pleasant experience, our donation form requires JavaScript.',
114 - 'payflowpro_gateway-noscript-redirect-msg' => 'If you cannot or do not wish to enable JavaScript, you may still contribute by visiting:'
 114+ 'payflowpro_gateway-noscript-redirect-msg' => 'If you cannot or do not wish to enable JavaScript, you may still contribute by visiting:',
 115+ 'payflowpro_gateway-anon-message' => 'Please list my name on the public donor list.'
115116 );
116117
117118 /** Message documentation (Message documentation)

Status & tagging log