[*] BO #PSFV-94 : update of the displayform method by helperForm in AdminSearchEnginesController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9248 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -1,50 +0,0 @@
|
|||||||
{*
|
|
||||||
* 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}
|
|
||||||
@@ -49,33 +49,35 @@ class AdminSearchEnginesControllerCore extends AdminController
|
|||||||
'getvar' => array('title' => $this->l('GET variable'), 'width' => 40)
|
'getvar' => array('title' => $this->l('GET variable'), 'width' => 40)
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->template = 'adminSearchEngines.tpl';
|
$this->fields_form = array(
|
||||||
|
'legend' => array(
|
||||||
|
'title' => $this->l('Referrer')
|
||||||
|
),
|
||||||
|
'input' => array(
|
||||||
|
array(
|
||||||
|
'type' => 'text',
|
||||||
|
'label' => $this->l('Server:'),
|
||||||
|
'name' => 'server',
|
||||||
|
'size' => 20,
|
||||||
|
'required' => true
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'type' => 'text',
|
||||||
|
'label' => $this->l('$_GET variable:'),
|
||||||
|
'name' => 'getvar',
|
||||||
|
'size' => 40,
|
||||||
|
'required' => true
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'submit' => array(
|
||||||
|
'title' => $this->l(' Save '),
|
||||||
|
'class' => 'button'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function postProcess()
|
|
||||||
{
|
|
||||||
parent::postProcess();
|
|
||||||
}
|
|
||||||
|
|
||||||
public function displayForm($is_main_tab = true)
|
|
||||||
{
|
|
||||||
parent::displayForm($is_main_tab);
|
|
||||||
|
|
||||||
if (!($obj = $this->loadObject(true)))
|
|
||||||
return;
|
|
||||||
|
|
||||||
$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()
|
public function initContent()
|
||||||
{
|
{
|
||||||
if ($this->display != 'edit')
|
if ($this->display != 'edit')
|
||||||
|
|||||||
Reference in New Issue
Block a user