From 74a5bc7e0d39220c42ae1449ceed592d0dfd3b43 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sun, 10 Mar 2013 14:37:03 +0000 Subject: [PATCH] added function to add simple text input fields --- lam/lib/baseModule.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lam/lib/baseModule.inc b/lam/lib/baseModule.inc index 72bf8b13..431b9a3a 100644 --- a/lam/lib/baseModule.inc +++ b/lam/lib/baseModule.inc @@ -1169,14 +1169,18 @@ abstract class baseModule { * @param String $attrName attribute name * @param String $label label name * @param boolean $required this is a required field (default false) + * @param integer $length field length */ - protected function addSimpleInputTextField(&$container, $attrName, $label, $required = false) { + protected function addSimpleInputTextField(&$container, $attrName, $label, $required = false, $length = null) { $value = ''; if (isset($this->attributes[$attrName][0])) { $value = $this->attributes[$attrName][0]; } $input = new htmlTableExtendedInputField($label, $attrName, $value, $attrName); $input->setRequired($required); + if ($length != null) { + $input->setFieldSize($length); + } $container->addElement($input, true); }