Fixes for use enctype in forms

This commit is contained in:
Antonio de la Rosa 2015-09-09 05:10:30 +02:00
parent c423cb0b9c
commit f5d9fbd308
4 changed files with 24 additions and 0 deletions

View file

@ -157,6 +157,12 @@ class Webmodel {
public $enctype='';
/**
* Internal variable for check if forms use enctype parameters...
*/
public $check_enctype=0;
/**
* Array used for inverse foreign keys.
*
@ -1607,6 +1613,13 @@ class Webmodel {
}
$this->create_form($component_name);
if($this->check_enctype>0)
{
$this->set_enctype_binary();
}
}
@ -1654,6 +1667,8 @@ class Webmodel {
$this->forms[$component_name]->required=$component->required;
$this->forms[$component_name]->label=$component->label;
$this->check_enctype+=$this->forms[$component_name]->enctype;
$this->components[$component_name]->form_loaded=&$this->forms[$component_name];
$this->components[$component_name]->get_parameters_default();