<?php
$translate = $this->plugin('translate');
$searchType = $this->siteSetting('search_type', 'sitewide');
switch ($searchType) {
    case 'cross-site':
        $searchAction = $this->url('site/cross-site-search', ['action' => 'results'], true);
        break;
    case 'sitewide':
    default:
        $searchAction = $this->url('site/resource', ['controller' => 'index', 'action' => 'search'], true);
}
$searchValue = $this->escapeHtml($this->params()->fromQuery('fulltext_search', ''));
?>

<form action="<?php echo $this->escapeHtml($searchAction); ?>" id="search-form">
    <input type="text" name="fulltext_search" value="<?php echo $searchValue; ?>"
        placeholder="<?php echo $translate('Search'); ?>"
        aria-label="<?php echo $translate('Search'); ?>">
    <button type="submit"><?php echo $translate('Search'); ?></button>
</form>
