forms - Prestashop HelperFrom/List - messy layout -


i'm new prestashop , worked whole day on creating office interface allows user write, edit, , delete articles. sort of blog. used prestashop's helpers (form , list) , works great. added new tab in office access tool.

the problem layout messy , doesn't other forms , listing pages. layout not sexy. maybe should @ css file, or add function in controller ? you'll find source code of latter here (i can't insert images, not enough reputation --'):

<?php      class article extends objectmodel  {       /** @var string name */      public $id_article;      public $titre;      public $contenu;      public $url_photo;          /**       * @see objectmodel::$definition       */      public static $definition = array(          'table' => 'article',          'primary' => 'id_article',          'fields' => array(              'titre' => array(                  'type' => self::type_string,                  'validate' => 'isgenericname',                  'required' => true,                  'class' => 'lg'              ),              'contenu' => array(                  'type' => self::type_string,                  'validate' => 'isgenericname',                  'required' => true              ),              'url_photo' => array(                  'type' => self::type_string,                  'validate' => 'isgenericname',                  'required' => false,              ),                        ),      );  }    class adminblogcontroller extends admincontroller{            public function initcontent(){          parent::initcontent();      }            public function __construct(){                     $this->table = 'article';           $this->classname = 'article';               $this->lang = false;              // building list of records stored within "article" table          $this->fields_list = array(              'id_article' => array(                  'title' => 'id',                  'align' => 'center',                  'width' => 25              ),              'titre' => array(                  'title' => 'titre',                  'width' => 'auto'              ),              'contenu' => array(                  'title' => 'contenu',                  'width' => 'auto'              )          );              // adds multiple deletion button          $this->bulk_actions = array(              'delete' => array(                  'text' => $this->l('delete selected'),                  'confirm' => $this->l('delete selected items?')              )          );              parent::__construct();      }          // method generates list of results      public function renderlist(){                    // adds edit button each result          $this->addrowaction('edit');              // adds delete button each result          $this->addrowaction('delete');              return parent::renderlist();      }          // method generates add/edit form      public function renderform(){                    // building add/edit form          $this->fields_form = array(              'tinymce' => true,              'legend' => array(                  'title' => 'article'              ),              'input' => array(                  array(                      'type' => 'text',                      'label' => 'titre',                      'name' => 'titre',                      'class' => 'lg',                      'required' => true,                      //'desc' => 'nom de l\'article',                  ),                  array(                      'type' => 'textarea',                      'label' => 'contenu',                      'name' => 'contenu',                      'class' => 'lg',                      'required' => true,                      'autoload_rte' => true,                      //'desc' => 'contenu de l\'article',                  ),                  array(                      'type' => 'file',                      'label' => 'photo',                      'name' => 'url_photo',                      'class' => 'lg',                      'required' => true,                      //'desc' => 'contenu de l\'article',                  )                                ),              'submit' => array(                  'title' => $this->l('save'),                  'class' => 'button'              )          );              return parent::renderform();      }        }    ?>

thank you.

i needed set $this->bootstrap = true


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -