FF
TWindow não abre
Estou com um problema. Usava uma maquina em linux e estava tudo beleza. Troquei a maquina por windows e estou rodando um a aplicação em localhost mesmo, o sistema roda beleza porém tudo que fiz com TWindow para cadastros auxiliares rápidos não está abrindo fica processando e não tenho retorno.
Exemplo do botao que chama o TWindow
$btn_cargo = TButton::create('add_cargo', ['CargoFormWindow', 'onClear'], '', 'far: fa-plus-square');
$btn_cargo->class = 'btn btn-default btn-sm inline-button';
$btn_cargo->style = 'margin-top: 1px; border-bottom: thin solid #DFDFDF';
$btn_cargo->title = 'Inserir novo cargo';
$cargo_id->after($btn_cargo);
$this->form->addField($btn_cargo);
Codigo do formulário TWindow
Exemplo do botao que chama o TWindow
$btn_cargo = TButton::create('add_cargo', ['CargoFormWindow', 'onClear'], '', 'far: fa-plus-square');
$btn_cargo->class = 'btn btn-default btn-sm inline-button';
$btn_cargo->style = 'margin-top: 1px; border-bottom: thin solid #DFDFDF';
$btn_cargo->title = 'Inserir novo cargo';
$cargo_id->after($btn_cargo);
$this->form->addField($btn_cargo);
Codigo do formulário TWindow
- <?php
- class GrupoFormWindow extends TWindow
- {
- protected $form; // form
- use Adianti\Base\AdiantiStandardFormTrait; // Standard form methods
- /**
- * Class constructor
- * Creates the page and the registration form
- */
- function __construct()
- {
- parent::__construct();
- parent::setSize(0.5, 0.5);
- $this->setDatabase('unit_database'); // defines the database
- $this->setActiveRecord('Grupo'); // defines the active record
- // creates the form
- $this->form = new BootstrapFormBuilder('form_Grupo');
- $this->form->setFormTitle('Grupo');
- // create the form fields
- $nome = new TEntry('nome');
- // add the fields
- $this->form->addFields( [ new TLabel('Grupo') ], [ $nome ] );
- $nome->addValidation('Grupo', new TRequiredValidator);
- // set sizes
- $nome->setSize('100%');
- if (!empty($id))
- {
- $id->setEditable(FALSE);
- }
- // create the form actions
- $btn = $this->form->addAction(_t('Save'), new TAction([$this, 'onSave']), 'fa:save');
- $btn->class = 'btn btn-sm btn-primary';
- $this->form->addActionLink(_t('New'), new TAction([$this, 'onEdit']), 'fa:eraser red');
- // vertical box container
- $container = new TVBox;
- $container->style = 'width: 100%';
- $container->add($this->form);
- parent::add($container);
- }
- }
- Preciso da ajuda de vocês para conseguir solucionar este problema
https://adianti.com.br/forum/pt/view_5093?minha-aplicacao-esta-com-erro-por-onde-comeco-a-procurar