/
home
/
vianto5
/
duettowers.mx
/
wp-content
/
plugins
/
wpforms
/
assets
/
js
/
admin
/
builder
/
/home/vianto5/duettowers.mx/wp-content/plugins/wpforms/assets/js/admin/builder
mkdir
upload
Name
Size
Mode
Actions
fields/
-
0755
rm
themes/
-
0755
rm
admin-builder-providers.js
17818
0644
edit
dl
rm
admin-builder-providers.min.js
8454
0644
edit
dl
rm
admin-builder.js
311448
0644
edit
dl
rm
admin-builder.min.js
142059
0644
edit
dl
rm
chocolate-choices.js
2334
0644
edit
dl
rm
chocolate-choices.min.js
470
0644
edit
dl
rm
choices-list.js
3784
0644
edit
dl
rm
choices-list.min.js
714
0644
edit
dl
rm
context-menu.js
18540
0644
edit
dl
rm
context-menu.min.js
8183
0644
edit
dl
rm
drag-fields.js
24725
0644
edit
dl
rm
drag-fields.min.js
9653
0644
edit
dl
rm
dropdown-list.js
9992
0644
edit
dl
rm
dropdown-list.min.js
3863
0644
edit
dl
rm
email-template.js
5144
0644
edit
dl
rm
email-template.min.js
1448
0644
edit
dl
rm
field-map.js
6592
0644
edit
dl
rm
field-map.min.js
2372
0644
edit
dl
rm
form-templates.js
19821
0644
edit
dl
rm
form-templates.min.js
8301
0644
edit
dl
rm
help.js
11572
0644
edit
dl
rm
help.min.js
5016
0644
edit
dl
rm
image-upload.js
4543
0644
edit
dl
rm
image-upload.min.js
2020
0644
edit
dl
rm
multiple-choices.js
15418
0644
edit
dl
rm
multiple-choices.min.js
6367
0644
edit
dl
rm
panel-loader.js
5071
0644
edit
dl
rm
panel-loader.min.js
2252
0644
edit
dl
rm
payments-utils.js
3493
0644
edit
dl
rm
payments-utils.min.js
1963
0644
edit
dl
rm
providers.js
35506
0644
edit
dl
rm
providers.min.js
12791
0644
edit
dl
rm
search-fields.js
4671
0644
edit
dl
rm
search-fields.min.js
2508
0644
edit
dl
rm
settings.js
11412
0644
edit
dl
rm
settings.min.js
4820
0644
edit
dl
rm
setup.js
20288
0644
edit
dl
rm
setup.min.js
9546
0644
edit
dl
rm
smart-tags.js
45899
0644
edit
dl
rm
smart-tags.min.js
15275
0644
edit
dl
rm
templates.js
4070
0644
edit
dl
rm
templates.min.js
1079
0644
edit
dl
rm
wpforms-choicesjs.js
8194
0644
edit
dl
rm
wpforms-choicesjs.min.js
2631
0644
edit
dl
rm
Edit:
/home/vianto5/duettowers.mx/wp-content/plugins/wpforms/assets/js/admin/builder/templates.js
(4070B)
/* global wpforms_builder */ // eslint-disable-next-line no-var var WPForms = window.WPForms || {}; WPForms.Admin = WPForms.Admin || {}; WPForms.Admin.Builder = WPForms.Admin.Builder || {}; WPForms.Admin.Builder.Templates = WPForms.Admin.Builder.Templates || ( function( document, window, $ ) { /** * Private functions and properties. * * @since 1.4.8 * * @type {Object} */ const __private = { /** * All templating functions for providers are stored here in a Map. * Key is a template name, value - Underscore.js templating function. * * @since 1.4.8 * * @type {Map} */ previews: new Map(), /** * Function to handle subfields for a given template's properties and extend * the fields list if applicable. The function processes fields for specific * types and formats, especially for "name" type fields, transforming them into * an extended format with additional subfields (Full, First, Middle, Last). * * If the `isSupportSubfields` property is not enabled in the provided template's * properties, the original `basePreview` function is executed without modification. * * @since 1.9.6 * * @param {Function} basePreview The base preview function to execute the final output. * * @return {Function} A function that accepts `templateProps` and processes its fields. */ handleSubFields: ( basePreview ) => ( templateProps ) => { if ( ! templateProps?.isSupportSubfields ) { return basePreview( templateProps ); } const extendedFieldsList = {}; let counter = 0; _.each( templateProps.fields, function( field, key ) { if ( _.isEmpty( field ) || ! _.has( field, 'id' ) || ! _.has( field, 'type' ) ) { return; } if ( 'name' !== field.type || ! _.has( field, 'format' ) ) { extendedFieldsList[ counter++ ] = field; return; } field.id = field.id.toString(); const fieldLabel = ! _.isUndefined( field.label ) && field.label.toString().trim() !== '' ? field.label.toString().trim() : wpforms_builder.field + ' #' + key; // Add data for Name field in "extended" format (Full, First, Middle and Last). _.each( wpforms_builder.name_field_formats, function( formatLabel, valueSlug ) { if ( -1 !== field.format.indexOf( valueSlug ) || valueSlug === 'full' ) { extendedFieldsList[ counter++ ] = { id: field.id + '.' + valueSlug, label: fieldLabel + ' (' + formatLabel + ')', format: field.format, }; } } ); } ); templateProps.fields = extendedFieldsList; return basePreview( templateProps ); }, }; /** * Public functions and properties. * * @since 1.4.8 * * @type {Object} */ const app = { /** * Start the engine. DOM is not ready yet, use only to init something. * * @since 1.4.8 */ init() { // Do that when DOM is ready. $( app.ready ); }, /** * DOM is fully loaded. * * @since 1.4.8 */ ready() { $( '#wpforms-panel-providers' ).trigger( 'WPForms.Admin.Builder.Templates.ready' ); }, /** * Register and compile all templates. * All data is saved in a Map. * * @since 1.4.8 * * @param {string[]} templates Array of template names. */ add( templates ) { templates.forEach( function( template ) { if ( typeof template === 'string' ) { __private.previews.set( template, wp.template( template ) ); } } ); }, /** * Get a templating function (to compile later with data). * * @since 1.4.8 * * @param {string} template ID of a template to retrieve from a cache. * * @return {*} A callable that after compiling will always return a string. */ get( template ) { const preview = __private.previews.get( template ); if ( typeof preview !== 'undefined' ) { return __private.handleSubFields( preview ); } return function() { return ''; }; }, }; // Provide access to public functions/properties. return app; }( document, window, jQuery ) ); // Initialize. WPForms.Admin.Builder.Templates.init();
Save
cmd:
run