. */ /** * Defines the field */ require_once(FILESYSTEMROOTPATH."include/form/AbstractFormField.php"); class PasswordField extends AbstractFormField { private $minLength; /** * Constructor */ public function __construct($name, $title, $minLength=-1) { parent::__construct($name, $title); $this->minLength = $minLength; } public function getField() { $ret = "name."[0]\" value=\"\"".($this->class!=NULL?" class=\"".$this->class."\"":"").">"; $ret .= "
"._("Please enter again").":
"; $ret .= "name."[1]\" value=\"\"".($this->class!=NULL?" class=\"".$this->class."\"":"").">"; return $ret; } public function getInputValue() { if( isset($_POST[$this->name][0]) && isset($_POST[$this->name][1]) && $_POST[$this->name][0]==$_POST[$this->name][1] && ($this->minLength<=0 || strlen($_POST[$this->name][0])>=$this->minLength) ) { return $_POST[$this->name][0]; }else { return NULL; } } } ?>