Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump body-parser and express #761

Closed
wants to merge 2 commits into from
Closed
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
12 changes: 12 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
= 3.3.3 - 19/09/2024 =
* Fix - Select all option not working in checkbox field.
* Fix - Continue setup wizard button not working properly.
* Fix - Conflict with lost password when WooCommerce My Account Page selected in user registration settings.
* Tweak - Added skip setup button in continue setup wizard notice.
* Tweak - Changed feature item label from Pro to Personal to avoid confusion.
* Tweak - Install pages notice display only if continue setup wizard notice is skipped.

= 3.3.2.1 - 11/09/2024 =
* Fix - Tooltip icon is not being displayed in Global Settings.

Expand Down Expand Up @@ -31,7 +39,11 @@
* Dev - Compatibility for Authorize.net Addon.
* Dev - Compatibility for SMS verification.
* Dev - Add noreferer and noopener in all target blank anchor tags.
<<<<<<< HEAD
* Fix - Unable to publish form from draft status.
=======
* Fix - Unable to publish form from draft status.
>>>>>>> master
* Fix - Undefined variable $form_row_data.
* Fix - Disable default wordpress login not working.
* Fix - The email content translation issues with WPML plugin.
Expand Down
3 changes: 3 additions & 0 deletions assets/css/activation-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,6 @@
right: 0;
-webkit-transition: all .1s ease-in-out;
transition: all .1s ease-in-out; }

.wpb-content-layouts .icon-wpb-vc_user_registration {
background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTI3LjU4IDRhMjcuOSAyNy45IDAgMCAwLTUuMTcgNCAyNyAyNyAwIDAgMC00LjA5IDUuMDggMzMuMDYgMzMuMDYgMCAwIDEgMiA0LjY1QTIzLjc4IDIzLjc4IDAgMCAxIDI0IDEyLjE1VjE4YTggOCAwIDAgMS01Ljg5IDcuNzJsLS4yMS4wNWEyNyAyNyAwIDAgMC0xLjktOC4xNkEyNy45IDI3LjkgMCAwIDAgOS41OSA4YTI3LjkgMjcuOSAwIDAgMC01LjE3LTRMNCAzLjc3VjE4YTEyIDEyIDAgMCAwIDkuOTMgMTEuODJoLjE0YTExLjcyIDExLjcyIDAgMCAwIDMuODYgMGguMTRBMTIgMTIgMCAwIDAgMjggMThWMy43N3pNOCAxOHYtNS44NWEyMy44NiAyMy44NiAwIDAgMSA1Ljg5IDEzLjU3QTggOCAwIDAgMSA4IDE4em04LTE2YTMgMyAwIDEgMCAzIDMgMyAzIDAgMCAwLTMtM3oiLz48L3N2Zz4=") !important; }
3 changes: 3 additions & 0 deletions assets/css/activation.css
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,6 @@
left: 0;
-webkit-transition: all .1s ease-in-out;
transition: all .1s ease-in-out; }

.wpb-content-layouts .icon-wpb-vc_user_registration {
background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTI3LjU4IDRhMjcuOSAyNy45IDAgMCAwLTUuMTcgNCAyNyAyNyAwIDAgMC00LjA5IDUuMDggMzMuMDYgMzMuMDYgMCAwIDEgMiA0LjY1QTIzLjc4IDIzLjc4IDAgMCAxIDI0IDEyLjE1VjE4YTggOCAwIDAgMS01Ljg5IDcuNzJsLS4yMS4wNWEyNyAyNyAwIDAgMC0xLjktOC4xNkEyNy45IDI3LjkgMCAwIDAgOS41OSA4YTI3LjkgMjcuOSAwIDAgMC01LjE3LTRMNCAzLjc3VjE4YTEyIDEyIDAgMCAwIDkuOTMgMTEuODJoLjE0YTExLjcyIDExLjcyIDAgMCAwIDMuODYgMGguMTRBMTIgMTIgMCAwIDAgMjggMThWMy43N3pNOCAxOHYtNS44NWEyMy44NiAyMy44NiAwIDAgMSA1Ljg5IDEzLjU3QTggOCAwIDAgMSA4IDE4em04LTE2YTMgMyAwIDEgMCAzIDMgMyAzIDAgMCAwLTMtM3oiLz48L3N2Zz4=") !important; }
4 changes: 4 additions & 0 deletions assets/css/activation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,7 @@
}
}
}

.wpb-content-layouts .icon-wpb-vc_user_registration{
background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTI3LjU4IDRhMjcuOSAyNy45IDAgMCAwLTUuMTcgNCAyNyAyNyAwIDAgMC00LjA5IDUuMDggMzMuMDYgMzMuMDYgMCAwIDEgMiA0LjY1QTIzLjc4IDIzLjc4IDAgMCAxIDI0IDEyLjE1VjE4YTggOCAwIDAgMS01Ljg5IDcuNzJsLS4yMS4wNWEyNyAyNyAwIDAgMC0xLjktOC4xNkEyNy45IDI3LjkgMCAwIDAgOS41OSA4YTI3LjkgMjcuOSAwIDAgMC01LjE3LTRMNCAzLjc3VjE4YTEyIDEyIDAgMCAwIDkuOTMgMTEuODJoLjE0YTExLjcyIDExLjcyIDAgMCAwIDMuODYgMGguMTRBMTIgMTIgMCAwIDAgMjggMThWMy43N3pNOCAxOHYtNS44NWEyMy44NiAyMy44NiAwIDAgMSA1Ljg5IDEzLjU3QTggOCAwIDAgMSA4IDE4em04LTE2YTMgMyAwIDEgMCAzIDMgMyAzIDAgMCAwLTMtM3oiLz48L3N2Zz4=") !important;
}
6 changes: 3 additions & 3 deletions assets/js/admin/form-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -1826,9 +1826,9 @@
return each_value !== choice_value;
})
) {
general_setting_data["options"] =
option_values.push(choice_value);
general_setting_data["options"] = option_values;
general_setting_data["options"] =
option_values.push(choice_value);
general_setting_data["options"] = option_values;
}
} else {
if ("default_value" === $(this).attr("data-field")) {
Expand Down
5 changes: 3 additions & 2 deletions assets/js/admin/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -1077,6 +1077,7 @@
});
}

$(document).find(".wp-list-table").wrap("<div class='ur-list-table-wrapper'></div>");

