Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoStepTwoColumn.php |
— | — | @@ -14,8 +14,6 @@ |
15 | 15 | public function loadPlaceholders() { |
16 | 16 | global $wgOut; |
17 | 17 | $wgOut->addModules( 'pfp.form.core.placeholders' ); |
18 | | - //$placeholder_resources = '<script type="text/javascript">mw.loader.load("pfp.form.core.placeholders");</script>'; |
19 | | - //$wgOut->addHtml( $placeholder_resources ); |
20 | 18 | } |
21 | 19 | |
22 | 20 | /** |
Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoStepTwoColumnLetter3.php |
— | — | @@ -8,7 +8,7 @@ |
9 | 9 | if ( !strlen( $this->getStylePath() ) ) { |
10 | 10 | $this->setStylePath( $wgScriptPath . '/extensions/DonationInterface/payflowpro_gateway/forms/css/TwoStepTwoColumnLetter3.css' ); |
11 | 11 | } |
12 | | - |
| 12 | + $this->loadvalidateJs(); |
13 | 13 | parent::__construct( $form_data, $form_errors ); |
14 | 14 | } |
15 | 15 | |
— | — | @@ -23,40 +23,34 @@ |
24 | 24 | $email = wfMsg( 'payflowpro_gateway-donor-email' ); |
25 | 25 | $js = <<<EOT |
26 | 26 | <script type="text/javascript"> |
27 | | -//function loadPlaceholders() { |
28 | | -window.loadPlaceholders = function() { |
29 | | - var fname = document.getElementById('fname'); |
30 | | - var lname = document.getElementById('lname'); |
31 | | - var street = document.getElementById('street'); |
32 | | - var city = document.getElementById('city'); |
33 | | - var zip = document.getElementById('zip'); |
34 | | - var email = document.getElementById('emailAdd'); |
35 | | - if (fname.value == '') { |
36 | | - fname.style.color = '#999999'; |
37 | | - fname.value = '$first'; |
38 | | - } |
39 | | - if (lname.value == '') { |
40 | | - lname.style.color = '#999999'; |
41 | | - lname.value = '$last'; |
42 | | - } |
43 | | - if (street.value == '') { |
44 | | - street.style.color = '#999999'; |
45 | | - street.value = '$street'; |
46 | | - } |
47 | | - if (city.value == '') { |
48 | | - city.style.color = '#999999'; |
49 | | - city.value = '$city'; |
50 | | - } |
51 | | - if (zip.value == '') { |
52 | | - zip.style.color = '#999999'; |
53 | | - zip.value = '$zip'; |
54 | | - } |
55 | | - if (email.value == '') { |
56 | | - email.style.color = '#999999'; |
57 | | - email.value = '$email'; |
58 | | - } |
59 | | -} |
60 | | -addEvent( window, 'load', loadPlaceholders ); |
| 27 | +( function( $ ) { |
| 28 | + $(document).ready(function() { |
| 29 | + if ( $( '#fname' ).val() == '') { |
| 30 | + $( '#fname' ).css( 'color', '#999999' ); |
| 31 | + $( '#fname' ).val( '$first' ); |
| 32 | + } |
| 33 | + if ( $( '#lname' ).val() == '') { |
| 34 | + $( '#lname' ).css( 'color', '#999999' ); |
| 35 | + $( '#lname' ).val( '$last' ); |
| 36 | + } |
| 37 | + if ( $( '#street' ).val() == '') { |
| 38 | + $( '#street' ).css( 'color', '#999999' ); |
| 39 | + $( '#street' ).val( '$street' ); |
| 40 | + } |
| 41 | + if ( $( '#city' ).val() == '' ) { |
| 42 | + $( '#city' ).css( 'color', '#999999' ); |
| 43 | + $( '#city' ).val( '$city' ); |
| 44 | + } |
| 45 | + if ( $( '#zip' ).val() =='') { |
| 46 | + $( '#zip' ).css( 'color', '#999999' ); |
| 47 | + $( '#zip' ).val( '$zip' ); |
| 48 | + } |
| 49 | + if ( $( '#emailAdd' ).val() == '') { |
| 50 | + $( '#emailAdd' ).css( 'color', '#999999' ); |
| 51 | + $( '#emailAdd' ).val( '$email' ); |
| 52 | + } |
| 53 | + }); |
| 54 | +})(jQuery); |
61 | 55 | |
62 | 56 | //function formCheck( ccform ) { |
63 | 57 | window.formCheck = function( ccform ) { |