Editar plugins

A editar NetWiz Systems Piaget Pages (activo)

Ficheiro: netwiz-systems-piaget-pages/netwiz-systems-piaget-pages.php

<# if ( param.range ) { #> <# } #> <# } #> <# if ( 'radio_button_set' === param.type ) { #> <# var fieldId = 'undefined' === typeof param.param_name ? param.id : param.param_name, choices = 'undefined' === typeof param.param_name ? param.choices : param.value, icons = ( 'undefined' !== typeof FusionApp || 'undefined' !== typeof param.back_icons && param.back_icons ) && 'undefined' !== typeof param.icons ? param.icons : '', gridLayout = ( 'undefined' !== typeof param.grid_layout && param.grid_layout ) ? true : false, wrapperClass = ''; if ( gridLayout ) { wrapperClass = 'fusion-form-radio-button-set-grid-layout'; } #>
<# var choice = option_value, index = 0; if ( ( 'undefined' === typeof choice || '' === choice ) && 'undefined' !== typeof param.default ) { choice = param.default; } #> <# _.each( choices, function( name, value ) { #> <# index++; let dependencyAtts = ''; if ( typeof name === 'object' && name !== null ) { const dependency = name.dependency; name = name.name; if ( dependency ) { dependencyAtts = []; if ( dependency.element ) { dependencyAtts.push(`data-dependency=${dependency.element}`); } if ( dependency.value ) { dependencyAtts.push(`data-dependency-value=${dependency.value}`); } if ( dependency.operator ) { dependencyAtts.push(`data-dependency-operator=${dependency.operator}`); } dependencyAtts = dependencyAtts.join( ' ' ); } } var selected = ( value == choice ) ? ' ui-state-active' : '', icon = ( 'undefined' !== typeof icons[ value ] && '' !== icons ) ? icons[ value ] : '', title = gridLayout ? '' : name, iconClass = '' === icon ? '' : 'has-tooltip'; if ( '' !== title && -1 !== icon.indexOf( 'span' ) && -1 === icon.indexOf( 'onlyIcon' ) ) { title = icon + '
' + title + '
'; } else if ( -1 !== icon.indexOf( 'svg' ) || -1 !== icon.indexOf( 'span' ) ) { title = icon; } else if ( '' !== icon ) { iconClass += ' ' + icon; title = ''; } #> {{{ title }}} <# } ); #>
<# } #> <# if ( 'multiple_select' === param.type ) { #> <# var fieldId = 'undefined' === typeof param.param_name ? param.id : param.param_name, choices = 'undefined' === typeof param.value ? param.choices : param.value, hasSearch = 'object' === typeof choices && 8 < Object.keys( choices ).length ? true : false, searchText = fusionBuilderText.search, placeholderText = 'undefined' !== typeof param.placeholder_text ? param.placeholder_text : ''; repeaterId = 'undefined' === typeof repeaterIndex ? '' : repeaterIndex + '-'; if ( 'string' === typeof fusionBuilderText.search_placeholder && 'string' === typeof param.placeholder ) { searchText = fusionBuilderText.search_placeholder.replace( '%s', param.placeholder ); } if ( '' === placeholderText ) { if ( -1 !== fieldId.indexOf( 'cat_slug' ) ) { placeholderText = fusionBuilderText.select_categories_or_leave_blank_for_all; } else if ( -1 !== fieldId.indexOf( 'exclude_cats' ) ) { placeholderText = fusionBuilderText.select_categories_or_leave_blank_for_none; } else if ( -1 !== fieldId.indexOf( 'category' ) ) { placeholderText = fusionBuilderText.select_categories_or_leave_blank_for_none; } else if ( -1 !== fieldId.indexOf( 'post_status' ) ) { placeholderText = fusionBuilderText.select_post_status_leave_blank_for_publish; } else if ( -1 !== fieldId.indexOf( 'social_share_links' ) ) { placeholderText = fusionBuilderText.select_or_leave_blank_for_global; } else if ( 'undefined' === typeof param.location || ( 'TO' !== param.location && 'FBE' !== param.location ) ) { placeholderText = fusionBuilderText.select_options_or_leave_blank_for_all; } } #> <# if ( 'undefined' !== typeof FusionApp ) { #>
<# var value = option_value, values = ''; if ( 'undefined' !== typeof value && '' !== value && null !== value && false !== value ) { values = 'string' !== typeof value ? value : value.split( ',' ); if ( 'object' === typeof values && ! Array.isArray( values ) ) { values = Object.values( values ); } } #>
<# if ( '' !== values ) { #> <# _.each( values, function( value ) { #> {{{ choices[ value ] }}}x <# } ); #> <# } #>
{{ placeholderText }}
<# if ( hasSearch ) { #> <# } #>
<# _.each( choices, function( name, value ) { #> <# var checked = ( jQuery.inArray( value, values ) > -1 ) ? ' checked="checked"' : ''; #> <# } ); #>
<# if ( 'undefined' !== typeof param.add_new ) { #> {{fusionBuilderText.add_new}} <# } #> <# } else { #> <# } #> <# } #> <# if ( 'ajax_select' === param.type ) { #> <# var fieldId = 'undefined' === typeof param.param_name ? param.id : param.param_name, choices = 'undefined' === typeof param.param_name ? param.choices : param.value, max_input = 'undefined' !== typeof param.max_input ? param.max_input : 1000, isSingle = 1 === max_input ? 'fusion-ajax-single-select' : ''; placeholder = 'undefined' !== typeof param.placeholder ? param.placeholder : '', optionValue = typeof( option_value ) !== 'undefined' ? option_value : '', skipDebounce = param.skip_debounce || false, searchText = fusionBuilderText.search, ajaxSearch = param.ajax || '', save_not_array = param.save_not_array || '', repeaterId = 'undefined' === typeof repeaterIndex ? '' : repeaterIndex + '-', ajaxParams = param.ajax_params || []; if ( 'string' === typeof fusionBuilderText.search_placeholder && 'string' === typeof param.placeholder ) { searchText = fusionBuilderText.search_placeholder.replace( '%s', param.placeholder ); } if ( '' !== placeholder ) { searchText = placeholder; } var value = option_value, values = '', initialValues = ''; if ( 'undefined' !== typeof value && '' !== value && null !== value && false !== value ) { values = 'string' !== typeof value ? value : value.split( ',' ); if ( 'object' === typeof values && ! Array.isArray( values ) ) { values = Object.values( values ); } initialValues = _.escape( JSON.stringify(values) ); } if ( ajaxParams ) { ajaxParams = _.escape( JSON.stringify(ajaxParams) ) } #> <# if ( 'object' === typeof FusionApp ) { #>
<# if ( '' !== isSingle ) { #>
<# } #>
<# if ( '' === isSingle ) { #>
<# } #>
<# if ( 'undefined' !== typeof param.add_new ) { #> {{fusionBuilderText.add_new}} <# } #> <# } else { #>
<# } #> <# } #> <# if ( 'iconpicker' === param.type ) { #>
<# if ( 'undefined' !== typeof FusionApp ) { #>
<# } else { #>
<# } #>
<# } #> <# if ( 'repeater' === param.type ) { #> <# fieldId = 'undefined' === typeof param.param_name ? param.id : param.param_name; if ( 'undefined' === typeof param.row_add ) { itemLabel = "Add Another Item"; } else { itemLabel = param.row_add } option_value = 'object' === typeof option_value ? JSON.stringify( option_value ) : option_value; #> {{ itemLabel }}
<# } #> <# if ( 'mailchimp_map' === param.type ) { #> <# var fieldId = 'undefined' === typeof param.param_name ? param.id : param.param_name; #>
No form fields or Mailchimp merge tags found.
<# } #> <# if ( 'hubspot_map' === param.type ) { #> <# var fieldId = 'undefined' === typeof param.param_name ? param.id : param.param_name; #>
No form fields or HubSpot properties found.
<# } #> <# if ( 'hubspot_consent_map' === param.type ) { #> <# var fieldId = 'undefined' === typeof param.param_name ? param.id : param.param_name; #>
No form fields or HubSpot communication preferences found.
<# } #> <# if ( 'range' === param.type ) { #> <# var builderCheck = 'undefined' !== typeof param.param_name, fieldId = builderCheck ? param.param_name : param.id, min = builderCheck ? param.min : param.choices.min, min = min ? min : 0, max = builderCheck ? param.max : param.choices.max, max = max ? max : 100, step = builderCheck ? param.step : param.choices.step, step = step ? step : '1', step = step.toString(), defaultStatus = 'undefined' !== typeof param.default && '' !== param.default && ( builderCheck || 'PO' === option_type ) ? 'fusion-with-default' : '', isChecked = '' == option_value ? 'checked' : '', regularId = ! param.default || ( ! builderCheck && 'TO' === option_type ) ? fieldId : 'slider' + fieldId, displayValue = '' == option_value ? param.default : option_value; if ( '' === defaultStatus && ( 'undefined' === typeof option_value || '' === option_value ) && 'undefined' !== typeof param.value ) { option_value = displayValue = param.value; } if ( '.' === step.charAt( 0 ) ) { step = '0' + step; } #>
<# if ( 'undefined' !== typeof param.default && ( builderCheck || 'PO' === option_type ) ) { #> <# } #> <# } #> <# if ( 'fusion_logics' === param.type ) { #> <# var fieldId = 'undefined' === typeof param.param_name ? param.id : param.param_name, defaultParam = 'undefined' === typeof param.default ? '' : param.default, option_value = _.isEmpty( option_value ) ? defaultParam : option_value, choices = 'undefined' === typeof param.choices ? [] : param.choices, options = option_value ? JSON.parse( FusionPageBuilderApp.base64Decode( option_value ) ) : [], placeholder = 'undefined' === typeof param.placeholder ? [] : param.placeholder, comparisons = 'undefined' === typeof param.comparisons ? [] : param.comparisons; if ( ! choices.length ) { // Filter map to only get form elements. formElements = _.filter( FusionPageBuilderApp.collection.models, function( element ) { var params = element.get( 'params' ); if ( 'object' !== typeof params ) { return false; } return element.get( 'element_type' ).includes( 'fusion_form' ) && 'fusion_form_submit' !== element.get( 'element_type' ) && 'fusion_form_image_select_input' !== element.get( 'element_type' ) && ( 'string' === typeof params.label || 'undefined' === typeof params.label ) && 'string' === typeof params.name; } ); _.each( formElements, function( formElement ) { var params = formElement.get( 'params' ), inputLabel = 'string' === typeof params.label && '' !== params.label ? params.label : params.name, elementType = formElement.get( 'element_type' ), arrayType = 'fusion_form_checkbox' === elementType || 'fusion_form_image_select' === elementType ? '[]' : '', options = {}; if ( ( 'undefined' === typeof atts || ( 'undefined' !== typeof atts && atts.cid !== formElement.get( 'cid' ) ) ) && ( '' !== params.name || '' !== inputLabel ) ) { options = { 'id' : params.name + arrayType, 'title' : inputLabel, 'type' : 'text', 'comparisons' : comparisons }; choices.push( options ); } } ); } choices.unshift( placeholder ); #>
<# if ( choices.length ) { #> {{ fusionBuilderText.add_new_logic }}
    <# _.each( options, function( option ) { var operator = option.operator, value = option.value, hasOr = 'or' === operator ? 'has-or' : '', field = option.field, additionals = 'undefined' !== typeof option.additionals ? option.additionals: null, comparison = option.comparison.split( ' ' ).join( '-' ).toLowerCase(), currentChoice = choices.find( ( { id } ) => id === field ); // return eaerly if option no longer exists. if ( 'undefined' === typeof currentChoice ) { return; } const description = currentChoice.description || ''; #>
  • {{currentChoice.title}}

    <# if ( description ) { #>
    {{{ description }}}
    <# } #>
    <# if ( 'undefined' !== typeof FusionApp ) { #>
    <# } else { #>
    <# } #>
    <# if ( null !== additionals || 'object' === typeof currentChoice.additionals ) { #>
    <# if ( 'text' === currentChoice.additionals.type ) { #> <# } else if ( 'select' === currentChoice.additionals.type ) { #> <# if ( 'undefined' !== typeof FusionApp ) { #>
    <# } else { #>
    <# } } #>
    <# } #>
    <# if ( 'text' === currentChoice.type ) { #> <# } else if ( 'select' === currentChoice.type ) { #> <# if ( 'undefined' !== typeof FusionApp ) { #>
    <# } else { #>
    <# } } #>
  • <# } ); #>
