Advertisement
verygoodplugins

Untitled

May 5th, 2023
631
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.             (function ($) {
  2.                 $(document).ready(function () {
  3.                     if (typeof window.wffnBuilderCommons !== "undefined") {
  4.  
  5.                         window.wffnBuilderCommons.addFilter('wffn_js_optin_vue_data', function (e) {
  6.                             let custom_settings_valid_fields = [
  7.                                 {
  8.                                     type: "radios",
  9.                                     label: "<?php _e( 'Enable Integration', 'wp-fusion' ); ?>",
  10.                                     model: "op_wpfusion_enable",
  11.                                     values: () => {
  12.                                         return wfop_action.op_wpfusion_optin_radio_vals
  13.                                     },
  14.                                     hint: "<?php printf( __( 'Select Yes to sync optins with %s.', 'wp-fusion' ), wp_fusion()->crm->name ); ?>",
  15.                                 },
  16.                                 {
  17.                                     type: "vueMultiSelect",
  18.                                     label: "<?php _e( 'Apply Tags - Optin Submitted', 'wp-fusion' ); ?>",
  19.                                     placeholder: "<?php _e( 'Select tags', 'wp-fusion' ); ?>",
  20.                                     model: "op_wpfusion_optin_tags",
  21.                                     selectOptions: {hideNoneSelectedText: true},
  22.                                     hint: "<?php printf( __( 'Select tags to be applied in %s when this form is submitted.', 'wp-fusion' ), wp_fusion()->crm->name ); ?>",
  23.                                     values: () => {
  24.                                         return wfop_action.op_wpfusion_optin_tags_vals
  25.                                     },
  26.                                     selectOptions: {
  27.                                         multiple: true,
  28.                                         key: "id",
  29.                                         label: "name",
  30.                                     },
  31.                                     visible: function (model) {
  32.                                         return (model.op_wpfusion_enable === 'true');
  33.                                     },
  34.                                 },
  35.  
  36.  
  37.                             ];
  38.  
  39.                             e.schemaFusion = {
  40.                                 groups: [{
  41.                                     legend: '<?php _e( 'WP Fusion', 'wp-fusion' ); ?>',
  42.                                     fields: custom_settings_valid_fields
  43.                                 }]
  44.                             };
  45.                             e.modelFusion = wfop_action.action_options;
  46.                             return e;
  47.                         });
  48.                     }
  49.                 });
  50.  
  51.  
  52.             })(jQuery);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement