Added new form type

This commit is contained in:
Antonio de la Rosa 2015-08-25 21:36:07 +02:00
parent 7ab106db62
commit 7be0c01588
5 changed files with 67 additions and 13 deletions

View file

@ -9,6 +9,7 @@
*/
namespace PhangoApp\PhaModels\CoreFields;
use PhangoApp\PhaModels\Forms\BaseForm;
use PhangoApp\PhaUtils\Utils;
class PasswordField extends CharField {
@ -63,6 +64,24 @@ class PasswordField extends CharField {
return false;
}
/**
* By default primaryfield use a hidden form
*/
public function create_form()
{
$form=new BaseForm($this->name_component, $this->value);
$form->default_value=$this->default_value;
$form->required=$this->required;
$form->label=$this->label;
$form->type='password';
return $form;
}
}