Fixes in forms

This commit is contained in:
Antonio de la Rosa 2016-02-19 03:22:01 +01:00
parent 0e0adcb05f
commit 1cddd12e93
8 changed files with 57 additions and 21 deletions

View file

@ -11,12 +11,19 @@ class MultiLangForm extends BaseForm{
public $type_form;
public function __construct($name, $value, $type_form='PhangoApp\PhaModels\Forms\BaseForm')
public function __construct($name, $value, $form_class='')
{
$this->type_form=new $type_form($name, $value);
parent::__construct($name, $value);
if($form_class=='')
{
$form_class=new BaseForm($name, $value);
}
$this->type_form=&$form_class;
}

View file

@ -0,0 +1,23 @@
<?php
namespace PhangoApp\PhaModels\Forms;
use PhangoApp\PhaModels\Forms\BaseForm;
use PhangoApp\PhaUtils\Utils;
use PhangoApp\PhaView\View;
use PhangoApp\PhaRouter\Routes;
use PhangoApp\PhaI18n\I18n;
class TextAreaForm extends BaseForm {
public function form()
{
?>
<p><textarea class="tinymce_editor" name="<?php echo $this->name; ?>"><?php echo $this->setform($this->default_value); ?></textarea></p>
<?php
}
}
?>