mirror of
https://github.com/frappe/lms.git
synced 2026-05-02 13:39:31 +03:00
fix(payment gateway): include reqd, options, default, and description in fields
This commit is contained in:
@@ -20,6 +20,7 @@
|
|||||||
:doctype="field.doctype"
|
:doctype="field.doctype"
|
||||||
:label="__(field.label)"
|
:label="__(field.label)"
|
||||||
:description="__(field.description)"
|
:description="__(field.description)"
|
||||||
|
:required="field.reqd"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div v-else-if="field.type == 'Code'">
|
<div v-else-if="field.type == 'Code'">
|
||||||
@@ -115,6 +116,7 @@
|
|||||||
:rows="field.rows"
|
:rows="field.rows"
|
||||||
:options="field.options"
|
:options="field.options"
|
||||||
:description="field.description"
|
:description="field.description"
|
||||||
|
:required="field.reqd"
|
||||||
placeholder=""
|
placeholder=""
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+19
-7
@@ -751,13 +751,25 @@ def get_transformed_fields(meta: list, data: dict = None):
|
|||||||
else:
|
else:
|
||||||
fieldtype = row.fieldtype
|
fieldtype = row.fieldtype
|
||||||
|
|
||||||
transformed_fields.append(
|
field = {
|
||||||
{
|
"label": row.label,
|
||||||
"label": row.label,
|
"name": row.fieldname,
|
||||||
"name": row.fieldname,
|
"type": fieldtype,
|
||||||
"type": fieldtype,
|
}
|
||||||
}
|
|
||||||
)
|
if row.reqd:
|
||||||
|
field["reqd"] = 1
|
||||||
|
|
||||||
|
if row.options:
|
||||||
|
field["options"] = row.options
|
||||||
|
|
||||||
|
if row.default:
|
||||||
|
field["default"] = row.default
|
||||||
|
|
||||||
|
if row.description:
|
||||||
|
field["description"] = row.description
|
||||||
|
|
||||||
|
transformed_fields.append(field)
|
||||||
|
|
||||||
return transformed_fields
|
return transformed_fields
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user