From b58fb34c97a422f71b4c836a240f1ea243a5116b Mon Sep 17 00:00:00 2001 From: lLefevre Date: Fri, 14 Oct 2011 08:57:52 +0000 Subject: [PATCH] [*] BO #PSFV-94 : update of the displayform method by helperForm in AdminQuickAccessesController git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9355 b9a71923-0436-4b27-9f14-aed3839534dd --- admin-dev/tabs/AdminQuickAccesses.php | 91 ------------ admin-dev/themes/template/form.tpl | 4 +- classes/OrderMessage.php | 45 +++--- classes/QuickAccess.php | 42 +++--- .../admin/AdminOrderMessageController.php | 4 +- .../admin/AdminQuickAccessesController.php | 132 ++++++++++++++++++ install-dev/sql/db_settings_lite.sql | 2 +- 7 files changed, 181 insertions(+), 139 deletions(-) delete mode 100644 admin-dev/tabs/AdminQuickAccesses.php create mode 100644 controllers/admin/AdminQuickAccessesController.php diff --git a/admin-dev/tabs/AdminQuickAccesses.php b/admin-dev/tabs/AdminQuickAccesses.php deleted file mode 100644 index 2945b69ae..000000000 --- a/admin-dev/tabs/AdminQuickAccesses.php +++ /dev/null @@ -1,91 +0,0 @@ - -* @copyright 2007-2011 PrestaShop SA -* @version Release: $Revision: 6844 $ -* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ - -class AdminQuickAccesses extends AdminTab -{ - public function __construct() - { - $this->table = 'quick_access'; - $this->className = 'QuickAccess'; - $this->lang = true; - $this->edit = true; - $this->delete = true; - - $this->fieldsDisplay = array( - 'id_quick_access' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), - 'name' => array('title' => $this->l('Name'), 'width' => 200), - 'link' => array('title' => $this->l('Link'), 'width' => 300), - 'new_window' => array('title' => $this->l('New window'), 'align' => 'center', 'type' => 'bool', 'activeVisu' => 'new_window')); - - parent::__construct(); - } - - public function displayForm($isMainTab = true) - { - parent::displayForm(); - - if (!($obj = $this->loadObject(true))) - return; - $new_window = $this->getFieldValue($obj, 'new_window'); - - echo ' -
- '.($obj->id ? '' : '').' -
'.$this->l('Quick Access menu').' - -
'; - foreach ($this->_languages as $language) - echo ' -
- * - '.$this->l('Forbidden characters:').' <>;=#{}  -
'; - $this->displayFlags($this->_languages, $this->_defaultFormLanguage, 'name', 'name'); - echo ' -
-
- -
- * -
- -
- - - - -
-
- -
-
* '.$this->l('required field').'
-
-
'; - } -} - - diff --git a/admin-dev/themes/template/form.tpl b/admin-dev/themes/template/form.tpl index beb1a08b5..9dd6361bc 100644 --- a/admin-dev/themes/template/form.tpl +++ b/admin-dev/themes/template/form.tpl @@ -83,6 +83,7 @@ {if isset($input.size)}size="{$input.size}"{/if} {if isset($input.class)}class="{$input.class}"{/if} {if isset($input.readonly) && $input.readonly}readonly="readonly"{/if} /> + {if isset($input.hint)}{$input.hint} {/if} {/foreach} {if count($languages) > 1} @@ -111,6 +112,7 @@ {if isset($input.size)}size="{$input.size}"{/if} {if isset($input.class)}class="{$input.class}"{/if} {if isset($input.readonly) && $input.readonly}readonly="readonly"{/if} /> + {if isset($input.hint)}{$input.hint} {/if} {/if} {elseif $input.type == 'select'}