Commit 7fb15af1 authored by Nigel McNie's avatar Nigel McNie Committed by Nigel McNie
Browse files

Removed a debug line. Add the maxlength attribute properly.

parent 8eca7cb4
......@@ -198,7 +198,6 @@ class Form {
foreach ($global as $key => $value) {
if (substr($key, 0, 7) == 'cancel_') {
$function = $this->name . '_' . $key;
log_dbg($function);
if (!function_exists($function)) {
throw new FormException('Form "' . $this->name . '" does not have a cancel function handler for "' . substr($key, 7) . '"');
}
......@@ -466,6 +465,10 @@ class Form {
}
}
if (isset($element['rules']['maxlength'])) {
$result .= ' maxlength="' . intval($element['rules']['maxlength']) . '"';
}
foreach (array_diff(array('disabled', 'readonly'), $exclude) as $attribute) {
if (!empty($element[$attribute])) {
$result .= " $attribute=\"$attribute\"";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment