Fixes in forms
This commit is contained in:
parent
0e0adcb05f
commit
1cddd12e93
8 changed files with 57 additions and 21 deletions
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
23
src/Forms/TextAreaForm.php
Normal file
23
src/Forms/TextAreaForm.php
Normal 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
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue