mirror of
https://github.com/frappe/lms.git
synced 2026-04-19 22:52:29 +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"
|
||||
:label="__(field.label)"
|
||||
:description="__(field.description)"
|
||||
:required="field.reqd"
|
||||
/>
|
||||
|
||||
<div v-else-if="field.type == 'Code'">
|
||||
@@ -115,6 +116,7 @@
|
||||
:rows="field.rows"
|
||||
:options="field.options"
|
||||
:description="field.description"
|
||||
:required="field.reqd"
|
||||
placeholder=""
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -751,13 +751,25 @@ def get_transformed_fields(meta: list, data: dict = None):
|
||||
else:
|
||||
fieldtype = row.fieldtype
|
||||
|
||||
transformed_fields.append(
|
||||
{
|
||||
"label": row.label,
|
||||
"name": row.fieldname,
|
||||
"type": fieldtype,
|
||||
}
|
||||
)
|
||||
field = {
|
||||
"label": row.label,
|
||||
"name": row.fieldname,
|
||||
"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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user