<# } else { #>
{{fusionBuilderText.no_logic_field}}
<# } #>
<# } #> <# if ( 'text' === param.type ) { #> <# var fieldId = 'undefined' === typeof param.param_name ? param.id : param.param_name; #> class="{{ param.css_class }}" <# } #> <# if ( param.placeholder ) { #> data-placeholder="{{ param.value }}" <# } #> /> <# }; #> <# if ( 'media' === param.type ) { #> <# var mode = 'undefined' !== typeof param.preview && false === param.preview ? 'file' : 'media', url = 'undefined' !== typeof option_value && 'undefined' !== typeof option_value.url ? option_value.url : ''; #>
<# if ( 'media' === mode ) { #> <# } else { #> <# } #>
<# }; #> <# if ( 'upload' === param.type ) { #> <# var mode = 'undefined' !== typeof param.preview && false === param.preview ? 'file' : 'media', url = 'undefined' !== typeof option_value && 'undefined' !== typeof option_value.url ? option_value.url : ''; #>
<# if ( 'media' === mode ) { #> <# } else { #> <# } #>
<# }; #> <# if ( 'radio-buttonset' === param.type ) { #> <# var fieldId = 'undefined' === typeof param.param_name ? param.id : param.param_name, choices = 'undefined' === typeof param.param_name ? param.choices : param.value, icons = ( 'undefined' !== typeof FusionApp || 'undefined' !== typeof param.back_icons && param.back_icons ) && 'undefined' !== typeof param.icons ? param.icons : '', gridLayout = ( 'undefined' !== typeof param.grid_layout && param.grid_layout ) ? true : false, wrapperClass = ''; if ( gridLayout ) { wrapperClass = 'fusion-form-radio-button-set-grid-layout'; } #>
<# var choice = option_value, index = 0; if ( ( 'undefined' === typeof choice || '' === choice ) && 'undefined' !== typeof param.default ) { choice = param.default; } #> <# _.each( choices, function( name, value ) { #> <# index++; let dependencyAtts = ''; if ( typeof name === 'object' && name !== null ) { const dependency = name.dependency; name = name.name; if ( dependency ) { dependencyAtts = []; if ( dependency.element ) { dependencyAtts.push(`data-dependency=${dependency.element}`); } if ( dependency.value ) { dependencyAtts.push(`data-dependency-value=${dependency.value}`); } if ( dependency.operator ) { dependencyAtts.push(`data-dependency-operator=${dependency.operator}`); } dependencyAtts = dependencyAtts.join( ' ' ); } } var selected = ( value == choice ) ? ' ui-state-active' : '', icon = ( 'undefined' !== typeof icons[ value ] && '' !== icons ) ? icons[ value ] : '', title = gridLayout ? '' : name, iconClass = '' === icon ? '' : 'has-tooltip'; if ( '' !== title && -1 !== icon.indexOf( 'span' ) && -1 === icon.indexOf( 'onlyIcon' ) ) { title = icon + '
' + title + '
'; } else if ( -1 !== icon.indexOf( 'svg' ) || -1 !== icon.indexOf( 'span' ) ) { title = icon; } else if ( '' !== icon ) { iconClass += ' ' + icon; title = ''; } #> {{{ title }}} <# } ); #>
<# }; #>