mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-13 03:36:28 +09:00
- fixed the "required" validation for the empty multiselect field;
This commit is contained in:
@@ -124,14 +124,13 @@ jQuery(document).ready(function() {
|
||||
function unselectEmptyOption( e ) {
|
||||
var $element = jQuery( e.currentTarget );
|
||||
var $selected = $element.find(':selected');
|
||||
if ( $selected.length > 1 ) {
|
||||
$selected.each( function ( i, option ) {
|
||||
if ( option.value === '' ) {
|
||||
option.selected = false;
|
||||
$element.trigger( 'change' );
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$selected.each( function ( i, option ) {
|
||||
if ( option.value === '' ) {
|
||||
option.selected = false;
|
||||
$element.trigger( 'change' );
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if ( typeof( jQuery.fn.select2 ) === 'function' ) {
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user