/**
  * Initialize the products form
  */
 public function initialize($entity = null, $options = array())
 {
     $titulo = new Text("titulo");
     $titulo->setAttribute('class', 'form-control ');
     $this->add($titulo);
     $email = new Text("email");
     $email->setAttribute('class', 'form-control ');
     $this->add($email);
     $telefone = new Text("telefone");
     $telefone->setAttribute('class', 'form-control ');
     $this->add($telefone);
     $endereco = new Text("endereco");
     $endereco->setAttribute('class', 'form-control ');
     $this->add($endereco);
     $cep = new Text("cep");
     $cep->setLabel('CEP');
     $cep->setAttribute('data-mask', '99999-999');
     $cep->setAttribute('class', 'form-control ');
     $this->add($cep);
     $descricao = new TextArea("descricao");
     $descricao->setLabel('Descrição da loja');
     $descricao->setAttribute('class', 'form-control ');
     $descricao->setAttribute('rows', '5');
     $this->add($descricao);
     $produtos_por_pagina = new Numeric("produtos_por_pagina");
     $produtos_por_pagina->setLabel('Produtos por pagina');
     $produtos_por_pagina->setAttribute('class', 'form-control');
     $this->add($produtos_por_pagina);
     $produtos_destaque_quantidade = new Numeric("produtos_destaque");
     $produtos_destaque_quantidade->setLabel('Produtos destaques');
     $produtos_destaque_quantidade->setAttribute('class', 'form-control');
     $this->add($produtos_destaque_quantidade);
 }
 /**
  * Initialize the products form
  */
 public function initialize($entity = null, $options = array())
 {
     $f = new TextArea("meta_description");
     $f->setLabel('Meta Description');
     $f->setAttribute('class', 'form-control');
     $f->setAttribute('rows', '10');
     $this->add($f);
     $f = new TextArea("meta_keyword");
     $f->setLabel('Meta Keywords');
     $f->setAttribute('class', 'form-control');
     $f->setAttribute('rows', '10');
     $this->add($f);
 }
Пример #3
0
 /**
  * Initialize the products form
  */
 public function initialize($entity = null, $options = array())
 {
     $f = new text("aws_bucket");
     $f->setLabel('AWS Bucket');
     $f->setAttribute('class', 'form-control');
     $this->add($f);
     $f = new text("aws_id");
     $f->setLabel('AWS ID');
     $f->setAttribute('class', 'form-control');
     $this->add($f);
     $f = new text("aws_location");
     $f->setLabel('AWS LOCATION');
     $f->setAttribute('class', 'form-control');
     $this->add($f);
     $f = new text("aws_secret_key");
     $f->setLabel('AWS SECRET KEY');
     $f->setAttribute('class', 'form-control');
     $this->add($f);
     $f = new text("facebook_appId");
     $f->setLabel('Facebook app id');
     $f->setAttribute('class', 'form-control');
     $this->add($f);
     $f = new text("facebook_appSecret");
     $f->setLabel('Facebooke app secret');
     $f->setAttribute('class', 'form-control');
     $this->add($f);
     $f = new text("sendgrid_username");
     $f->setLabel('Sendgrid username');
     $f->setAttribute('class', 'form-control');
     $this->add($f);
     $f = new text("sendgrid_password");
     $f->setLabel('sendgrid password');
     $f->setAttribute('class', 'form-control');
     $this->add($f);
     $f = new text("sendgrid_templateId");
     $f->setLabel('sendgrid template ID');
     $f->setAttribute('class', 'form-control');
     $this->add($f);
     $f = new TextArea("mapa");
     $f->setLabel('Google Maps');
     $f->setAttribute('class', 'form-control');
     $f->setAttribute('rows', '10');
     $this->add($f);
     $f = new TextArea("chat");
     $f->setLabel('Chat');
     $f->setAttribute('class', 'form-control');
     $f->setAttribute('rows', '10');
     $this->add($f);
 }
 /**
  * Initialize the products form
  */
 public function initialize($entity = null, $options = array())
 {
     $f = new TextArea("institucional");
     $f->setLabel('&nbsp');
     $f->setAttribute('class', 'form-control summernote');
     $this->add($f);
 }
 /**
  * Initialize the products form
  */
 public function initialize($entity = null, $options = array())
 {
     $f = new TextArea("politica_de_privacidade");
     $f->setLabel('<strong>Politica de privacidade</strong>');
     $f->setAttribute('class', 'form-control');
     $f->setAttribute('rows', '10');
     $this->add($f);
     $f = new TextArea("politica_de_entrega");
     $f->setLabel('<strong>Politica de entrega</strong>');
     $f->setAttribute('class', 'form-control');
     $f->setAttribute('rows', '10');
     $this->add($f);
     $f = new TextArea("termos_de_uso");
     $f->setLabel('<strong>termos de usos</strong>');
     $f->setAttribute('class', 'form-control');
     $f->setAttribute('rows', '10');
     $this->add($f);
     $f = new TextArea("trocas_e_devolucoes");
     $f->setLabel('<strong>troca é devoluções</strong>');
     $f->setAttribute('class', 'form-control');
     $f->setAttribute('rows', '10');
     $this->add($f);
 }
 /**
  * Initialize the products form
  */
 public function initialize($entity = null, $options = array())
 {
     $f = new TextArea("email_pedido_criado");
     $f->setLabel('Notificador pedido criado');
     $f->setAttribute('class', 'form-control summernote');
     $this->add($f);
     $f = new TextArea("email_pedido_aprovado");
     $f->setLabel('Notificador pedido aprovado');
     $f->setAttribute('class', 'form-control summernote');
     $this->add($f);
     $f = new TextArea("email_pedido_cancelado");
     $f->setLabel('Notificador pedido cancelado');
     $f->setAttribute('class', 'form-control summernote');
     $this->add($f);
     $f = new TextArea("email_pedido_concluido");
     $f->setLabel('Notificador pedido concluido');
     $f->setAttribute('class', 'form-control summernote');
     $this->add($f);
     $f = new TextArea("email_pedido_transporte");
     $f->setLabel('Notificador pedido em transporte');
     $f->setAttribute('class', 'form-control summernote');
     $this->add($f);
 }
Пример #7
0
 /**
  * Initialize the products form
  */
 public function initialize($entity = null, $options = array())
 {
     $this->add(new Text("nome"));
     // $produto = new Select("produto_id", Produtos::returnArrayForSelect(), array(
     //     'using' => array('_id', 'nome'),
     //     'useEmpty'   => true,
     //     'emptyText'  => 'Nenhum ...',
     //     'emptyValue' => null,
     // ));
     // $produto->setLabel('Produto');
     // $this->add($produto);
     $categoria = new Select("categoria_id", Categorias::returnArrayForSelect(), array('using' => array('_id', 'nome'), 'useEmpty' => true, 'emptyText' => 'Nenhum ...', 'emptyValue' => 0));
     $categoria->setLabel('Categoria');
     $this->add($categoria);
     $posicao = new Select("posicao_id", Posicao::find(), array('using' => array('id', 'nome')));
     $posicao->setLabel('Local');
     $this->add($posicao);
     $this->add(new Text("link"));
     $descricao = new TextArea("descricao");
     $descricao->setLabel("Descrição");
     $descricao->setAttribute('rows', '10');
     $this->add($descricao);
     $this->add(new Numeric("ordem"));
 }
