mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
Merge branch 'master' of https://github.com/ultimatemember/ultimatemember into development/metatable
This commit is contained in:
@@ -35,9 +35,12 @@ function um_get_field_default_value( $dom ) {
|
||||
if ($dom.find('input[type=checkbox]:checked').length >= 1) {
|
||||
|
||||
if ($dom.find('input[type=checkbox]:checked').length > 1) {
|
||||
var arr_values = [];
|
||||
arr_values.push( default_value );
|
||||
$dom.find('input[type=checkbox]:checked').each(function () {
|
||||
default_value = default_value + jQuery(this).val() + ' ';
|
||||
arr_values.push( jQuery(this).val() );
|
||||
});
|
||||
default_value = arr_values;
|
||||
} else {
|
||||
default_value = $dom.find('input[type=checkbox]:checked').val();
|
||||
}
|
||||
@@ -387,6 +390,7 @@ function um_field_restore_default_value( $dom ) {
|
||||
|
||||
case 'checkbox':
|
||||
|
||||
|
||||
if ( $dom.find('input[type=checkbox]:checked').length >= 1 ) {
|
||||
|
||||
$dom.find('input[type=checkbox]:checked').removeAttr('checked');
|
||||
@@ -408,7 +412,7 @@ function um_field_restore_default_value( $dom ) {
|
||||
cbox_elem.closest('.um-field-checkbox').find('i').removeClass('um-icon-android-checkbox-outline-blank');
|
||||
cbox_elem.closest('.um-field-checkbox').find('i').addClass('um-icon-android-checkbox-outline');
|
||||
cbox_elem.closest('.um-field-checkbox').addClass('active');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -2682,7 +2682,7 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
|
||||
$output .= $this->field_label( $label, $key, $data );
|
||||
}
|
||||
|
||||
$output .= '<div class="um-field-area ' . ( isset( $this->field_icons ) && $this->field_icons == 'field' ? 'um-field-area-has-icon' : '' ) . ' ">';
|
||||
$output .= '<div class="um-field-area ' . ( ! empty( $icon ) && isset( $this->field_icons ) && $this->field_icons == 'field' ? 'um-field-area-has-icon' : '' ) . ' ">';
|
||||
if ( ! empty( $icon ) && isset( $this->field_icons ) && $this->field_icons == 'field' ) {
|
||||
$output .= '<div class="um-field-icon"><i class="' . esc_attr( $icon ) . '"></i></div>';
|
||||
}
|
||||
@@ -3016,7 +3016,7 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
|
||||
*/
|
||||
$use_keyword = apply_filters( 'um_multiselect_option_value', 0, $data['type'] );
|
||||
|
||||
$output .= '<div class="um-field-area ' . ( isset( $this->field_icons ) && $this->field_icons == 'field' ? 'um-field-area-has-icon' : '' ) . ' ">';
|
||||
$output .= '<div class="um-field-area ' . (! empty( $icon ) && isset( $this->field_icons ) && $this->field_icons == 'field' ? 'um-field-area-has-icon' : '' ) . ' ">';
|
||||
if ( ! empty( $icon ) && isset( $this->field_icons ) && $this->field_icons == 'field') {
|
||||
$output .= '<div class="um-field-icon"><i class="' . esc_attr( $icon ) . '"></i></div>';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user