From 3e89e9e9f8f5f5e9086646577fa16fc4e4baebc8 Mon Sep 17 00:00:00 2001 From: nikitasinelnikov Date: Thu, 13 Dec 2018 18:54:36 +0200 Subject: [PATCH] - fixed admin forms; --- includes/admin/assets/js/um-admin-forms.js | 4 +-- includes/admin/core/class-admin-forms.php | 17 +++++++----- includes/admin/templates/extensions.php | 3 ++- .../admin/templates/form/profile_settings.php | 26 ++++++++++--------- 4 files changed, 28 insertions(+), 22 deletions(-) diff --git a/includes/admin/assets/js/um-admin-forms.js b/includes/admin/assets/js/um-admin-forms.js index 3d645653..c6b6aca7 100644 --- a/includes/admin/assets/js/um-admin-forms.js +++ b/includes/admin/assets/js/um-admin-forms.js @@ -19,10 +19,8 @@ jQuery(document).ready( function() { var selector_html = jQuery( '
' ).append( list.siblings('.um-hidden-multi-selects').clone() ).html(); - var classes = list.find('li:last').attr('class'); - list.append( - '
  • ' + selector_html + + '
  • ' + selector_html + '' + php_data.texts.remove + '
  • ' ); diff --git a/includes/admin/core/class-admin-forms.php b/includes/admin/core/class-admin-forms.php index 1a700812..1b5894c9 100644 --- a/includes/admin/core/class-admin-forms.php +++ b/includes/admin/core/class-admin-forms.php @@ -774,8 +774,9 @@ if ( ! class_exists( 'um\admin\core\Admin_Forms' ) ) { */ function render_multi_selects( $field_data ) { - if ( empty( $field_data['id'] ) ) + if ( empty( $field_data['id'] ) ) { return false; + } $id = ( ! empty( $this->form_data['prefix_id'] ) ? $this->form_data['prefix_id'] : '' ) . '_' . $field_data['id']; @@ -801,7 +802,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Forms' ) ) { $values = $this->get_field_value( $field_data ); $options = ''; - foreach ( $field_data['options'] as $key=>$option ) { + foreach ( $field_data['options'] as $key => $option ) { $options .= ''; } @@ -809,12 +810,16 @@ if ( ! class_exists( 'um\admin\core\Admin_Forms' ) ) { $html .= "