//added AdminSearchEnginesController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9083 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
{*
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 8971 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{if isset($tab_form)}
|
||||
<form action="{$tab_form['current']}&submitAdd{$tab_form['table']}=1&token={$tab_form['token']}" method="post">
|
||||
{if $tab_form['id']}<input type="hidden" name="id_{$tab_form['table']}" value="{$tab_form['id']}" />{/if}
|
||||
<fieldset>
|
||||
<legend>{l s ='Referrer'}</legend>
|
||||
|
||||
<label>{l s ='Server'} </label>
|
||||
<div class="margin-form">
|
||||
<input type="text" size="20" name="server" value="{$tab_form['server']}" /> <sup>*</sup>
|
||||
</div>
|
||||
<label>{l s ='$_GET variable'} </label>
|
||||
<div class="margin-form">
|
||||
<input type="text" size="40" name="getvar" value="{$tab_form['getvar']}" /> <sup>*</sup>
|
||||
</div>
|
||||
<div class="margin-form">
|
||||
<input type="submit" value="{l s =' Save '}" name="submitAdd{$tab_form['table']}" class="button" />
|
||||
</div>
|
||||
<div class="small"><sup>*</sup> {l s ='Required field'}</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
{/if}
|
||||
|
||||
{$content}
|
||||
+44
-29
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2011 PrestaShop
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
@@ -20,13 +20,12 @@
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 6844 $
|
||||
* @version Release: $Revision: 8971 $
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
|
||||
class AdminSearchEngines extends AdminTab
|
||||
class AdminSearchEnginesControllerCore extends AdminController
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
@@ -34,41 +33,57 @@ class AdminSearchEngines extends AdminTab
|
||||
$this->className = 'SearchEngine';
|
||||
$this->edit = true;
|
||||
$this->delete = true;
|
||||
|
||||
$this->lang = false;
|
||||
$this->requiredDatabase = true;
|
||||
|
||||
$this->context = Context::getContext();
|
||||
|
||||
if (!Tools::getValue('realedit'))
|
||||
$this->deleted = false;
|
||||
|
||||
$this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?')));
|
||||
|
||||
$this->fieldsDisplay = array(
|
||||
'id_search_engine' => array('title' => $this->l('ID'), 'width' => 25),
|
||||
'server' => array('title' => $this->l('Server'), 'width' => 200),
|
||||
'getvar' => array('title' => $this->l('GET variable'), 'width' => 40));
|
||||
|
||||
'getvar' => array('title' => $this->l('GET variable'), 'width' => 40)
|
||||
);
|
||||
|
||||
$this->template = 'adminSearchEngines.tpl';
|
||||
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function displayForm($isMainTab = true)
|
||||
|
||||
public function postProcess()
|
||||
{
|
||||
parent::displayForm();
|
||||
|
||||
parent::postProcess();
|
||||
}
|
||||
|
||||
public function displayForm($is_main_tab = true)
|
||||
{
|
||||
parent::displayForm($is_main_tab);
|
||||
|
||||
if (!($obj = $this->loadObject(true)))
|
||||
return;
|
||||
|
||||
echo '
|
||||
<form action="'.self::$currentIndex.'&submitAdd'.$this->table.'=1&token='.$this->token.'" method="post">
|
||||
'.($obj->id ? '<input type="hidden" name="id_'.$this->table.'" value="'.$obj->id.'" />' : '').'
|
||||
<fieldset><legend>'.$this->l('Referrer').'</legend>
|
||||
<label>'.$this->l('Server').' </label>
|
||||
<div class="margin-form">
|
||||
<input type="text" size="20" name="server" value="'.htmlentities($this->getFieldValue($obj, 'server'), ENT_COMPAT, 'UTF-8').'" /> <sup>*</sup>
|
||||
</div>
|
||||
<label>'.$this->l('$_GET variable').' </label>
|
||||
<div class="margin-form">
|
||||
<input type="text" size="40" name="getvar" value="'.htmlentities($this->getFieldValue($obj, 'getvar'), ENT_COMPAT, 'UTF-8').'" /> <sup>*</sup>
|
||||
</div>
|
||||
<div class="margin-form">
|
||||
<input type="submit" value="'.$this->l(' Save ').'" name="submitAdd'.$this->table.'" class="button" />
|
||||
</div>
|
||||
<div class="small"><sup>*</sup> '.$this->l('Required field').'</div>
|
||||
</fieldset>
|
||||
</form>';
|
||||
$this->context->smarty->assign('tab_form', array(
|
||||
'current' => self::$currentIndex,
|
||||
'table' => $this->table,
|
||||
'token' => $this->token,
|
||||
'id' => $obj->id,
|
||||
'server' => $this->getFieldValue($obj, 'server'),
|
||||
'getvar' => $this->getFieldValue($obj, 'getvar')
|
||||
));
|
||||
}
|
||||
|
||||
public function initContent()
|
||||
{
|
||||
if ($this->display != 'edit')
|
||||
$this->display = 'list';
|
||||
|
||||
parent::initContent();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user