<?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 class="search" action="<?php echo $this->escapeHtml($searchAction); ?>">
  <div class="input-group">
    <input type="text" name="fulltext_search" value="<?php echo $searchValue; ?>"
        placeholder="<?php echo $translate('Search'); ?>"
        aria-label="<?php echo $translate('Search'); ?>" class="input-group-field button hollow" />
    <button class="appear button" type="submit"><?php echo $translate('Search'); ?></button>
  </div>
</form>

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