Changeset 817651
- Timestamp:
- 12/09/2013 07:27:19 PM (12 years ago)
- Location:
- ngp-forms/trunk
- Files:
-
- 3 edited
-
ngp-donation-frontend.php (modified) (5 diffs)
-
ngp-forms.php (modified) (3 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ngp-forms/trunk/ngp-donation-frontend.php
r723993 r817651 92 92 */ 93 93 function __construct() { 94 $this->employment_info = trim(get_option('ngp_employment_info', '')); 94 95 $this->api_key = get_option('ngp_api_key', ''); 95 96 $this->url_specified = get_option('ngp_secure_url', ''); … … 160 161 ) 161 162 ), 162 'Credit card' => array(163 'Credit Card' => array( 163 164 '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>', 164 165 array( … … 535 536 foreach($this->fieldsets as $fieldset_name => $fields) { 536 537 $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'])) { 538 544 $form_fields .= $fields['html_intro']; 539 545 unset($fields['html_intro']); … … 822 828 <div class="submit"> 823 829 <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 .= ' 825 834 <p class="ngp-small-print">By clicking on the "Donate now" button above you confirm that the following statements are true and accurate:</small> 826 835 <ol class="ngp-small-print"> … … 832 841 </ol> 833 842 '; 834 $return .= '<p class="addtl-donation-footer-info">'.str_replace("\r\n", '<br />', str_replace('<i>', '<i>', str_replace('</i>', '</i>', str_replace('<u>', '<u>', str_replace('</u>', '</u>', str_replace('<b>', '<b>', str_replace('</b>', '</b>', get_option('ngp_footer_info')))))))).'</p>'; 843 } else { 844 $return .= '<p class="addtl-donation-footer-info">'.str_replace("\r\n", '<br />', str_replace('<i>', '<i>', str_replace('</i>', '</i>', str_replace('<u>', '<u>', str_replace('</u>', '</u>', str_replace('<b>', '<b>', str_replace('</b>', '</b>', $donation_footer_info))))))).'</p>'; 845 } 835 846 $return .= '</form>'; 836 847 -
ngp-forms/trunk/ngp-forms.php
r742326 r817651 4 4 Plugin URI: http://revolutionmessaging.com/code/ngp-forms/ 5 5 Description: Integrate NGP donation, volunteer, & signup forms with your site 6 Version: 1.2. 46 Version: 1.2.5 7 7 Author: Revolution Messaging 8 8 Author URI: http://revolutionmessaging.com … … 101 101 add_settings_field( 102 102 '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>', 104 104 'ngp_footer_info', 105 105 'general' 106 106 ); 107 107 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 ); 108 115 register_setting('general', 'ngp_coo_api_key', 'esc_attr'); 109 116 add_settings_field( … … 162 169 } 163 170 171 function 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 164 176 function 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>'); 166 185 echo '<textarea style="width:300px;height:150px;" id="ngp_footer_info" name="ngp_footer_info">'.$value.'</textarea>'; 167 186 } -
ngp-forms/trunk/readme.txt
r742326 r817651 125 125 == Changelog == 126 126 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 127 133 = 1.2.4 = 128 134 * Another Alert.
Note: See TracChangeset
for help on using the changeset viewer.