public function onCreate() { parent::onCreate(); $textField = new MTextField('ajaxPessoa[idPessoa]', '', 'IdPessoa'); $this->addField(new MHContainer('ajaxPessoa', array($textField, new MContentPane('panePessoa')))); $textField->ajaxText('onBlur', 'ajaxPessoa/getNome', 'panePessoa'); }
public function setValue($value) { if ($value instanceof MCurrency) { $value = $value->getValue($value); } parent::setValue(str_replace(',', '.', $value)); }
public function setValue($value) { if ($value instanceof MDate || $value instanceof MTimestamp) { $value = $value->format(); } parent::setValue($value); }
public function onCreate() { parent::onCreate(); //Compatibilidade com 9 dígitos, o último é opcional $mask = '(##) ####-####?#'; $this->setMask($mask); }
public function onCreate() { parent::onCreate(); $this->type = 'file'; $this->setClass('mFileField'); $this->setRender('inputfile'); }
public function onCreate() { parent::onCreate(); if ($this->getClass() == '') { $this->setClass('mMultilineField'); } $this->setRender('inputtextarea'); }
public function generateInner() { parent::generateInner(); if (!$this->readonly) { $text = $this->render(); $this->inner = $text; } }
public function generateInner() { $id = $this->getId(); $mv = new MVContainer(); for ($i = 0; $i <= $this->numRows; $i++) { $t = array(); $t[0] = new MDiv('', new MSpan('', $i + 1 . ": ", 'mCaption')); $t[0]->width = '25px'; for ($j = 0; $j <= $this->numCols; $j++) { $text = new MTextField("{$id}[{$i}][{$j}]", $this->aValue[$i][$j], '', $colWidth); if ($this->aMask[$i][$j] != '') { $text->addMask($this->aMask[$i][$j]); } $text->setAttribute('rowNumber', "{$i}"); $t[$j + 1] = $text; } $mh = new MHContainer('', $t); $mv->addControl($mh); } $this->inner = $mv; }
public function generateInner() { $field = new MTextField($this->name, $this->value, '', $this->size, $this->hint, $this->validator); $field->setAttributes($this->attributes); if ($this->autocomplete) { $field->addEvent('change', "{$this->lookupName}.start();"); } $field->setWidth($this->style->get('width')); $field->validator = $this->validator; $field->form = $this->form; $field->showLabel = $this->showLabel; if ($this->readonly) { $field->setClass('mReadOnly'); $field->addAttribute('readonly'); } parent::generateInner(); $lookupField = $this->getInner(); //$container = new MHContainer('', array($field, ( $this->readonly ? '' : $lookupField))); //$container->setShowLabel(false); $field = new MDiv('', $field, 'textfield'); $lookup = $this->readonly ? '' : $lookupField; $container = new MDiv('', array($field, $lookup), 'mLookupTextField mContainer'); //$container->setClass('mLookupField'); $this->inner = $container; }
public function onCreate() { parent::onCreate(); $this->setName($this->getId()); $this->setDojoType('dijit.Editor'); $this->page->addDojoRequire('dijit.Editor'); $this->page->addDojoRequire("dijit.Toolbar"); $this->page->addDojoRequire("dijit._editor.plugins.FontChoice"); // 'fontName','fontSize','formatBlock' $this->page->addDojoRequire("dijit._editor.plugins.TextColor"); $this->page->addDojoRequire('dojox.editor.plugins.PasteFromWord'); $this->page->addDojoRequire("dojox.editor.plugins.TablePlugins"); $this->page->addDojoRequire("dojox.editor.plugins.ResizeTableColumn"); $this->attributes->dojoProps->dojoProps["extraPlugins"] = "@[\"PasteFromWord\"]"; $this->attributes->dojoProps->dojoProps["plugins"] = "@[\"cut\",\"copy\"\n ,\"paste\",\"|\",\"bold\",\"italic\",\"underline\",\"strikethrough\"\n ,\"subscript\",\"superscript\",\"|\", \"indent\", \"outdent\"\n ,\"justifyLeft\", \"justifyCenter\", \"justifyRight\",\"|\",\n {name:\"dijit._editor.plugins.FontChoice\", command:\"fontName\", generic:true},\n {name: \"insertTable\"},\n {name: \"modifyTable\"},\n {name: \"insertTableRowBefore\"},\n {name: \"insertTableRowAfter\"},\n {name: \"insertTableColumnBefore\"},\n {name: \"insertTableColumnAfter\"},\n {name: \"deleteTableRow\"},\n {name: \"deleteTableColumn\"},\n {name: \"colorTableCell\"},\n {name: \"tableContextMenu\"}]"; $urlCSS = Manager::getAbsoluteURL('public/scripts/dojox/editor/plugins/resources/editorPlugins.css'); $this->page->addJsCode("dojo.create(\"link\", {href:'{$urlCSS}', type:'text/css', rel:'stylesheet'}, document.getElementsByTagName('head')[0]);"); $urlPasteFromWord = Manager::getAbsoluteURL('public/scripts/dojox/editor/plugins/resources/css/PasteFromWord.css'); $this->page->addJsCode("dojo.create(\"link\", {href:'{$urlPasteFromWord}', type:'text/css', rel:'stylesheet'}, document.getElementsByTagName('head')[0]);"); $this->setRender('div'); }
public function render() { $this->setRender('inputhidden'); return parent::render(); }
public function onCreate() { parent::onCreate(); $this->setMask('#######'); }
public function generateInner() { $this->type = 'password'; parent::generateInner(); }
public function onCreate() { parent::onCreate(); $this->overrideType = false; $this->setRender('inputnumberspinner'); }
public function generateInner() { $this->value = 'T' . $this->value; parent::generateInner(); }
public function generateInner() { $required = $this->validator instanceof MRequiredValidator; $this->setValidator(new MEmailValidator($this->id, 'Informe um email válido.', $required)); parent::generateInner(); }
public function setName($name) { $this->name = str_replace(array(':', '[', ']'), '', $name); $this->lookupName = "lookup" . ucfirst($this->name); parent::setName($this->name); }