Skip to content
1 change: 1 addition & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"**/web-components/**",
"**/frm_admin.css",
"**/frm-settings-components.css",
"**/frm-legacy-paypal.css",
"**/font_icons.css",
"**/frm_testing_mode.css",
"**/welcome-tour.css",
Expand Down
22 changes: 22 additions & 0 deletions classes/controllers/FrmAppController.php
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,7 @@ public static function admin_js() {
}

do_action( 'frm_enqueue_builder_scripts' );
self::maybe_enqueue_legacy_paypal_assets();
self::include_upgrade_overlay();
self::include_info_overlay();
} elseif ( FrmAppHelper::is_view_builder_page() ) {
Expand Down Expand Up @@ -936,6 +937,27 @@ public static function admin_enqueue_scripts() {
FrmUsageController::load_scripts();
}

/**
* Enqueue legacy PayPal action settings styles when the PayPal add-on is active.
*
* @since x.x
*
* @return void
*/
private static function maybe_enqueue_legacy_paypal_assets() {
if ( ! FrmAppHelper::is_form_builder_page() || ! class_exists( 'FrmPaymentsController' ) ) {
return;
}

wp_register_style(
'formidable-legacy-paypal',
FrmAppHelper::plugin_url() . '/css/admin/frm-legacy-paypal.css',
array( 'formidable-admin' ),
FrmAppHelper::plugin_version()
);
wp_enqueue_style( 'formidable-legacy-paypal' );
}

/**
* Enqueue required assets for the Legacy Views editor (Views v4.x).
*
Expand Down
1 change: 1 addition & 0 deletions css/admin/frm-legacy-paypal.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion css/frm_admin.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/frm_testing_mode.css

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions resources/scss/admin/components/button/_button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
.frm-button-secondary,
.wp-core-ui .button-secondary.frm-button-secondary,
.wp-core-ui .button.frm-button-secondary,
.frm_single_paypal_settings .frm_add_pp_logic.button, /* Backward compat for legacy PayPal add-on markup, @since x.x */
.frm-white-body .frm-search .button,
.frm-white-body .search-box .button, /* Views */
.frm-white-body .tablenav .button,
Expand Down Expand Up @@ -230,7 +231,8 @@
.wp-core-ui .button-secondary.frm-button-secondary,
.wp-core-ui .button.frm-button-secondary,
.frm-white-body .frm-button-secondary,
.frm-button-secondary {
.frm-button-secondary,
.frm_single_paypal_settings .frm_add_pp_logic.button /* Backward compat for legacy PayPal add-on markup, @since x.x */ {
color: var(--grey-800);
border-color: var(--grey-300);
background-color: #fff;
Expand All @@ -255,7 +257,10 @@
.wp-core-ui.frm-white-body .button-secondary:focus,
.wp-core-ui.frm-white-body .tablenav .button:hover,
.frm_wrap .preview > .button:hover,
.frm-white-body #search-submit:hover {
.frm-white-body #search-submit:hover,
.frm_single_paypal_settings .frm_add_pp_logic.button:hover, /* Backward compat for legacy PayPal add-on markup, @since x.x */
.frm_single_paypal_settings .frm_add_pp_logic.button:focus,
.frm_single_paypal_settings .frm_add_pp_logic.button:active {
border-color: var(--grey-300) !important;
color: var(--grey-800);
background: var(--grey-50) !important;
Expand Down
44 changes: 44 additions & 0 deletions resources/scss/admin/frm-legacy-paypal.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Legacy PayPal action settings styles. Removable after the PayPal add-on is officially no longer supported.
.frm_single_paypal_settings {
Comment thread
shervElmi marked this conversation as resolved.

.form-table {
margin: 0;
}

h3 {
display: flex;
align-items: center;
gap: var(--gap-xs);
margin-top: var(--gap-xs);
margin-bottom: var(--gap-md);

.frm_help {
display: inline-flex;
align-items: center;
}
}

label[for^="paypal_stop_email"] {
display: inline-flex;
align-items: center;
gap: var(--gap-xs);
}

.frm_toggle_pp_opts {
font-weight: 600;
cursor: pointer;
}

p[id^="frmpp_after_pay_"] {
margin-bottom: var(--gap-sm);
}

.frmpp_after_pay_row .frm_remove_tag {
margin-right: var(--gap-2xs);
}

// Hide "After Payment" table if no rows remain.
#postcustomstuff.frmpp_after_pay_rows:not(:has(.frmpp_after_pay_row)) {
display: none !important;
}
}
1 change: 1 addition & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const entries = {
scss: {
frm_admin: './resources/scss/admin/frm_admin.scss',
'admin/frm-settings-components': './resources/scss/admin/frm-settings-components.scss',
'admin/frm-legacy-paypal': './resources/scss/admin/frm-legacy-paypal.scss',
font_icons: './resources/scss/font_icons.scss',
// Dynamically generated web component SCSS files
frm_testing_mode: './resources/scss/test-mode/frm_testing_mode.scss',
Expand Down
Loading