1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-26 15:54:34 +02:00

Don't use type=number if a SQL function is used

This commit is contained in:
Jakub Vrana
2014-01-08 09:07:58 -08:00
parent 5444647f61
commit 683f6eefc7
3 changed files with 17 additions and 5 deletions

View File

@@ -453,12 +453,17 @@ function editingKeydown(event) {
function functionChange(select) {
var input = select.form[select.name.replace(/^function/, 'fields')];
if (selectValue(select)) {
if (input.origMaxLength === undefined) {
if (input.origType === undefined) {
input.origType = input.type;
input.origMaxLength = input.maxLength;
}
input.removeAttribute('maxlength');
} else if (input.origMaxLength >= 0) {
input.maxLength = input.origMaxLength;
input.type = 'text';
} else if (input.origType) {
input.type = input.origType;
if (input.origMaxLength >= 0) {
input.maxLength = input.origMaxLength;
}
}
helpClose();
}