<form id="search-@id" role="form" class="@classNames form-inline" name="search" <?php echo funcBuildRoute(JFactory::getApplication()->getDocument()->baseurl . '/index.php', 'action'); ?> method="post">
    <div class="@containerInner">
        <input type="hidden" name="task" value="search">
        <input type="hidden" name="option" value="com_search">
        <div class="bd-search-wrapper">
            @if (showButton) {
                @if (buttonPosition === 'left') {
                <div class="bd-button-wrapper">
                    <input type="submit" class="@button.classNames" value="<?php echo JText::_('TPL_SEARCH_BUTTON_VALUE'); ?>" link-disable="true">
                </div>
                }
                <div class="bd-input-wrapper">
                    @include("input")
                </div>
                @if (buttonPosition === 'right') {
                <div class="bd-button-wrapper">
                    <input type="submit" class="@button.classNames" value="<?php echo JText::_('TPL_SEARCH_BUTTON_VALUE'); ?>" link-disable="true">
                </div>
                }
            } else {
                @include("input")
                @include("icon")
            }
        </div>
        <script>
            (function (jQuery, $) {
                jQuery('@(selector) @(icon.selector)').on('click', function (e) {
                    e.preventDefault();
                    jQuery('#search-@id').submit();
                });
            })(window.@jQuery, window.@jQuery);
        </script>
    </div>
</form>