PageSourceSearch

https://www.diocesidicomo.it/wp-content/plugins/ninja-forms-paypal…/assets/js/error-handler.js?ver=6.9.9

js diocesidicomo.it collected 2026-10-02 11:48:35 UTC 1,165 bytes, 36 lines download raw bytes

1var nfPayPalExpressErrorHandler = Marionette.Object.extend({
2
3    initialize: function() {
4        this.listenTo( nfRadio.channel( 'form' ), 'render:view', this.initPPE );
5    },
6
7
8    /*
9     * Initialize our error handler.
10     * @since 3.0
11     * @param layoutView  Backbone.View  The Form view state.
12     */
13    initPPE: function( layoutView ) {
14        var formModel = layoutView.model;
15        // Listen for submitted attempts.
16        this.listenTo( Backbone.Radio.channel( 'form-' + formModel.get( 'id' ) ),  'before:submit', this.beforeSubmit );
17    },
18
19
20    /*
21     * Function to handle submission attempts.
22     * @since 3.0
23     * @param formModel  Backbone.Model  The Form model.
24     */
25    beforeSubmit: function( formModel ) {
26        var formID = formModel.get( 'id' );
27        // Remove any PayPal errors so that submission can be attempted.
28        // TODO: Potenitally need to search for additional slugs later. For now, all errors use the same slug.
29        Backbone.Radio.channel( 'form-' + formID ).request( 'remove:error', 'paypal_express' );
30    }
31
32});
33
34jQuery( document ).ready( function( $ ) {
35    new nfPayPalExpressErrorHandler();
36});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.