<# 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 = ''; if ( 'string' === typeof fusionBuilderText.search_placeholder && 'string' === typeof param.placeholder ) { searchText = fusionBuilderText.search_placeholder.replace( '%s', param.placeholder ); } 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 ( '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; #> <# if ( 'undefined' !== typeof value && '' !== value && null !== value ) { #> <# var values = ( jQuery.isArray( value ) ) ? value : value.split( ',' ); #> <# } else { #> <# var 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"' : ''; #> <# } ); #>
<# } else { #> <# } #>