Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
213 changes: 11 additions & 202 deletions classes/controllers/FrmAddonsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -866,213 +866,22 @@ protected static function set_addon_status( &$addon ) {
}

/**
* Handle when the Upgrade submenu item is clicked.
*
* @since x.x This function was changed to no longer render a page, redirecting directly to the upgrade page instead.
*
* @return void
*/
public static function upgrade_to_pro() {
FrmAppHelper::include_svg();

$link_parts = array(
'medium' => 'upgrade',
'content' => 'button',
);

$features = array(
'Display Entries' => array(
array(
'label' => 'Display form data with virtually limitless views',
'link' => array(
'content' => 'views',
'param' => 'views-display-form-data',
),
'lite' => false,
),
array(
'label' => 'Generate graphs and stats based on your submitted data',
'link' => array(
'content' => 'graphs',
'param' => 'statistics-graphs-wordpress-forms',
),
'lite' => false,
),
),
'Entry Management' => array(
array(
'label' => 'Import entries from a CSV',
'link' => array(
'content' => 'import-entries',
'param' => 'importing-exporting-wordpress-forms',
),
'lite' => false,
),
array(
'label' => 'Logged-in users can save drafts and return later',
'link' => array(
'content' => 'save-drafts',
'param' => 'save-drafts-wordpress-form',
),
'lite' => false,
),
array(
'label' => 'Flexibly and powerfully view, edit, and delete entries from anywhere on your site',
'link' => array(
'content' => 'front-edit',
'param' => 'wordpress-front-end-editing',
),
'lite' => false,
),
array(
'label' => 'View form submissions from the back-end',
'lite' => true,
),
array(
'label' => 'Export your entries to a CSV',
'lite' => true,
),
),
'Form Building' => array(
array(
'label' => 'Save a calculated value into a field',
'link' => array(
'content' => 'calculations',
'param' => 'field-calculations-wordpress-form',
),
'lite' => false,
),
array(
'label' => 'Allow multiple file uploads',
'link' => array(
'content' => 'file-uploads',
'param' => 'wordpress-multi-file-upload-fields',
),
'lite' => false,
),
array(
'label' => 'Repeat sections of fields',
'link' => array(
'content' => 'repeaters',
'param' => 'repeatable-sections-forms',
),
'lite' => false,
),
array(
'label' => 'Hide and show fields conditionally based on other fields or the user\'s role',
'link' => array(
'content' => 'conditional-logic',
'param' => 'conditional-logic-wordpress-forms',
),
'lite' => false,
),
array(
'label' => 'Confirmation fields',
'link' => array(
'content' => 'confirmation-fields',
'param' => 'confirmation-fields-wordpress-forms',
),
'lite' => false,
),
array(
'label' => 'Multi-paged forms',
'link' => array(
'content' => 'page-breaks',
'param' => 'wordpress-multi-page-forms',
),
'lite' => false,
),
array(
'label' => 'Include section headings, page breaks, rich text, dates, times, scales, star ratings, sliders, toggles, dynamic fields populated from other forms, passwords, and tags in advanced forms.',
'lite' => false,
),
array(
'label' => 'Include text, email, url, paragraph text, radio, checkbox, dropdown fields, hidden fields, user ID fields, and HTML blocks in your form.',
'lite' => true,
),
array(
'label' => 'Drag & Drop Form building',
'link' => array(
'content' => 'drag-drop',
'param' => 'drag-drop-forms',
),
'lite' => true,
),
array(
'label' => 'Create forms from Templates',
'link' => array(
'content' => 'form-templates',
'param' => 'wordpress-form-templates',
),
'lite' => true,
),
array(
'label' => 'Import and export forms with XML',
'link' => array(
'content' => 'import',
'param' => 'importing-exporting-wordpress-forms',
),
'lite' => true,
),
array(
'label' => 'Use input placeholder text in your fields that clear when typing starts.',
'lite' => true,
),
),
'Form Actions' => array(
array(
'label' => 'Conditionally send your email notifications based on values in your form',
'link' => array(
'content' => 'conditional-emails',
),
'lite' => false,
),
wp_redirect(
Comment thread
Crabcyborg marked this conversation as resolved.
FrmAppHelper::admin_upgrade_link(
array(
'label' => 'Create and edit WordPress posts or custom posts from the front-end',
'link' => array(
'content' => 'create-posts',
'param' => 'create-posts-pages-wordpress-forms',
),
'lite' => false,
),
array(
'label' => 'Send multiple emails and autoresponders',
'link' => array(
'content' => 'multiple-emails',
'param' => 'virtually-unlimited-emails',
),
'lite' => true,
),
),
'Form Appearance' => array(
array(
'label' => 'Create Multiple styles for different forms',
'link' => array(
'content' => 'multiple-styles',
'param' => 'wordpress-visual-form-styler',
),
'lite' => false,
),
array(
'label' => 'Customizable layout with CSS classes',
'link' => array(
'content' => 'form-layout',
'param' => 'wordpress-mobile-friendly-forms',
),
'lite' => true,
),
array(
'label' => 'Customize the HTML for your forms',
'link' => array(
'content' => 'custom-html',
'param' => 'customizable-html-wordpress-form',
),
'lite' => true,
),
array(
'label' => 'Style your form with the Visual Form Styler',
'lite' => true,
),
),
'medium' => 'upgrade',
'content' => 'submenu-upgrade',
)
)
);

include FrmAppHelper::plugin_path() . '/classes/views/addons/upgrade_to_pro.php';
die();
}

