mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-16 05:03:33 +09:00
- fixed "Update Settings" admin notice on the Settings > Licenses screen.
This commit is contained in:
@@ -1,10 +1,24 @@
|
||||
jQuery( document ).ready( function() {
|
||||
|
||||
|
||||
/**
|
||||
* Licenses
|
||||
*/
|
||||
jQuery( document.body ).on( 'click', '.um_license_deactivate', function() {
|
||||
jQuery(this).siblings('.um-option-field').val('');
|
||||
jQuery(this).parents('form.um-settings-form').trigger('submit');
|
||||
if ( jQuery(this).siblings('#submit').length ) {
|
||||
// clear = true for passing the empty field value to the license form submission
|
||||
jQuery(this).siblings('#submit').trigger('click',[ true ]);
|
||||
} else {
|
||||
jQuery(this).parents('form.um-settings-form').trigger('submit');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
jQuery( document.body ).on( 'click', '.um-settings-form #submit', function( e, clear ) {
|
||||
if ( ! clear && '' === jQuery(this).siblings('.um-option-field').val() ) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -32,4 +46,4 @@ jQuery( document ).ready( function() {
|
||||
window.onbeforeunload = '';
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -2943,6 +2943,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
||||
<input type="submit" name="submit" id="submit" class="button button-primary" value="<?php esc_attr_e( 'Activate', 'ultimate-member' ) ?>" />
|
||||
<?php } else { ?>
|
||||
<input type="submit" name="submit" id="submit" class="button button-primary" value="<?php esc_attr_e( 'Re-Activate', 'ultimate-member' ) ?>" />
|
||||
<input type="button" class="button um_license_deactivate" id="<?php echo esc_attr( $field_data['id'] ) ?>_deactivate" value="<?php esc_attr_e( 'Clear License', 'ultimate-member' ) ?>"/>
|
||||
<?php }
|
||||
|
||||
if ( ! empty( $messages ) ) {
|
||||
|
||||
Reference in New Issue
Block a user