Plugin Directory

Changeset 817651


Ignore:
Timestamp:
12/09/2013 07:27:19 PM (12 years ago)
Author:
signalfade
Message:

1.2.5

Location:
ngp-forms/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • ngp-forms/trunk/ngp-donation-frontend.php

    r723993 r817651  
    9292     */
    9393    function __construct() {
     94        $this->employment_info = trim(get_option('ngp_employment_info', ''));
    9495        $this->api_key = get_option('ngp_api_key', '');
    9596        $this->url_specified = get_option('ngp_secure_url', '');
     
    160161                )
    161162            ),
    162             'Credit card' => array(
     163            'Credit Card' => array(
    163164                'html_intro' => '<p id="accepted-cards" style="margin: 0pt 0pt -5px; background: url(/wp-content/plugins/'.plugin_basename(dirname(__FILE__)).'/credit-card-logos.png) no-repeat scroll 0% 0% transparent; text-indent: -900em; width: 211px; height: 34px;">We accept Visa, Mastercard, American Express and Discover cards.</p>',
    164165                array(
     
    535536        foreach($this->fieldsets as $fieldset_name => $fields) {
    536537            $form_fields .= '<fieldset><legend>'.$fieldset_name.'</legend>';
    537             if(isset($fields['html_intro'])) {
     538            if($fieldset_name=='Employment' && $this->employment_info!='') {
     539                $form_fields .= '<p>'.$this->employment_info.'</p>';
     540                if(isset($fields['html_intro'])) {
     541                    unset($fields['html_intro']);
     542                }
     543            } else if(isset($fields['html_intro'])) {
    538544                $form_fields .= $fields['html_intro'];
    539545                unset($fields['html_intro']);
     
    822828                <div class="submit">
    823829                    <input type="submit" value="Donate Now" />
    824                 </div>
     830                </div>';
     831            $donation_footer_info = trim(get_option('ngp_footer_info', ''));
     832            if(empty($donation_footer_info)) {
     833                $return .= '
    825834                <p class="ngp-small-print">By clicking on the "Donate now" button above you confirm that the following statements are true and accurate:</small>
    826835                <ol class="ngp-small-print">
     
    832841                </ol>
    833842                ';
    834             $return .= '<p class="addtl-donation-footer-info">'.str_replace("\r\n", '<br />', str_replace('&lt;i&gt;', '<i>', str_replace('&lt;/i&gt;', '</i>', str_replace('&lt;u&gt;', '<u>', str_replace('&lt;/u&gt;', '</u>', str_replace('&lt;b&gt;', '<b>', str_replace('&lt;/b&gt;', '</b>', get_option('ngp_footer_info')))))))).'</p>';
     843            } else {
     844                $return .= '<p class="addtl-donation-footer-info">'.str_replace("\r\n", '<br />', str_replace('&lt;i&gt;', '<i>', str_replace('&lt;/i&gt;', '</i>', str_replace('&lt;u&gt;', '<u>', str_replace('&lt;/u&gt;', '</u>', str_replace('&lt;b&gt;', '<b>', str_replace('&lt;/b&gt;', '</b>', $donation_footer_info))))))).'</p>';
     845            }
    835846            $return .= '</form>';
    836847           
  • ngp-forms/trunk/ngp-forms.php

    r742326 r817651  
    44    Plugin URI: http://revolutionmessaging.com/code/ngp-forms/
    55    Description: Integrate NGP donation, volunteer, & signup forms with your site
    6     Version: 1.2.4
     6    Version: 1.2.5
    77    Author: Revolution Messaging
    88    Author URI: http://revolutionmessaging.com
     
    101101    add_settings_field(
    102102        'ngp_footer_info',
    103         '<label for="ngp_footer_info">'.__('Addt\'l Information for Donation Footer' , 'ngp_footer_info' ).'</label>',
     103        '<label for="ngp_footer_info">'.__('Compliance info' , 'ngp_footer_info' ).'</label>',
    104104        'ngp_footer_info',
    105105        'general'
    106106    );
    107107
     108    register_setting('general', 'ngp_employment_info', 'esc_attr');
     109    add_settings_field(
     110        'ngp_employment_info',
     111        '<label for="ngp_employment_info">'.__('Employment info' , 'ngp_employment_info' ).'</label>',
     112        'ngp_employment_info',
     113        'general'
     114    );
    108115    register_setting('general', 'ngp_coo_api_key', 'esc_attr');
    109116    add_settings_field(
     
    162169}
    163170
     171function ngp_employment_info() {
     172    $value = get_option('ngp_employment_info', '');
     173    echo '<textarea style="width:300px;height:150px;" id="ngp_employment_info" name="ngp_employment_info">'.$value.'</textarea>';
     174}
     175
    164176function ngp_footer_info() {
    165     $value = get_option('ngp_footer_info', '');
     177    $value = get_option('ngp_footer_info', '<p class="ngp-small-print">By clicking on the "Donate now" button above you confirm that the following statements are true and accurate:</small>
     178<ol class="ngp-small-print">
     179<li>I am a United States citizen or a lawfully admitted permanent resident of the United States.</li>
     180<li>This contribution is not made from the general treasury funds of a corporation, labor organization or national bank.</li>
     181<li>This contribution is not made from the treasury of an entity or person who is a federal contractor.</li>
     182<li>This contribution is not made from the funds of a political action committee.</li>
     183<li>The funds I am donating are not being provided to me by another person or entity for the purpose of making this contribution.</li>
     184</ol>');
    166185    echo '<textarea style="width:300px;height:150px;" id="ngp_footer_info" name="ngp_footer_info">'.$value.'</textarea>';
    167186}
  • ngp-forms/trunk/readme.txt

    r742326 r817651  
    125125== Changelog ==
    126126
     127
     128= 1.2.4 =
     129* Employment info can be specialized.
     130* Addt'l footer info has become (and can replace) compliance info. Accepts simplified HTML (i, b, u) and respects line-breaks.
     131* Credit Card legend now ucwords.
     132
    127133= 1.2.4 =
    128134* Another Alert.
Note: See TracChangeset for help on using the changeset viewer.