This commit is contained in:
Champ Camba
2019-12-02 13:20:56 +08:00
6 changed files with 29 additions and 17 deletions
@@ -301,4 +301,18 @@
background: #fff;
box-sizing: border-box;
width: 100%;
}
.um-admin-preview-overlay {
position: absolute;
top:0;
bottom: 0;
left: 0;
right: 0;
background-color: rgba(255,255,255,0);
z-index: 100;
}
#UM_preview_form .um-admin-modal-body {
position: relative;
}
@@ -139,6 +139,11 @@ function um_admin_modal_ajaxcall( act_id, arg1, arg2, arg3 ) {
}
if ( act_id === 'um_admin_preview_form' ) {
//fix for overlay in scrollable preview modal
jQuery('.um-admin-preview-overlay').css('height', jQuery('.um-admin-preview-overlay').siblings('.um').outerHeight(true)*1 + 20 + 'px' );
}
um_init_tooltips();
um_admin_init_datetimepicker();
+2 -1
View File
@@ -1054,7 +1054,8 @@ if ( ! class_exists( 'um\admin\core\Admin_Builder' ) ) {
UM()->fields()->editing = true;
}
$output = do_shortcode('[ultimatemember form_id="' . $arg1 . '" /]');
$output = '<div class="um-admin-preview-overlay"></div>';
$output .= do_shortcode('[ultimatemember form_id="' . $arg1 . '" /]');
break;
-5
View File
@@ -324,11 +324,6 @@ add_action( 'um_submit_form_login', 'um_submit_form_login', 10 );
* @param $args
*/
function um_add_submit_button_to_login( $args ) {
// DO NOT add when reviewing user's details
if ( isset( UM()->user()->preview ) && UM()->user()->preview /*== true && ! is_admin()*/ ) {
return;
}
/**
* UM hook
*
+8 -8
View File
@@ -314,7 +314,7 @@ function um_user_edit_profile( $args ) {
//update empty user meta
if ( ! isset( $args['submitted'][ $key ] ) || $args['submitted'][ $key ] == '' ) {
update_user_meta( um_user( 'ID' ), $key, '' );
update_user_meta( $user_id, $key, '' );
}
}
@@ -328,7 +328,7 @@ function um_user_edit_profile( $args ) {
// update empty user meta
if ( ! isset( $args['submitted'][ $key ] ) || $args['submitted'][ $key ] == '' ) {
update_user_meta( um_user( 'ID' ), $key, array() );
update_user_meta( $user_id, $key, array() );
}
}
@@ -338,7 +338,7 @@ function um_user_edit_profile( $args ) {
if ( um_is_temp_file( $args['submitted'][ $key ] ) || $args['submitted'][ $key ] == 'empty_file' ) {
$files[ $key ] = $args['submitted'][ $key ];
} elseif( um_is_file_owner( UM()->uploader()->get_upload_base_url() . um_user( 'ID' ) . '/' . $args['submitted'][ $key ], um_user( 'ID' ) ) ) {
} elseif( um_is_file_owner( UM()->uploader()->get_upload_base_url() . $user_id . '/' . $args['submitted'][ $key ], $user_id ) ) {
} else {
$files[ $key ] = 'empty_file';
@@ -378,7 +378,7 @@ function um_user_edit_profile( $args ) {
$to_update['role'] = $args['submitted']['role'];
}
$args['roles_before_upgrade'] = UM()->roles()->get_all_user_roles( um_user( 'ID' ) );
$args['roles_before_upgrade'] = UM()->roles()->get_all_user_roles( $user_id );
}
/**
@@ -449,7 +449,7 @@ function um_user_edit_profile( $args ) {
* }
* ?>
*/
do_action( 'um_after_user_updated', um_user( 'ID' ), $args, $to_update );
do_action( 'um_after_user_updated', $user_id, $args, $to_update );
}
/**
@@ -477,7 +477,7 @@ function um_user_edit_profile( $args ) {
if ( ! empty( $files ) && is_array( $files ) ) {
UM()->uploader()->replace_upload_dir = true;
UM()->uploader()->move_temporary_files( um_user( 'ID' ), $files );
UM()->uploader()->move_temporary_files( $user_id, $files );
UM()->uploader()->replace_upload_dir = false;
}
@@ -523,11 +523,11 @@ function um_user_edit_profile( $args ) {
* }
* ?>
*/
do_action( 'um_update_profile_full_name', um_user( 'ID' ), $to_update );
do_action( 'um_update_profile_full_name', $user_id, $to_update );
if ( ! isset( $args['is_signup'] ) ) {
$url = um_user_profile_url( um_user( 'ID' ) );
$url = um_user_profile_url( $user_id );
exit( wp_redirect( um_edit_my_profile_cancel_uri( $url ) ) );
}
}
-3
View File
@@ -464,9 +464,6 @@ add_action( 'um_submit_form_register', 'um_submit_form_register', 10 );
* @param $args
*/
function um_add_submit_button_to_register( $args ) {
// DO NOT add when reviewing user's details
if ( isset( UM()->user()->preview ) && UM()->user()->preview == true && is_admin() ) return;
$primary_btn_word = $args['primary_btn_word'];
/**
* UM hook