fix: added precision field in webform field

This commit is contained in:
Shariq Ansari 2024-01-08 14:24:16 +05:30
parent cc9679ac76
commit 2969b6eff1
2 changed files with 11 additions and 1 deletions

View file

@ -17,6 +17,7 @@
"options",
"max_length",
"max_value",
"precision",
"property_depends_on_section",
"depends_on",
"mandatory_depends_on",
@ -143,11 +144,19 @@
"fieldtype": "Code",
"label": "Read Only Depends On",
"options": "JS"
},
{
"depends_on": "eval:in_list([\"Float\", \"Currency\", \"Percent\"], doc.fieldtype)",
"description": "Set non-standard precision for a Float or Currency field",
"fieldname": "precision",
"fieldtype": "Select",
"label": "Precision",
"options": "\n0\n1\n2\n3\n4\n5\n6\n7\n8\n9"
}
],
"istable": 1,
"links": [],
"modified": "2022-11-21 17:41:52.139191",
"modified": "2024-01-08 13:21:06.272248",
"modified_by": "Administrator",
"module": "Website",
"name": "Web Form Field",

View file

@ -56,6 +56,7 @@ class WebFormField(Document):
parent: DF.Data
parentfield: DF.Data
parenttype: DF.Data
precision: DF.Literal["", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
read_only: DF.Check
read_only_depends_on: DF.Code | None
reqd: DF.Check