http://www.mediawiki.org/wiki/Special:Code/MediaWiki/73411

Revision: 73411
Author:   awjrichards
Date:     2010-09-20 20:52:22 +0000 (Mon, 20 Sep 2010)

Log Message:
-----------
Updated two column letter form to not include comment fields in hidden fields 
since they will be set by the user in the form

Modified Paths:
--------------
    
trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumnLetter.php

Modified: 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumnLetter.php
===================================================================
--- 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumnLetter.php 
    2010-09-20 20:42:13 UTC (rev 73410)
+++ 
trunk/extensions/DonationInterface/payflowpro_gateway/forms/TwoColumnLetter.php 
    2010-09-20 20:52:22 UTC (rev 73411)
@@ -8,6 +8,8 @@
 
                 // add form-specific css
                 $wgOut->addExtensionStyle( $wgScriptPath . 
'/extensions/DonationInterface/payflowpro_gateway/forms/css/TwoColumnLetter.css');
+       
+               $this->updateHiddenFields();
         }
 
         public function generateFormBody() {
@@ -73,4 +75,16 @@
                $form .= Xml::closeElement( 'div' );    
                return $form;
        }
+
+       /**
+        * Update hidden fields to not set any comment-related fields
+        */
+       public function updateHiddenFields() {
+               $hidden_fields = $this->getHiddenFields();
+               $not_needed = array( 'comment-option', 'email', 'comment' );
+               foreach ( $not_needed as $field ) {
+                       unset( $hidden_fields[ $field ] );
+               }
+               $this->setHiddenFields( $hidden_fields );
+       }
 }



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to