Added int type to editform

This commit is contained in:
Eduard Urbach 2017-11-28 16:32:23 +01:00
parent cc1bd31eda
commit f0fbfd30b0

View File

@ -102,6 +102,12 @@ func RenderField(b *bytes.Buffer, v *reflect.Value, field reflect.StructField, i
return
}
// Int
if fieldType == "int" {
b.WriteString(components.InputNumber(idPrefix+field.Name, float64(fieldValue.Int()), field.Name, field.Tag.Get("tooltip"), "", "", "1"))
return
}
// Float
if fieldType == "float64" {
b.WriteString(components.InputNumber(idPrefix+field.Name, fieldValue.Float(), field.Name, field.Tag.Get("tooltip"), "", "", ""))