mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-20 15:13:55 +09:00
- hotfix: if roles localized as object in some installations;
- changed readme;
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
jQuery( document ).ready( function() {
|
||||
|
||||
jQuery( '#role' ).change( function() {
|
||||
|
||||
if ( typeof um_roles == 'object' ) {
|
||||
um_roles = Object.keys( um_roles ).map(function( key ) { return um_roles[ key ]; });
|
||||
}
|
||||
|
||||
if ( jQuery.inArray( jQuery(this).val().substr(3), um_roles ) !== -1 ) {
|
||||
jQuery( '#um_role_selector_wrapper' ).hide();
|
||||
jQuery( '#um-role' ).val('');
|
||||
@@ -10,6 +15,10 @@ jQuery( document ).ready( function() {
|
||||
}).trigger('change');
|
||||
|
||||
jQuery( '#adduser-role' ).change( function() {
|
||||
if ( typeof um_roles == 'object' ) {
|
||||
um_roles = Object.keys( um_roles ).map(function( key ) { return um_roles[ key ]; });
|
||||
}
|
||||
|
||||
if ( jQuery.inArray( jQuery(this).val().substr(3), um_roles ) !== -1 ) {
|
||||
jQuery( '#um_role_existing_selector_wrapper' ).hide();
|
||||
jQuery( '#um-role' ).val('');
|
||||
|
||||
Reference in New Issue
Block a user