- synchronization of biography (description) fields in the profile header and profile body

This commit is contained in:
yuriinalivaiko
2023-07-20 16:20:52 +03:00
parent 366563367d
commit dbe71b73b9
2 changed files with 8 additions and 2 deletions
+7
View File
@@ -122,6 +122,13 @@ jQuery(document).ready(function() {
jQuery( 'textarea[id="um-meta-bio"]' ).trigger('change');
// Biography (description) fields syncing.
jQuery( '.um-profile form' ).on( 'change, input', 'textarea[name="description"]', function ( e ) {
var $all_description_fields = jQuery( '#um-meta-bio, #description, textarea[name="description"]', e.delegateTarget );
$all_description_fields.val( e.currentTarget.value );
} );
jQuery( '.um-profile-edit a.um_delete-item' ).on( 'click', function(e) {
e.preventDefault();
+1 -2
View File
@@ -1225,8 +1225,7 @@ function um_profile_header( $args ) {
<textarea id="um-meta-bio"
data-character-limit="<?php echo esc_attr( UM()->options()->get( 'profile_bio_maxchars' ) ); ?>"
placeholder="<?php esc_attr_e( 'Tell us a bit about yourself...', 'ultimate-member' ); ?>"
name="<?php echo esc_attr( $description_key . '-' . $args['form_id'] ); ?>"
id="<?php echo esc_attr( $description_key . '-' . $args['form_id'] ); ?>"><?php echo UM()->fields()->field_value( $description_key ) ?></textarea>
name="<?php echo esc_attr( $description_key ); ?>"><?php echo UM()->fields()->field_value( $description_key ) ?></textarea>
<span class="um-meta-bio-character um-right"><span
class="um-bio-limit"><?php echo UM()->options()->get( 'profile_bio_maxchars' ); ?></span></span>