/**
Expand Down
1 change: 0 additions & 1 deletion classes/controllers/FrmAppController.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ private static function is_white_page() {
'formidable-entries',
'formidable-views',
'formidable-views-editor',
'formidable-pro-upgrade',
'formidable-addons',
'formidable-import',
'formidable-settings',
Expand Down
86 changes: 1 addition & 85 deletions classes/views/addons/upgrade_to_pro.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,88 +2,4 @@
if ( ! defined( 'ABSPATH' ) ) {
die( 'You are not allowed to call this page directly.' );
}
?>
<div class="frm_wrap wrap upgrade_to_pro frm-fields">
<h1 class="frm_pro_heading">
<img width="265" src="<?php echo esc_url( FrmAppHelper::plugin_url() ); ?>/images/logo.png" alt="Upgrade to Pro" />
<span class="alignright">Take on bigger projects, earn more clients and grow your business.<br/>
<a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( $link_parts ) ); ?>" target="_blank">Upgrade to Pro</a>.</span>
<span class="clear"></span>
</h1>

<div class="clear"></div>

<p>Are you outgrowing your basic forms? You can add a ton more field types and features, create advanced forms, and even build form-based solutions in no time at all.</p>
<p>Are you currently collecting data offline? Streamline your business by using your forms to get online. Whether you need surveys, polls, client contracts, mortgage calculators, or directories, we've got you covered. Save time by allowing clients to return and make changes to their own submissions, or let them contribute content to your site. Generate more leads by adding headings and page breaks, only showing the fields you need, and letting your clients repeat a section of fields as many times as they need.</p>
<p>Projects that once seemed impossible are within your reach with Pro. That project you’ve been dreaming of pursuing? Chances are <strong>Formidable Pro can handle it</strong>.</p><br/>


<p class="frmcenter">
<a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( $link_parts ) ); ?>" class="button-primary frm-button-primary frm_large" target="_blank">
<?php esc_html_e( 'Get Started Now', 'formidable' ); ?>
</a>
</p>
<br/>

<?php do_action( 'frm_upgrade_page' ); ?>

<table class="widefat">
<thead>
<tr>
<th style="width:60%;border:none"></th>
<th class="frmcenter"><h3>Lite</h3></th>
<th class="frmcenter"><h3>Pro</h3></th>
</tr>
</thead>
<tbody>
<?php foreach ( $features as $name => $group ) { ?>
<tr><th colspan="3" class="frm_table_break"><?php echo esc_html( $name ); ?></th></tr>
<?php foreach ( $group as $feature ) { ?>
<tr>
<th>
<?php
if ( isset( $feature['link'] ) ) {
$feature['link']['medium'] = 'upgrade';
?>
<a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( $feature['link'] ) ); ?>" target="_blank">
<?php echo esc_html( $feature['label'] ); ?>
</a>
<?php
} else {
echo esc_html( $feature['label'] );
}
?>
</th>
<td class="<?php echo esc_attr( $feature['lite'] ? 'frm-checked' : '' ); ?> frmcenter">
<?php if ( $feature['lite'] ) { ?>
<span class="frm-yes">
<?php FrmAppHelper::icon_by_class( 'frmfont frm_checkmark_icon' ); ?>
</span>
<?php } else { ?>
<span class="frm-nope">
<?php FrmAppHelper::icon_by_class( 'frmfont frm_x_icon' ); ?>
</span>
<?php } ?>
</td>
<td class="<?php echo esc_attr( 'frm-checked' ); ?> frmcenter">
<span class="frm-yes">
<?php FrmAppHelper::icon_by_class( 'frmfont frm_checkmark_icon' ); ?>
</span>
</td>
</tr>
<?php
}//end foreach
?>
<?php
}//end foreach
?>
</tbody>
</table>

<br/>
<p class="frmcenter">
<a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( $link_parts ) ); ?>" class="button-primary frm-button-primary frm_large" target="_blank">
<?php esc_html_e( 'Get Started Now', 'formidable' ); ?>
</a>
</p>
</div>
_deprecated_file( esc_html( basename( __FILE__ ) ), 'x.x' );
1 change: 0 additions & 1 deletion css/frm_admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ body.frm-white-body:not(.frm-full-screen) .mce-fullscreen {
border: none;
}

body.formidable_page_formidable-pro-upgrade,
body.post-type-frm_display.edit-php,
body.frm-white-body {
background: #fff;
Expand Down
12 changes: 0 additions & 12 deletions tests/cypress/e2e/admin-a11y.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,18 +103,6 @@ describe('Run some accessibility tests', function() {
cy.checkA11y();
});

it('Check the upgrade page is accessible', () => {
cy.visit('/wp-admin/admin.php?page=formidable-pro-upgrade');
cy.injectAxe();
configureAxeWithIgnoredRuleset([
...baselineRules,
{ id: 'empty-table-header', enabled: false },
{ id: 'heading-order', enabled: false }

]);
cy.checkA11y();
});

it('Check the SMTP page is accessible', () => {
cy.visit('/wp-admin/admin.php?page=formidable-smtp');
cy.injectAxe();
Expand Down