From 8c69fd9b2e824114ee3cd0f6a7dcddc7e31d913c Mon Sep 17 00:00:00 2001 From: deva Date: Sun, 28 Feb 2010 10:20:09 +0000 Subject: Added users module. Made new password lineedit widget. --- utils/forms.php | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) (limited to 'utils/forms.php') diff --git a/utils/forms.php b/utils/forms.php index 45939e7..126d29f 100644 --- a/utils/forms.php +++ b/utils/forms.php @@ -19,6 +19,26 @@ class LineEdit { } } +class LineEditPwd { + public $label, $name, $value; + + function LineEditPwd($label, $name, $value = "") + { + $this->label = $label; + $this->name = $name; + $this->value = $value; + } + + function render($indent = "") + { + $str = $indent . "
\n"; + $str .= $indent . "
". $this->label ."
\n"; + $str .= $indent . "
name."]\" value=\"".$this->value."\" type=\"password\"/>
\n"; + $str .= $indent . "
\n"; + return $str; + } +} + class FileUpload { public $label, $name, $accept; @@ -358,6 +378,36 @@ class ListEditor { } } +class MultiList { + public $label, $name, $values; + + function MultiList($label, $name, $values = "") + { + $this->label = $label; + $this->name = $name; + $this->values = $values; + } + + function render($indent = "") + { + $str = $indent . "
\n"; + $str .= $indent . "
". $this->label ."
\n"; + $str .= $indent . "
\n"; + $str .= $indent . " \n"; + $str .= $indent . "
\n"; + $str .= $indent . "
\n"; + return $str; + } +} + class Form { public $widgets = array(); public $action; -- cgit v1.2.3