fix: javascript errors in SQL Form date inputs in IE

This commit is contained in:
Graham Knop 2007-07-24 22:32:05 +00:00
parent 9233864868
commit 86d9fc6860
2 changed files with 4 additions and 1 deletions

View file

@ -88,6 +88,7 @@
- Allow editing previous revisions of assets in the current version tag
- Add user to transactions list and pending transactions.
- fix: autolinking in wiki pages with manual links didn't work properly
- fix: javascript errors in SQL Form date inputs in IE
7.3.21
- fix: Self-deactivation doesn't show login screen after success

View file

@ -2442,7 +2442,9 @@ sub _getFormElement {
$fieldParameters->{$field->{widthParam}} = $field->{formFieldWidth} if ($field->{formFieldWidth});
$fieldParameters->{$field->{heightParam}} = $field->{formFieldHeight} if ($field->{formFieldHeight});
$fieldParameters->{maxlength} = $maxLength;
$fieldParameters->{extras} = 'onkeyup="if (this.value.length > '.$maxLength.') {this.value = this.value.substring(0,'.$maxLength.');}"';
if ($fieldType eq 'textarea') {
$fieldParameters->{extras} = 'onkeyup="if (this.value.length > '.$maxLength.') {this.value = this.value.substring(0,'.$maxLength.');}"';
}
$fieldParameters->{id} = 'sqlform'.$field->{fieldId};
# Show file if a file is uploaded