/** * End a form, receives the HTML output with an onclick action */ public function test_end_form_WITH_onclick() { Yoast_GA_Admin_Form::create_form('phpunit'); $output = null; $output .= '<div class="ga-form ga-form-input">'; $output .= '<input type="submit" name="ga-form-submit" value="Save changes" class="button button-primary ga-form-submit" id="yoast-ga-form-submit-phpunit" onclick="test();" />'; $output .= '</div></form>'; $this->assertEquals(Yoast_GA_Admin_Form::end_form('Save changes', 'submit', 'test();'), $output); }
<?php do_action('yst_ga_custom_tabs-content'); ?> <div id="debugmode" class="gatab"> <?php echo '<h2>' . __('Debug', 'google-analytics-for-wordpress') . '</h2>'; echo '<div id="ga-promote">'; echo '<p class="ga-topdescription">' . __('If you want to confirm that tracking on your blog is working as it should, enable this option and check the console of your browser. Be absolutely sure to disable debugging afterwards, as it is slower than normal tracking.', 'google-analytics-for-wordpress') . '</p>'; echo '<p class="ga-topdescription">' . __('<strong>Note</strong> the debugging is only loaded for administrators.', 'google-analytics-for-wordpress') . '</p>'; echo '</div>'; echo Yoast_GA_Admin_Form::input('checkbox', __('Enable debug mode', 'google-analytics-for-wordpress'), 'debug_mode'); ?> </div> </div> <?php echo Yoast_GA_Admin_Form::end_form(__('Save changes', 'google-analytics-for-wordpress'), 'settings', 'yst_closepopupwindow();'); echo $yoast_ga_admin->content_footer(); ?> <script type="text/javascript"> jQuery(document).ready( function () { jQuery('#yoast-ga-form-select-settings-analytics_profile').chosen({ group_search: true }); jQuery('#yoast-ga-form-select-settings-ignore_users').chosen({placeholder_text_multiple: '<?php echo __('Select the users to ignore', 'google-analytics-for-wordpress'); ?> '}); } ); </script>
<?php do_action('yst_ga_custom_tabs-content'); ?> <div id="debugmode" class="gatab"> <?php echo '<h2>' . __('Debug', 'google-analytics-for-wordpress') . '</h2>'; echo '<div id="ga-promote">'; echo '<p class="ga-topdescription">' . __('If you want to confirm that tracking on your blog is working as it should, enable this option and check the console of your browser. Be absolutely sure to disable debugging afterwards, as it is slower than normal tracking.', 'google-analytics-for-wordpress') . '</p>'; echo '<p class="ga-topdescription">' . __('<strong>Note</strong> the debugging is only loaded for administrators.', 'google-analytics-for-wordpress') . '</p>'; echo '</div>'; echo Yoast_GA_Admin_Form::input('checkbox', __('Enable debug mode', 'google-analytics-for-wordpress'), 'debug_mode'); ?> </div> </div> <?php echo Yoast_GA_Admin_Form::end_form('Save changes', 'settings'); echo $yoast_ga_admin->content_footer(); ?> <script type="text/javascript"> jQuery(document).ready( function () { jQuery('#yoast-ga-form-select-settings-analytics_profile').chosen({ group_search: true }); jQuery('#yoast-ga-form-select-settings-ignore_users').chosen({placeholder_text_multiple: '<?php echo __('Select the users to ignore', 'google-analytics-for-wordpress'); ?> '}); } ); </script>