if (isset($arguments['aspassword'])) $el->setAsPassword($arguments['aspassword']);
break;
+ case 'password':
+ import('form.PasswordField');
+ $el = new PasswordField($arguments['name']);
+ $el->setMaxLength(@$arguments['maxlength']);
+ break;
+
// TODO: refactoring ongoing down from here.
// aspassword - change this name to something better? Perhaps.
// Change $arguments to something better too (maybe). $args or $params?
if ($el!=null) {
$el->setFormName($this->name);
if (isset($arguments["id"])) $el->setId($arguments["id"]);
- if (isset($GLOBALS["I18N"])) $el->setLocalization($GLOBALS["I18N"]);
+ if (isset($GLOBALS["I18N"])) $el->localize($GLOBALS["I18N"]);
if (isset($arguments["enable"])) $el->setEnabled($arguments["enable"]);
if (isset($arguments["style"])) $el->setStyle($arguments["style"]);
function addInputElement(&$el) {
if ($el && is_object($el)) {
- if (isset($GLOBALS["I18N"])) $el->setLocalization($GLOBALS["I18N"]);
+ if (isset($GLOBALS["I18N"])) $el->localize($GLOBALS["I18N"]);
$el->setFormName($this->name);
$this->elements[$el->name] = &$el;
$html = "\n";
foreach ($this->elements as $elname=>$el) {
if (strtolower(get_class($this->elements[$elname]))=="hidden") {
- $html .= $this->elements[$elname]->toStringControl()."\n";
+ $html .= $this->elements[$elname]->getHtml()."\n";
}
}
$html .= "</form>";