Removed default size from form fields

This commit is contained in:
Tobi Schäfer 2015-01-28 20:13:27 +01:00
parent e2fe90126b
commit 2acff557d0

View file

@ -267,9 +267,7 @@ helma.Html.prototype.input = function(param) {
return;
}
var attr = Object.prototype.reduce.call(param);
attr.type = "text";
if (!attr.size)
attr.size = 20;
attr.type = param.type || "text";
attr.value = (attr.value != null) ? encodeForm(attr.value) : "";
this.tag("input", attr);
return;
@ -467,8 +465,6 @@ helma.Html.prototype.dropDown = function(param, options, selectedValue, firstOpt
return;
}
var attr = Object.prototype.reduce.call(param);
if (!attr.size)
attr.size = 1;
this.openTag("select", attr);
res.write("\n ");
if (firstOption) {
@ -758,8 +754,6 @@ helma.Html.prototype.password = function(attr) {
return;
}
attr.type = "password";
if (!attr.size)
attr.size = 20;
this.tag("input", attr);
return;
};