fix: only show fields if enabled

This commit is contained in:
Shariq Ansari 2025-01-15 19:24:25 +05:30
parent 8a912b21e0
commit b921ce9dff
2 changed files with 11 additions and 3 deletions

View File

@ -23,11 +23,11 @@
"label": "Enabled" "label": "Enabled"
}, },
{ {
"depends_on": "enabled",
"fieldname": "section_break_kfez", "fieldname": "section_break_kfez",
"fieldtype": "Section Break" "fieldtype": "Section Break"
}, },
{ {
"depends_on": "enabled",
"fieldname": "account_sid", "fieldname": "account_sid",
"fieldtype": "Data", "fieldtype": "Data",
"label": "Account SID", "label": "Account SID",
@ -43,6 +43,7 @@
"fieldtype": "Column Break" "fieldtype": "Column Break"
}, },
{ {
"depends_on": "enabled",
"fieldname": "api_key", "fieldname": "api_key",
"fieldtype": "Data", "fieldtype": "Data",
"in_list_view": 1, "in_list_view": 1,
@ -54,6 +55,7 @@
"fieldtype": "Column Break" "fieldtype": "Column Break"
}, },
{ {
"depends_on": "enabled",
"fieldname": "api_token", "fieldname": "api_token",
"fieldtype": "Password", "fieldtype": "Password",
"in_list_view": 1, "in_list_view": 1,
@ -71,7 +73,7 @@
"index_web_pages_for_search": 1, "index_web_pages_for_search": 1,
"issingle": 1, "issingle": 1,
"links": [], "links": [],
"modified": "2025-01-11 16:08:48.251477", "modified": "2025-01-15 19:14:25.568485",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "FCRM", "module": "FCRM",
"name": "CRM Exotel Settings", "name": "CRM Exotel Settings",

View File

@ -23,6 +23,7 @@
], ],
"fields": [ "fields": [
{ {
"depends_on": "enabled",
"fieldname": "account_sid", "fieldname": "account_sid",
"fieldtype": "Data", "fieldtype": "Data",
"in_list_view": 1, "in_list_view": 1,
@ -30,6 +31,7 @@
"mandatory_depends_on": "eval: doc.enabled" "mandatory_depends_on": "eval: doc.enabled"
}, },
{ {
"depends_on": "enabled",
"fieldname": "api_key", "fieldname": "api_key",
"fieldtype": "Data", "fieldtype": "Data",
"label": "API Key", "label": "API Key",
@ -37,6 +39,7 @@
"read_only": 1 "read_only": 1
}, },
{ {
"depends_on": "enabled",
"fieldname": "api_secret", "fieldname": "api_secret",
"fieldtype": "Password", "fieldtype": "Password",
"label": "API Secret", "label": "API Secret",
@ -48,6 +51,7 @@
"fieldtype": "Column Break" "fieldtype": "Column Break"
}, },
{ {
"depends_on": "enabled",
"fieldname": "auth_token", "fieldname": "auth_token",
"fieldtype": "Password", "fieldtype": "Password",
"in_list_view": 1, "in_list_view": 1,
@ -55,6 +59,7 @@
"mandatory_depends_on": "eval: doc.enabled" "mandatory_depends_on": "eval: doc.enabled"
}, },
{ {
"depends_on": "enabled",
"fieldname": "twiml_sid", "fieldname": "twiml_sid",
"fieldtype": "Data", "fieldtype": "Data",
"label": "TwiML SID", "label": "TwiML SID",
@ -67,6 +72,7 @@
}, },
{ {
"default": "0", "default": "0",
"depends_on": "enabled",
"fieldname": "record_calls", "fieldname": "record_calls",
"fieldtype": "Check", "fieldtype": "Check",
"label": "Record Calls" "label": "Record Calls"
@ -97,7 +103,7 @@
"index_web_pages_for_search": 1, "index_web_pages_for_search": 1,
"issingle": 1, "issingle": 1,
"links": [], "links": [],
"modified": "2024-12-30 19:23:04.401439", "modified": "2025-01-15 19:15:14.687909",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "FCRM", "module": "FCRM",
"name": "Twilio Settings", "name": "Twilio Settings",