WordPress.org

Plugin Directory

Changeset 488762


Ignore:
Timestamp:
01/12/12 15:16:51 (6 years ago)
Author:
WinWithWP
Message:

Add legal compliance support. Version bump.

Location:
piryx-in-wordpress/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • piryx-in-wordpress/trunk/piryx.php

    r458710 r488762  
    55Description: Allows you to embed a Piryx form into a post or page 
    66Author: Win With Wordpress 
    7 Version: 1.0.1.4 
     7Version: 1.0.1.5 
    88Requires at least: 3.0 
    99Author URI: http://www.winwithwp.com 
  • piryx-in-wordpress/trunk/readme.txt

    r454022 r488762  
    5959== Changelog == 
    6060 
     61= 1.0.1.5 =  
     62* Add legal compliance support 
     63 
    6164= 1.0.0.8 = 
    6265* Multiple bug fixes 
  • piryx-in-wordpress/trunk/validate.php

    r406215 r488762  
    125125                } 
    126126        } 
     127 
     128        if ( ! isset( $legalCompliance ) ) 
     129            $this->errors->add( 'legalCompliance', __( 'You must agree to the legal compliance.', 'piryx' ), 'legalCompliance' ); 
    127130         
    128131        //Validate recurring 
  • piryx-in-wordpress/trunk/views.php

    r458710 r488762  
    7979        $this->display_contribution_types(); 
    8080        $this->display_error( 'contribution_type' ); 
     81        $this->display_legal_compliance(); 
    8182        ?> 
    8283        <div class="buttons"> 
     
    279280        <?php 
    280281    } //end display_sharing 
     282 
     283    private function display_legal_compliance() { 
     284        $options = get_option('piryx_options'); 
     285        $campaign_details = html_entity_decode( $this->campaign_details, ENT_QUOTES, 'UTF-8' ); 
     286        $xml = new SimpleXMLElement($campaign_details);  
     287 
     288        foreach( $xml->Page->LegalCompliance->children() as $child ) 
     289            $found_children = true; 
     290        if ( ! $found_children ) { 
     291            ?><input type="hidden" value="yes" name="legalCompliance"><?php 
     292            return; 
     293        } 
     294        // if($xml->Page->LegalCompliance->count() ) 
     295            // echo "yes"; 
     296        ?> 
     297        <div id="legal-compliance" class="legal-compliance section"> 
     298        <h2>Legal Compliance</h2>  
     299        <input type="checkbox" value="yes" id="legalCompliance" name="legalCompliance" <?php checked($_POST['legalCompliance'], "yes"); ?>><span title="Required" class="req">Required</span> I confirm that my donation meets the following requirements: <?php $this->display_error('legalCompliance');?> 
     300        <div class="text">  
     301        <?php echo $xml->Page->LegalCompliance->asXML(); ?> 
     302        </div> 
     303        </div> <?php 
     304    } 
    281305} 
Note: See TracChangeset for help on using the changeset viewer.