Gentics Portal.Node PHP API
 All Classes Namespaces Functions Variables Pages
SimpleSearchWidget.php
1 <?php
2  /**
3  * Gentics Portal.Node PHP
4  * Author & Copyright (c) by Gentics Software GmbH
5  * sales@gentics.com
6  * http://www.gentics.com
7  * Licenses can be found in the LICENSE.txt file in the root-folder of this installation
8  * You must not use this software without a valid license agreement.
9  *
10  */
11 ?>
12 <?php echo CHtml::beginForm(Yii::app()->CreateUrl($landingPage.'#searchResults'), 'get') ?>
13 <div class="simple-search">
14  <?php echo SearchModule::t('Search for');?>:
15  <?php echo CHtml::textField('searchTerm', Yii::app()->request->getQuery('searchTerm', ''), array('class'=>$this->uniqClassName));?>
16  <?php echo CHtml::submitButton(SearchModule::t('Search'), array('name'=>"sub"));?>
17 </div>
18 <?php echo CHtml::endForm() ?>
19 <?php
20  if ($this->useAutosuggest) {
21 ?>
22  <script type="text/javascript">
23  $(document).ready(function(){
24  searchAutocomplete({
25  el:$('.<?php echo $this->uniqClassName;?>'),
26  url:'<?php echo Yii::app()->CreateUrl('search/search/autosuggest', array('autosuggest_url' => $this->getEncryptedAutosuggestUrl()));?>'
27  });
28  });
29  </script>
30 <?php
31  }
32 ?>
33