From 53ccd373d21f78736a5525c56eba40fa8282e532 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Tue, 9 Jul 2024 10:55:10 -0500 Subject: [PATCH] Additional 'continue' button in registration approval form. See #3396. --- .../openlab/buddypress/members/register.php | 8 ++++++++ wp-content/themes/openlab/js/register.js | 17 +++++++++++++++-- wp-content/themes/openlab/style.less | 8 ++++++++ 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/wp-content/themes/openlab/buddypress/members/register.php b/wp-content/themes/openlab/buddypress/members/register.php index 3ede7543e5..6c6db10f3a 100755 --- a/wp-content/themes/openlab/buddypress/members/register.php +++ b/wp-content/themes/openlab/buddypress/members/register.php @@ -124,6 +124,14 @@ class="form-control" />
/> + +
+ +
+ +
+ Get Help +
diff --git a/wp-content/themes/openlab/js/register.js b/wp-content/themes/openlab/js/register.js index e686908d32..9bea1200cd 100644 --- a/wp-content/themes/openlab/js/register.js +++ b/wp-content/themes/openlab/js/register.js @@ -346,10 +346,22 @@ init_visible_metaboxes(); }); - $( '[name="account-description-approval"]' ).on( 'change', function() { - init_visible_metaboxes(); + $( '[name="account-description-approval"]' ).on( 'change', function( e ) { + $( '.registration-continue-button' ).hide(); + + if ( 'yes' === e.target.value ) { + $( '#registration-continue-button-yes' ).show(); + } else { + $( '#registration-continue-button-no' ).show(); + init_visible_metaboxes(); + } } ) + $( '#registration-continue-button-yes' ).on( 'click', function( e ) { + e.preventDefault(); + init_visible_metaboxes(); + } ); + load_account_type_description( $account_type_field.val() ); load_account_type_fields(); init_visible_metaboxes(); @@ -525,6 +537,7 @@ function load_account_type_description( accountType ) { $( '.account-type-description' ).hide(); $( '.account-description-approval-fieldset' ).hide(); + $( '.registration-continue-button' ).hide(); if ( accountType && accountType.length > 0 ) { $( '.account-type-description[data-account-type="' + accountType + '"]' ).show(); diff --git a/wp-content/themes/openlab/style.less b/wp-content/themes/openlab/style.less index 97a5e66c3d..c858f214ee 100644 --- a/wp-content/themes/openlab/style.less +++ b/wp-content/themes/openlab/style.less @@ -1710,6 +1710,14 @@ body{ .account-description-approval-fieldset { margin-top: 20px; } + + .registration-continue-button { + margin-top: 20px; + + a { + text-decoration: none; + } + } } .panel-body{ .bp-template-notice{