$(document)
.find(".wp-list-table")
.wrap("<div class='ur-list-table-wrapper'></div>");
})(jQuery);
12 changes: 9 additions & 3 deletions assets/js/frontend/user-registration.js
Original file line number Diff line number Diff line change
Expand Up @@ -571,8 +571,12 @@
JSON.stringify(
checked_value
);
if ( "separate_shipping" === field.attr("data-id") ) {
formwise_data.value = field.val();
if (
"separate_shipping" ===
field.attr("data-id")
) {
formwise_data.value =
field.val();
}
} else {
formwise_data.value = "";
Expand Down Expand Up @@ -2540,14 +2544,16 @@

$('input[type="checkbox"]#checkall').on("click", function () {
var checkAll = $(this).attr("data-check");
$('[data-id = "' + checkAll + '" ]').prop(
$('[data-id = "' + checkAll + '[]" ]').prop(
"checked",
$(this).prop("checked")
);
});

$(".input-checkbox").on("change", function () {
var checkAll = $(this).attr("data-id");
checkAll = checkAll.replace("[]", "");

if ($(this).prop("checked") === false) {
$('[data-check = "' + checkAll + '" ]').prop("checked", false);
}
Expand Down
2 changes: 1 addition & 1 deletion assets/js/frontend/user-registration.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions includes/RestApi/controllers/version1/class-ur-modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ public static function ur_get_modules() {
}
$feature->link = $feature->link . '&utm_campaign=' . UR()->utm_campaign;
$feature->type = 'feature';
$feature->required_plan = __( 'Personal', 'user-registration' );
$features_lists[ $key ] = $feature;
}

Expand Down
2 changes: 0 additions & 2 deletions includes/admin/class-ur-admin-dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ public static function output() {
update_option( 'user_registration_first_time_activation_flag', false );
update_option( 'user_registration_onboarding_skipped', true );

error_log( print_r( $_REQUEST, true ) );

if ( isset( $_REQUEST['activeStep'] ) ) {
update_option( 'user_registration_onboarding_skipped_step', sanitize_text_field( wp_unslash( $_REQUEST['activeStep'] ) ) );
} else {
Expand Down
2 changes: 1 addition & 1 deletion includes/admin/class-ur-admin-welcome.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public static function setup_wizard_body() {
</div>

<div class="user-registration-skip-btn">
<a href="<?php echo esc_url_raw( admin_url() . 'admin.php?page=user-registration-dashboard&end-setup-wizard=' . true . '&activeStep=install_page' ); ?>">
<a href="<?php echo esc_url_raw( admin_url() . 'admin.php?page=user-registration-dashboard&end-setup-wizard=' . true . '&activeStep=install_pages' ); ?>">
<p style="color: gray; font-style:italic;"><?php esc_html_e( 'Skip to Dashboard', 'user-registration' ); ?> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-right" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M1 8a.5.5 0 0 1 .5-.5h11.793l-3.147-3.146a.5.5 0 0 1 .708-.708l4 4a.5.5 0 0 1 0 .708l-4 4a.5.5 0 0 1-.708-.708L13.293 8.5H1.5A.5.5 0 0 1 1 8z"/>
</svg></p>
Expand Down
40 changes: 29 additions & 11 deletions includes/admin/notifications/class-ur-admin-notices.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,22 @@ public static function init() {
*/
public static function user_registration_install_pages_notice() {

if ( get_option( 'user_registration_onboarding_skipped', false ) ) {
self::add_notice( 'continue_setup_wizard' );
}

if ( isset( $_POST['user_registration_myaccount_page_id'] ) ) { //phpcs:ignore.
$my_account_page = $_POST['user_registration_myaccount_page_id']; //phpcs:ignore.
} else {
$my_account_page = get_option( 'user_registration_myaccount_page_id', 0 );
}

if ( ! $my_account_page ) {
self::add_notice( 'install' );
if ( get_option( 'user_registration_onboarding_skipped', false ) ) {
self::add_notice( 'continue_setup_wizard' );
} elseif ( ! $my_account_page && ! get_option( 'user_registration_first_time_activation_flag', false ) ) {
if ( get_option( 'user_registration_install_pages_notice_removed', false ) ) {
self::remove_notice( 'install' );
} else {
self::add_notice( 'install' );
}
} else {
self::remove_notice( 'install' );
}

$matched = 0;
Expand Down Expand Up @@ -674,8 +678,13 @@ public static function hide_notices() {
self::remove_notice( $hide_notice );

// Remove the onboarding skipped checker if install notice is removed.
if ( 'install' === $hide_notice ) {
if ( 'continue_setup_wizard' === $hide_notice ) {
delete_option( 'user_registration_onboarding_skipped' );
delete_option( 'user_registration_onboarding_skipped_step' );
}

if ( 'install' === $hide_notice ) {
update_option( 'user_registration_install_pages_notice_removed', true );
}

/**
Expand Down Expand Up @@ -854,13 +863,22 @@ public static function continue_setup_wizard_notice() {
$onboarding_completed = true;

if ( ! $first_time_activation ) {
$onboard_skipped = get_option( 'user_registration_onboarding_skipped', false );
$onboard_skipped_step = get_option( 'user_registration_onboarding_skipped_step', false );
$onboard_skipped = get_option( 'user_registration_onboarding_skipped', false );
$onboard_skipped_step = get_option( 'user_registration_onboarding_skipped_step', false );
$registration_form_page_id = get_option( 'user_registration_registration_page_id', false );
$my_account_page_id = get_option( 'user_registration_myaccount_page_id', false );
$install_pages_done = ( $registration_form_page_id || $my_account_page_id ) ? true : false;
$onboard_skipped_step = 'install_page' === $onboard_skipped_step ? 'install_pages' : $onboard_skipped_step;

if ( ( 'install_pages' === $onboard_skipped_step ) && $install_pages_done ) {
$onboard_skipped_step .= '&installed';
}

if ( $onboard_skipped && $onboard_skipped_step ) {
/* translators: % s: continue wizard URL */
$onboarding_complete_text = sprintf( __( '<a href="%s" class="button-primary">Continue Setup Wizard</a>', 'user-registration' ), esc_url( admin_url( '/admin.php?page=user-registration-welcome&tab=setup-wizard&step=' . $onboard_skipped_step . '' ) ) );
$onboarding_completed = false;
$onboarding_complete_text = sprintf( __( '<a href="%s" class="button-primary" style="margin-right: 5px;">Continue Setup Wizard</a>', 'user-registration' ), esc_url( admin_url( '/admin.php?page=user-registration-welcome&tab=setup-wizard&step=' . $onboard_skipped_step . '' ) ) );
$onboarding_complete_text .= sprintf( __( '<a class="button-secondary skip" href="%s">Skip setup</a>', 'user-registration' ), esc_url( wp_nonce_url( add_query_arg( 'ur-hide-notice', 'continue_setup_wizard' ), 'user_registration_hide_notices_nonce', '_ur_notice_nonce' ) ) );
$onboarding_completed = false;
} else {
$onboarding_completed = true;
}
Expand Down

This file was deleted.

4 changes: 2 additions & 2 deletions includes/blocks/block-types/class-ur-block-myaccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ protected function build_html( $content ) {
$parameters['userState'] = $attr['userState'];
}

if ( (empty( $parameters ) || ( isset($parameters['userState']) && "logged_in" === $parameters['userState'] ) ) || (!empty($parameters) && !isset($parameters['userState'])) ) {
if ( ( empty( $parameters ) || ( isset( $parameters['userState'] ) && 'logged_in' === $parameters['userState'] ) ) || ( ! empty( $parameters ) && ! isset( $parameters['userState'] ) ) ) {
return UR_Shortcodes::my_account(
$parameters
);
} else if(isset($parameters['userState']) && "logged_out" === $parameters['userState']) {
} elseif ( isset( $parameters['userState'] ) && 'logged_out' === $parameters['userState'] ) {
return UR_Shortcodes::login(
$parameters
);
Expand Down
4 changes: 4 additions & 0 deletions includes/class-ur-form-handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ public static function init() {
* Remove key and login from querystring, set cookie, and redirect to account page to show the form.
*/
public static function redirect_reset_password_link() {
global $wp;
if ( ( isset( $wp->query_vars['ur-lost-password'] ) && empty( $wp->query_vars['ur-lost-password'] ) ) || ! isset( $wp->query_vars['ur-lost-password'] ) ) {
return;
}
$page_id = ur_get_page_id( 'myaccount' );
$is_ur_login_or_account_page = ur_find_my_account_in_page( $page_id );

Expand Down
Loading
Loading