[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/components/com_finder/tmpl/search/ -> default_form.php (source)

   1  <?php
   2  
   3  /**
   4   * @package     Joomla.Site
   5   * @subpackage  com_finder
   6   *
   7   * @copyright   (C) 2011 Open Source Matters, Inc. <https://www.joomla.org>
   8   * @license     GNU General Public License version 2 or later; see LICENSE.txt
   9   */
  10  
  11  defined('_JEXEC') or die;
  12  
  13  use Joomla\CMS\HTML\HTMLHelper;
  14  use Joomla\CMS\Language\Text;
  15  use Joomla\CMS\Router\Route;
  16  
  17  /*
  18  * This segment of code sets up the autocompleter.
  19  */
  20  if ($this->params->get('show_autosuggest', 1)) {
  21      $this->document->getWebAssetManager()->usePreset('awesomplete');
  22      $this->document->addScriptOptions('finder-search', array('url' => Route::_('index.php?option=com_finder&task=suggestions.suggest&format=json&tmpl=component', false)));
  23  }
  24  
  25  ?>
  26  
  27  <form action="<?php echo Route::_($this->query->toUri()); ?>" method="get" class="js-finder-searchform">
  28      <?php echo $this->getFields(); ?>
  29      <fieldset class="com-finder__search word mb-3">
  30          <legend class="com-finder__search-legend visually-hidden">
  31              <?php echo Text::_('COM_FINDER_SEARCH_FORM_LEGEND'); ?>
  32          </legend>
  33          <div class="form-inline">
  34              <label for="q" class="me-2">
  35                  <?php echo Text::_('COM_FINDER_SEARCH_TERMS'); ?>
  36              </label>
  37              <div class="input-group">
  38                  <input type="text" name="q" id="q" class="js-finder-search-query form-control" value="<?php echo $this->escape($this->query->input); ?>">
  39                  <button type="submit" class="btn btn-primary">
  40                      <span class="icon-search icon-white" aria-hidden="true"></span>
  41                      <?php echo Text::_('JSEARCH_FILTER_SUBMIT'); ?>
  42                  </button>
  43                  <?php if ($this->params->get('show_advanced', 1)) : ?>
  44                      <?php HTMLHelper::_('bootstrap.collapse'); ?>
  45                      <button class="btn btn-secondary" type="button" data-bs-toggle="collapse" data-bs-target="#advancedSearch" aria-expanded="<?php echo ($this->params->get('expand_advanced', 0) ? 'true' : 'false'); ?>">
  46                          <span class="icon-search-plus" aria-hidden="true"></span>
  47                          <?php echo Text::_('COM_FINDER_ADVANCED_SEARCH_TOGGLE'); ?></button>
  48                  <?php endif; ?>
  49              </div>
  50          </div>
  51      </fieldset>
  52  
  53      <?php if ($this->params->get('show_advanced', 1)) : ?>
  54          <fieldset id="advancedSearch" class="com-finder__advanced js-finder-advanced collapse<?php if ($this->params->get('expand_advanced', 0)) {
  55              echo ' show';
  56                                                                                               } ?>">
  57              <legend class="com-finder__search-advanced visually-hidden">
  58                  <?php echo Text::_('COM_FINDER_SEARCH_ADVANCED_LEGEND'); ?>
  59              </legend>
  60              <?php if ($this->params->get('show_advanced_tips', 1)) : ?>
  61                  <div class="com-finder__tips card card-outline-secondary mb-3">
  62                      <div class="card-body">
  63                          <?php echo Text::_('COM_FINDER_ADVANCED_TIPS_INTRO'); ?>
  64                          <?php echo Text::_('COM_FINDER_ADVANCED_TIPS_AND'); ?>
  65                          <?php echo Text::_('COM_FINDER_ADVANCED_TIPS_NOT'); ?>
  66                          <?php echo Text::_('COM_FINDER_ADVANCED_TIPS_OR'); ?>
  67                          <?php if ($this->params->get('tuplecount', 1) > 1) : ?>
  68                              <?php echo Text::_('COM_FINDER_ADVANCED_TIPS_PHRASE'); ?>
  69                          <?php endif; ?>
  70                          <?php echo Text::_('COM_FINDER_ADVANCED_TIPS_OUTRO'); ?>
  71                      </div>
  72                  </div>
  73              <?php endif; ?>
  74              <div id="finder-filter-window" class="com-finder__filter">
  75                  <?php echo HTMLHelper::_('filter.select', $this->query, $this->params); ?>
  76              </div>
  77          </fieldset>
  78      <?php endif; ?>
  79  </form>


Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer