function __construct() { parent::__construct(); // creates the form $this->form = new TQuickForm('form_Product'); $this->form->class = 'tform'; // CSS class $this->form->style = 'width: 650px;'; // defines the form title $this->form->setFormTitle('Product'); // define the database and the Active Record parent::setDatabase('samples'); parent::setActiveRecord('Product'); // units $units = array('PC' => 'Pieces', 'GR' => 'Grain'); // create the form fields $id = new TEntry('id'); $description = new TEntry('description'); $stock = new TEntry('stock'); $sale_price = new TEntry('sale_price'); $unity = new TCombo('unity'); $photo_path = new TFile('photo_path'); $id->setEditable(FALSE); $unity->addItems($units); $stock->setNumericMask(2, ',', '.', TRUE); // TRUE: process mask when editing and saving $sale_price->setNumericMask(2, ',', '.', TRUE); // TRUE: process mask when editing and saving // add the form fields $this->form->addQuickField('ID', $id, 200); $this->form->addQuickField('Description', $description, 200, new TRequiredValidator()); $this->form->addQuickField('Stock', $stock, 200, new TRequiredValidator()); $this->form->addQuickField('Sale Price', $sale_price, 200, new TRequiredValidator()); $this->form->addQuickField('Unity', $unity, 200, new TRequiredValidator()); $this->form->addQuickField('Photo Path', $photo_path, 200); $photo_path->setSize(200, 40); // add the actions $this->form->addQuickAction(_t('Save'), new TAction(array($this, 'onSave')), 'ico_save.png'); $this->form->addQuickAction(_t('New'), new TAction(array($this, 'onEdit')), 'ico_new.png'); $this->form->addQuickAction(_t('Back'), new TAction(array('ProductList', 'onReload')), 'ico_back.png'); $vbox = new TVBox(); $vbox->add(new TXMLBreadCrumb('menu.xml', 'ProductList')); $vbox->add($this->form); parent::add($vbox); }
function __construct() { parent::__construct(); Usuario::checkLogin(); // cria o formulario $this->form = new TQuickForm('form_Produtos'); $this->form->class = 'tform'; // class css do framework // titulo do formulario $this->form->setFormTitle('Produtos'); // banco de dados em uso parent::setDatabase('sample'); // model em uso parent::setActiveRecord('Produtos'); // cria os campos do formulario $id = new THidden('id'); $nome = new TEntry('nome'); //eleciona a categoria $categoria = new TDBCombo('categoria_id', 'sample', 'Categoria', 'id', 'nome', 'nome'); $descricao = new THtmlEditor('descricao'); $preco = new TEntry('preco'); $imagem = new PFile('imagem'); $imagem->setFolder('uploads'); $preco->addValidation('preco', new TNumericValidator()); // somente numeros $preco->setNumericMask(2, '.', ''); // seta a mascara para o mesmo padrao do mysql // adiciona os campos label,campo,tamanho $this->form->addQuickField('', $id, 100); $this->form->addQuickField('nome', $nome, 200); $this->form->addQuickField('preco', $preco, 200); $this->form->addQuickField('categoria', $categoria, 200); $this->form->addQuickField('imagem', $imagem, 200); $this->form->addQuickField('descricao', $descricao, 200); // para alterar o tamanho de componentes em sua altura e largura //deve coloca-las apos adicionar o campos no form $descricao->setSize(400, 300); // adciona actions no form $this->form->addQuickAction(_t('Save'), new TAction(array($this, 'onSave')), 'ico_save.png'); $this->form->addQuickAction(_t('New'), new TAction(array($this, 'onEdit')), 'ico_new.png'); // adciona o form na pagina parent::add($this->form); }
/** * Class constructor * Creates the page */ function __construct() { parent::__construct(); // load the styles TPage::include_css('app/resources/formdecorator.css'); // create the HTML Renderer $html = new THtmlRenderer('app/resources/formdecorator.html'); // create the form using TQuickForm class $this->form = new TQuickForm(); // create the form fields $id = new TEntry('id'); $description = new TEntry('description'); $date = new TDate('date'); $time = new TEntry('time'); $number = new TEntry('number'); $text = new TText('text'); $description->setTip('Type the description here...'); $date->setMask('dd/mm/yyyy'); // define date mask $time->setMask('99:99'); $number->setNumericMask(2, ',', '.'); // define numeric input // add the fields inside the form $this->form->addQuickField('Id', $id, 40); $this->form->addQuickField('Description', $description, 200); $this->form->addQuickField('Date (dd/mm/yyyy)', $date, 80); $this->form->addQuickField('Time (99:99)', $time, 60); $this->form->addQuickField('Numeric Input (9.999,99)', $number, 100); $this->form->addQuickField('Text', $text, 120); $text->setSize(200, 100); // define the form action $this->form->addQuickAction('Save', new TAction(array($this, 'onSave')), 'ico_save.png'); // replace the main section variables $replace = array('form' => $this->form); $html->enableSection('main', $replace); // wrap the page content using vertical box $vbox = new TVBox(); $vbox->add(new TXMLBreadCrumb('menu.xml', __CLASS__)); $vbox->add($html); parent::add($vbox); }
/** * Class constructor * Creates the page */ public function __construct() { parent::__construct(); new TSession(); // creates the items form and add a table inside $this->form_item = new TForm('form_pos'); $this->form_item->class = 'tform'; $table_item = new TTable(); $table_item->width = '100%'; $this->form_item->add($table_item); // create the form fields $product_id = new TDBSeekButton('product_id', 'samples', 'form_pos', 'Product', 'description', 'product_id', 'product_description'); $product_description = new TEntry('product_description'); $sale_price = new TEntry('sale_price'); $amount = new TEntry('amount'); $discount = new TEntry('discount'); $total = new TEntry('total'); // add validators $product_id->addValidation('Product', new TRequiredValidator()); $amount->addValidation('Amount', new TRequiredValidator()); // define the exit actions $product_id->setExitAction(new TAction(array($this, 'onExitProduct'))); $amount->setExitAction(new TAction(array($this, 'onUpdateTotal'))); $discount->setExitAction(new TAction(array($this, 'onUpdateTotal'))); // define some attributes $product_id->style = 'font-size: 17pt; height: 30px'; $product_description->style = 'font-size: 17pt; height: 30px'; $sale_price->style = 'font-size: 17pt; height: 30px'; $amount->style = 'font-size: 17pt; height: 30px'; $discount->style = 'font-size: 17pt; height: 30px'; $total->style = 'font-size: 17pt; height: 30px'; $product_id->button->style = 'height: 30px; margin-top:0px; vertical-align:top'; // define some properties $product_id->setSize(50); $product_description->setEditable(FALSE); $sale_price->setEditable(FALSE); $total->setEditable(FALSE); $sale_price->setNumericMask(2, '.', ','); $discount->setNumericMask(2, '.', ','); $total->setNumericMask(2, '.', ','); $sale_price->setSize(100); $amount->setSize(100); $discount->setSize(100); $total->setSize(100); // add a row for the form title $row = $table_item->addRow(); $row->class = 'tformtitle'; // CSS class $cell = $row->addCell(new TLabel('Point of Sales')); $cell->colspan = 4; // create the field labels $lab_pro = new TLabel('Product'); $lab_des = new TLabel('Description'); $lab_pri = new TLabel('Price'); $lab_amo = new TLabel('Amount'); $lab_dis = new TLabel('Discount'); $lab_tot = new TLabel('Total'); $lab_pro->setFontSize(17); $lab_des->setFontSize(17); $lab_pri->setFontSize(17); $lab_amo->setFontSize(17); $lab_dis->setFontSize(17); $lab_tot->setFontSize(17); $lab_pro->setFontFace('Trebuchet MS'); $lab_des->setFontFace('Trebuchet MS'); $lab_pri->setFontFace('Trebuchet MS'); $lab_amo->setFontFace('Trebuchet MS'); $lab_dis->setFontFace('Trebuchet MS'); $lab_tot->setFontFace('Trebuchet MS'); $lab_pro->setFontColor('red'); $lab_amo->setFontColor('red'); // creates the action button $button1 = new TButton('add'); $button1->setAction(new TAction(array($this, 'onAddItem')), 'Add item'); $button1->setImage('ico_add.png'); // add the form fields $table_item->addRowSet($lab_pro, $product_id, $lab_des, $product_description); $table_item->addRowSet($lab_pri, $sale_price, $lab_amo, $amount); $table_item->addRowSet($lab_dis, $discount, $lab_tot, array($total, $button1)); // define the form fields $this->form_item->setFields(array($product_id, $product_description, $sale_price, $amount, $discount, $total, $button1)); // creates the customer form and add a table inside it $this->form_customer = new TForm('form_customer'); $this->form_customer->class = 'tform'; $table_customer = new TTable(); $table_customer->width = '100%'; $this->form_customer->add($table_customer); // add a row for the form title $row = $table_customer->addRow(); $row->class = 'tformtitle'; // CSS class $cell = $row->addCell(new TLabel('Customer')); $cell->colspan = 5; // create the form fields $customer_id = new TDBSeekButton('customer_id', 'samples', 'form_customer', 'Customer', 'name', 'customer_id', 'customer_name'); $customer_name = new TEntry('customer_name'); // define validation and other properties $customer_id->addValidation('Customer', new TRequiredValidator()); $customer_id->style = 'font-size: 17pt; height: 30px'; $customer_name->style = 'font-size: 17pt; height: 30px'; $customer_id->button->style = 'height: 30px; margin-top:0px; vertical-align:top'; $customer_id->setSize(50); $customer_name->setEditable(FALSE); // create tha form labels $lab_cus = new TLabel('Customer'); $lab_nam = new TLabel('Name'); $lab_cus->setFontSize(17); $lab_nam->setFontSize(17); $lab_cus->setFontFace('Trebuchet MS'); $lab_nam->setFontFace('Trebuchet MS'); $lab_cus->setFontColor('red'); // action button $button2 = new TButton('save'); $button2->setAction(new TAction(array($this, 'onSave')), 'Save and finish'); $button2->setImage('ico_save.png'); // add the form fields inside the table $table_customer->addRowSet($lab_cus, $customer_id, $lab_nam, $customer_name, $button2); // define the form fields $this->form_customer->setFields(array($customer_id, $customer_name, $button2)); // creates the grid for items $this->cartgrid = new TQuickGrid(); $this->cartgrid->class = 'tdatagrid_table customized-table'; $this->cartgrid->makeScrollable(); $this->cartgrid->setHeight(150); parent::include_css('app/resources/custom-table.css'); $this->cartgrid->addQuickColumn('ID', 'product_id', 'right', 25); $this->cartgrid->addQuickColumn('Description', 'product_description', 'left', 230); $this->cartgrid->addQuickColumn('Price', 'sale_price', 'right', 80); $this->cartgrid->addQuickColumn('Amount', 'amount', 'right', 70); $this->cartgrid->addQuickColumn('Discount', 'discount', 'right', 70); $this->cartgrid->addQuickColumn('Total', 'total', 'right', 100); $this->cartgrid->addQuickAction('Delete', new TDataGridAction(array($this, 'onDelete')), 'product_id', 'ico_delete.png'); $this->cartgrid->createModel(); // wrap the page content using vertical box $vbox = new TVBox(); $vbox->add(new TXMLBreadCrumb('menu.xml', __CLASS__)); $vbox->add($this->form_item); $vbox->add(new TLabel(' ')); $vbox->add($this->cartgrid); $vbox->add(new TLabel(' ')); $vbox->add($this->form_customer); parent::add($vbox); }
/** * Class constructor * Creates the page and the registration form */ function __construct() { parent::__construct(); // creates the form $this->form = new TForm('form_Ticket'); $this->form->class = 'tform'; // CSS class $table = new TTable(); $table->style = 'width: 600px'; $tablePagamento = new TTable(); $tablePagamento->style = 'width: 600px'; $notebook = new TNotebook(600, 650); $notebook->appendPage('Ticket - Cadastramento', $table); $notebook->appendPage('Ticket - Orçamento / Pagamento', $tablePagamento); // create the form fields $id = new TEntry('id'); $id->setEditable(FALSE); $titulo = new TEntry('titulo'); $origem = new TCombo('origem'); $combo_origem = array(); $combo_origem['I'] = 'Interno'; $combo_origem['E'] = 'Externo'; $origem->addItems($combo_origem); $origem->setDefaultOption(FALSE); $solicitacao_descricao = new TText('solicitacao_descricao'); $providencia = new TText('providencia'); $orcamento_horas = new TEntry('orcamento_horas'); $orcamento_horas->setMask('999999'); $orcamento_valor_hora = new TEntry('orcamento_valor_hora'); $orcamento_valor_hora->setNumericMask(2, ',', '.'); $valor_desconto = new TEntry('valor_desconto'); $valor_desconto->setNumericMask(2, ',', '.'); $valor_total = new TEntry('valor_total'); $valor_total->setNumericMask(2, ',', '.'); $valor_total->setEditable(FALSE); $forma_pagamento = new TEntry('forma_pagamento'); $data_ultimo_pgto = new TEntry('data_ultimo_pgto'); $data_ultimo_pgto->setEditable(FALSE); $valor_ultimo_pgto = new TEntry('valor_ultimo_pgto'); $valor_ultimo_pgto->setNumericMask(2, ',', '.'); $valor_ultimo_pgto->setEditable(FALSE); $valor_total_pago = new TEntry('valor_total_pago'); $valor_total_pago->setNumericMask(2, ',', '.'); $valor_total_pago->setEditable(FALSE); $data_pagamento = new TDate('data_pagamento'); $data_pagamento->setMask('dd/mm/yyyy'); $valor_pagamento = new TEntry('valor_pagamento'); $valor_pagamento->setNumericMask(2, ',', '.'); $valor_total_parcial = new TEntry('valor_total_parcial'); $valor_total_parcial->setNumericMask(2, ',', '.'); $valor_total_parcial->setEditable(FALSE); $valor_saldo = new TEntry('valor_saldo'); $valor_saldo->setNumericMask(2, ',', '.'); $valor_saldo->setEditable(FALSE); $data_cadastro = new TEntry('data_cadastro'); $data_cadastro->setEditable(FALSE); $data_cadastro->setMask('dd/mm/yyyy'); $data_cadastro->setValue(date('d/m/Y')); $data_inicio = new TDate('data_inicio'); $data_inicio->setMask('dd/mm/yyyy'); $data_inicio_oculta = new THidden('data_inicio_oculta'); $data_cancelamento = new TDate('data_cancelamento'); $data_cancelamento->setMask('dd/mm/yyyy'); $data_encerramento = new TDate('data_encerramento'); $data_encerramento->setMask('dd/mm/yyyy'); $data_prevista = new TDate('data_prevista'); $data_prevista->setMask('dd/mm/yyyy'); $data_aprovacao = new TDate('data_aprovacao'); $data_aprovacao->setMask('dd/mm/yyyy'); $observacao = new TText('observacao'); $nome_dtr = new TEntry('nome_dtr'); $nome_dtr->setEditable(FALSE); $criteria = new TCriteria(); $criteria->add(new TFilter("origem", "=", 1)); $criteria->add(new TFilter("ativo", "=", 1)); $criteria->add(new TFilter("codigo_cadastro_origem", "=", 100)); $responsavel_id = new TDBCombo('responsavel_id', 'atividade', 'Pessoa', 'pessoa_codigo', 'pessoa_nome', 'pessoa_nome', $criteria); $tipo_ticket_id = new TDBCombo('tipo_ticket_id', 'atividade', 'TipoTicket', 'id', 'nome'); $tipo_ticket_id->setDefaultOption(FALSE); $sistema_id = new TDBCombo('sistema_id', 'atividade', 'Sistema', 'id', 'nome'); $status_ticket_id = new TDBCombo('status_ticket_id', 'atividade', 'StatusTicket', 'id', 'nome'); $status_ticket_id->setValue(2); $status_ticket_id->setEditable(FALSE); $prioridade_id = new TDBCombo('prioridade_id', 'atividade', 'Prioridade', 'id', 'nome'); $prioridade_id->setDefaultOption(FALSE); $prioridade_id->setValue(3); $combo_tipo_origens = new TCombo('tipo_origens'); $combo_tipo_origens->addItems(array(1 => 'Entidade', 2 => 'Estabelecimento', 3 => 'Empresa')); $combo_codigo_origem = new TCombo('codigo_cadastro_origem'); $combo_solicitante_id = new TCombo('solicitante_id'); try { TTransaction::open('atividade'); $logado = Pessoa::retornaUsuario(); TTransaction::close(); } catch (Exception $e) { new TMessage('error', '<b>Error</b> ' . $e->getMessage()); // shows the exception error message } $logado_id = new THidden('logado_id'); $logado_id->setValue($logado->pessoa_codigo); // define the sizes $id->setSize(100); $origem->setSize(200); $solicitacao_descricao->setSize(400, 180); $data_inicio->setSize(90); $data_encerramento->setSize(90); $data_cancelamento->setSize(90); $providencia->setSize(400, 80); $orcamento_horas->setSize(100); $orcamento_valor_hora->setSize(100); $valor_desconto->setSize(100); $valor_total->setSize(100); $valor_saldo->setSize(121); $forma_pagamento->setSize(400); $data_ultimo_pgto->setSize(100); $data_pagamento->setSize(100); $valor_pagamento->setSize(121); $valor_ultimo_pgto->setSize(100); $valor_total_pago->setSize(100); $valor_total_parcial->setSize(121); $data_cadastro->setSize(100); $data_prevista->setSize(100); $data_aprovacao->setSize(100); $observacao->setSize(400, 80); $nome_dtr->setSize(400); $titulo->setSize(390); $responsavel_id->setSize(390); $tipo_ticket_id->setSize(200); $sistema_id->setSize(200); $status_ticket_id->setSize(200); $prioridade_id->setSize(200); $combo_tipo_origens->setSize(135); $combo_codigo_origem->setSize(250); $combo_solicitante_id->setSize(390); // validações $titulo->addValidation('Titulo', new TRequiredValidator()); $combo_solicitante_id->addValidation('Solicitante', new TRequiredValidator()); $responsavel_id->addValidation('Responsável', new TRequiredValidator()); $sistema_id->addValidation('Sistema', new TRequiredValidator()); $gerar_dr = TButton::create('gerar_dr', array('RequisitoDesenvolvimentoForm', 'onEdit'), 'Gerar DTR', 'ico_add.png'); $link_dtr = new TButton('link_dtr'); $link_dtr->setImage('bs:edit green'); $link_dtr->setLabel('ir para DTR'); $link_dtr->addFunction("__adianti_load_page('index.php?class=RequisitoDesenvolvimentoForm&method=onBuscaDTR&key={$_REQUEST['key']}');"); $this->form->addField($gerar_dr); $this->form->addField($link_dtr); TButton::disableField('form_Ticket', 'gerar_dr'); TButton::disableField('form_Ticket', 'link_dtr'); // add one row for each form field // notebook Cadastramento $table->addRowSet(new TLabel('Ticket:'), array($id, new TLabel('Data Cadastro'), $data_cadastro)); $table->addRowSet($label_combo_origem = new TLabel('Origem:'), array($combo_tipo_origens, $combo_codigo_origem)); $label_combo_origem->setFontColor('#FF0000'); $table->addRowSet($label_solicitante = new TLabel('Solicitante:'), $combo_solicitante_id); $label_solicitante->setFontColor('#FF0000'); $table->addRowSet($label_responsavel = new TLabel('Responsável:'), $responsavel_id); $label_responsavel->setFontColor('#FF0000'); $table->addRowSet($label_titulo = new TLabel('Título:'), $titulo); $label_titulo->setFontColor('#FF0000'); $table->addRowSet(new TLabel('Data Inicio'), array($data_inicio, $label_status = new TLabel('Status:'), $status_ticket_id)); $label_status->setSize(70); $table->addRowSet(new TLabel('Data Encerramento:'), array($data_encerramento, $label_data_cancelamento = new TLabel('Data Cancelamento:'), $data_cancelamento)); $label_data_cancelamento->setSize(160); $table->addRowSet(new TLabel('Prioridade:'), $prioridade_id); $table->addRowSet(new TLabel('Origem:'), $origem); $table->addRowSet(new TLabel('Tipo Ticket:'), $tipo_ticket_id); $table->addRowSet($label_sistema = new TLabel('Sistema:'), $sistema_id); $label_sistema->setFontColor('#FF0000'); $table->addRowSet(new TLabel('Descrição Solicitação:'), $solicitacao_descricao); $table->addRowSet(new TLabel('DR.:'), $nome_dtr); $table->addRowSet(new TLabel(''), array($gerar_dr, $link_dtr)); $table->addRowSet(new TLabel(''), $data_inicio_oculta); // notebook Pagamento $tablePagamento->addRowSet(new TLabel('Data Prevista:'), $data_prevista); $tablePagamento->addRowSet(new TLabel('Data Aprovação:'), $data_aprovacao); $tablePagamento->addRowSet(new TLabel('Qte Horas:'), $orcamento_horas); $tablePagamento->addRowSet(new TLabel('Valor Hora:'), $orcamento_valor_hora); $tablePagamento->addRowSet(new TLabel('Valor Desconto:'), $valor_desconto); $tablePagamento->addRowSet(new TLabel('Valor Total:'), $valor_total); $tablePagamento->addRowSet(new TLabel('Forma de Pgto:'), $forma_pagamento); $tablePagamento->addRowSet(new TLabel('Descrição Providência:'), $providencia); $tablePagamento->addRowSet(new TLabel('Observação:'), $observacao); // creates a frame $frame = new TFrame(); $frame->oid = 'frame-measures'; $frame->setLegend('Pagamentos:'); $row = $tablePagamento->addRow(); $cell = $row->addCell($frame); $cell->colspan = 2; $page2 = new TTable(); $frame->add($page2); $page2->addRowSet(new TLabel('Valor Pgto:'), array($valor_pagamento, $tamanho_label = new TLabel('Valor Ultimo Pgto:'), $valor_ultimo_pgto)); $tamanho_label->setSize(150); $page2->addRowSet(new TLabel('Data Pgto:'), array($data_pagamento, $tamanho_label = new TLabel('Data Ultimo Pgto:'), $data_ultimo_pgto)); $tamanho_label->setSize(150); $page2->addRowSet(new TLabel('Valor Total:'), array($valor_total_parcial, $tamanho_label = new TLabel('Valor Total Pago: '), $valor_total_pago)); $tamanho_label->setSize(150); $page2->addRowSet(new TLabel('Saldo a pagar:'), $valor_saldo); $tablePagamento->addRowSet(new TLabel(''), $logado_id); // Envia campos para o formulario $this->form->setFields(array($id, $titulo, $data_inicio, $data_inicio_oculta, $data_encerramento, $data_cancelamento, $origem, $solicitacao_descricao, $nome_dtr, $providencia, $orcamento_horas, $orcamento_valor_hora, $valor_desconto, $valor_total, $forma_pagamento, $data_ultimo_pgto, $valor_ultimo_pgto, $valor_total_pago, $data_cadastro, $data_prevista, $data_aprovacao, $observacao, $tipo_ticket_id, $sistema_id, $status_ticket_id, $prioridade_id, $responsavel_id, $valor_total_parcial, $valor_pagamento, $data_pagamento, $valor_saldo, $combo_tipo_origens, $combo_codigo_origem, $combo_solicitante_id, $logado_id)); // create the form actions $save_button = TButton::create('save', array($this, 'onSave'), _t('Save'), 'fa:floppy-o'); $new_button = TButton::create('new', array($this, 'onEdit'), _t('New'), 'fa:plus-square green'); $del_button = TButton::create('delete', array($this, 'onDelete'), _t('Delete'), 'fa:trash-o red fa-lg'); $list_button = TButton::create('list', array('TicketList', 'onReload'), _t('List'), 'fa:table blue'); $enviar_email = TButton::create('email', array($this, 'onEnviaEmail'), 'Enviar Email', 'ico_email.png'); $sincronizar = TButton::create('sincronizar', array($this, 'onSincronizarContatos'), 'Sincronizar Contatos', 'sincronizar.png'); $this->form->addField($save_button); $this->form->addField($new_button); $this->form->addField($del_button); $this->form->addField($list_button); $this->form->addField($enviar_email); $this->form->addField($sincronizar); $subtable = new TTable(); $row = $subtable->addRow(); $row->addCell($save_button); $row->addCell($new_button); $row->addCell($del_button); $row->addCell($list_button); $row->addCell($enviar_email); $row->addCell($sincronizar); $pretable = new TTable(); $pretable->style = 'width: 100%'; $row = $pretable->addRow(); $row->class = 'tformtitle'; // CSS class $row->addCell(new TLabel('Cadastro de Ticket'))->colspan = 2; $change_action = new TAction(array($this, 'onCalculaValorTotal')); $orcamento_horas->setExitAction($change_action); $orcamento_valor_hora->setExitAction($change_action); $valor_desconto->setExitAction($change_action); $change_data_action = new TAction(array($this, 'onChangeDataAction')); $data_aprovacao->setExitAction($change_data_action); $change_data_prev = new TAction(array($this, 'onChangeDataPrevista')); $data_prevista->setExitAction($change_data_prev); $change_data_pagamento = new TAction(array($this, 'onChangeDataPagamento')); $data_pagamento->setExitAction($change_data_pagamento); $change_valor = new TAction(array($this, 'onCalculaValorParcial')); $valor_pagamento->setExitAction($change_valor); $change_status = new TAction(array($this, 'onChangeDataInicio')); $data_inicio->setExitAction($change_status); $change_status = new TAction(array($this, 'onChangeDataCancelamento')); $data_cancelamento->setExitAction($change_status); $change_status = new TAction(array($this, 'onChangeDataEncerramento')); $data_encerramento->setExitAction($change_status); $change_origem = new TAction(array($this, 'onChangeOrigem')); $combo_tipo_origens->setChangeAction($change_origem); $change_tipo_origem = new TAction(array($this, 'onChangeTipoOrigem')); $combo_codigo_origem->setChangeAction($change_tipo_origem); $vbox = new TVBox(); $vbox->add($pretable); $vbox->add($notebook); $vbox->add($subtable); $this->form->add($vbox); parent::add($this->form); }