Skip to:
Content

BuddyPress.org

Changeset 13366


Ignore:
Timestamp:
11/12/2022 08:53:05 AM (2 years ago)
Author:
imath
Message:

Trigger the Activity Post Form resetForm event to custom buttons

BP Nouveau's Activity Post Form can be extended with custom buttons. These
custom buttons need to be able to customize their behavior when the
Activity Post Form has been reset.

Fixes #8763

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/js/buddypress-activity-post-form.js

    r12891 r13366  
    670670            this.model.clear();
    671671            this.model.set( this.resetModel.attributes );
     672
     673            // Inform all custom buttons the form has been reset.
     674            _.each( bp.Nouveau.Activity.postForm.buttons.models, function( model ) {
     675                bp.Nouveau.Activity.postForm.buttons.trigger( 'resetForm:' + model.get( 'id' ), model );
     676            } );
    672677        },
    673678
Note: See TracChangeset for help on using the changeset viewer.