Пример #8
0
 /**
  * Initialize the products form
  */
 public function initialize($entity = null, $options = array())
 {
     $nome = new Text("nome");
     $nome->setLabel("Nome");
     $nome->setAttribute('class', 'form-control');
     $this->add($nome);
     $categoria = new Select("categoria", Categorias::returnArrayForSelect(), array('using' => array('_id', 'nome')));
     $categoria->setLabel("Categoria");
     $categoria->setAttribute('class', 'form-control');
     $this->add($categoria);
     #Opçõs setadas dinamicamente
     $detalhes = unserialize($this->ecommerce_options->produto_options);
     if (!empty($detalhes)) {
         foreach ($detalhes as $key => $value) {
             if ($value['referencia'] != '') {
                 $chave = $key;
                 $chave = new Select("{$value['label']}", $value['referencia']::find(array('order' => 'nome ASC')), array('using' => array('nome', 'nome'), 'useEmpty' => true, 'emptyText' => 'Nenhum ...', 'emptyValue' => null));
                 $chave->setLabel($value['label']);
                 $chave->setAttribute('class', 'form-control ' . $value['label']);
                 if (isset($obj) && !is_null($obj)) {
                     $chave->setDefault($obj->{$value}['label']);
                 }
                 $this->add($chave);
             }
         }
     }
     #Caso detalhes do produto esteja habilitado
     if ($this->ecommerce_options->produto_detalhes == '0') {
         $valor = new Text("valor");
         $valor->setAttribute('class', 'form-control money');
         $this->add($valor);
         $desconto = new Text("desconto");
         $desconto->setAttribute('class', 'form-control money');
         $this->add($desconto);
         $estoque = new Numeric("estoque");
         $estoque->setAttribute('class', 'form-control');
         $estoque->setAttribute('rows', '5');
         $this->add($estoque);
     }
     $descricao = new TextArea("resumo");
     $descricao->setLabel("Descrição Resumida");
     $descricao->setAttribute('class', 'form-control');
     $descricao->setAttribute('rows', '5');
     $this->add($descricao);
     $descricao = new TextArea("descricao");
     $descricao->setLabel("Descrição Completa");
     $descricao->setAttribute('class', 'form-control summernote');
     $descricao->setAttribute('rows', '10');
     $this->add($descricao);
     $destaque = new Select('destaque', array(0 => 'Não', 1 => 'Sim'));
     $destaque->setLabel('Destaque');
     $destaque->setAttribute('class', 'form-control');
     $this->add($destaque);
     $ativo = new Select('ativo', array(0 => 'Não', 1 => 'Sim'));
     $ativo->setLabel('Ativo');
     $ativo->setAttribute('class', 'form-control');
     $this->add($ativo);
     if ($this->ecommerce_options->produto_cubagem_detalhe == '0') {
         #Input Estoque
         $peso = new Numeric("peso");
         $peso->setLabel("peso");
         $peso->setAttribute('class', 'form-control');
         $this->add($peso);
         #Input Estoque
         $altura = new Numeric("altura");
         $altura->setLabel("altura");
         $altura->setAttribute('class', 'form-control');
         $this->add($altura);
         #Input Estoque
         $largura = new Numeric("largura");
         $largura->setLabel("largura");
         $largura->setAttribute('class', 'form-control');
         $this->add($largura);
         #Input Estoque
         $comprimento = new Numeric("comprimento");
         $comprimento->setLabel("comprimento");
         $comprimento->setAttribute('class', 'form-control');
         $this->add($comprimento);
     }
     $meta_title = new Text("meta_title");
     $meta_title->setLabel("Meta Title");
     $meta_title->setAttribute('class', 'form-control');
     $this->add($meta_title);
     $meta_description = new TextArea("meta_description");
     $meta_description->setLabel("Meta Description");
     $meta_description->setAttribute('class', 'form-control');
     $meta_description->setAttribute('rows', '5');
     $this->add($meta_description);
     $meta_keywords = new TextArea("meta_keywords");
     $meta_keywords->setLabel("Meta Keywords");
     $meta_keywords->setAttribute('class', 'form-control');
     $meta_keywords->setAttribute('rows', '5');
     $this->add($meta_keywords);
 }