<div class="@containerInner">
    <?php if (empty($form['#block']->subject)): ?>
        <h2 class="element-invisible hidden"><?php print t('Search form'); ?></h2>
    <?php endif; ?>
    <?php print $search['hidden']; ?>
    <div class="bd-search-wrapper">
        @if (showButton) {
            @if (buttonPosition === 'left') {
            <div class="bd-button-wrapper">
                <?php print render($search_block_button) ?>
            </div>
            }
            <div class="bd-input-wrapper">
                @include("input")
            </div>
            @if (buttonPosition === 'right') {
            <div class="bd-button-wrapper">
                <?php print render($search_block_button) ?>
            </div>
            }
        } else {
            @include("input")
            @include("icon")
        }
    </div>
</div>
<script>
    jQuery('@(selector) @(icon.selector)').bind('click', function (e) {
        e.preventDefault();
        jQuery('#<?php print $variables['form']['#id'] ?>').submit();
    });
</script>
