fix: Set fieldname when attaching to field
This commit is contained in:
parent
2cfbe95c68
commit
eb87e6b773
3 changed files with 10 additions and 0 deletions
|
|
@ -144,6 +144,9 @@ export default {
|
|||
docname: {
|
||||
default: null
|
||||
},
|
||||
fieldname: {
|
||||
default: null
|
||||
},
|
||||
folder: {
|
||||
default: 'Home'
|
||||
},
|
||||
|
|
@ -406,6 +409,10 @@ export default {
|
|||
form_data.append('docname', this.docname);
|
||||
}
|
||||
|
||||
if (this.fieldname) {
|
||||
form_data.append('fieldname', this.fieldname);
|
||||
}
|
||||
|
||||
if (this.method) {
|
||||
form_data.append('method', this.method);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ export default class FileUploader {
|
|||
on_success,
|
||||
doctype,
|
||||
docname,
|
||||
fieldname,
|
||||
files,
|
||||
folder,
|
||||
restrictions,
|
||||
|
|
@ -28,6 +29,7 @@ export default class FileUploader {
|
|||
show_upload_button: !Boolean(this.dialog),
|
||||
doctype,
|
||||
docname,
|
||||
fieldname,
|
||||
method,
|
||||
folder,
|
||||
on_success,
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ frappe.ui.form.ControlAttach = frappe.ui.form.ControlData.extend({
|
|||
if (this.frm) {
|
||||
options.doctype = this.frm.doctype;
|
||||
options.docname = this.frm.docname;
|
||||
options.fieldname = this.df.fieldname;
|
||||
}
|
||||
|
||||
if (this.df.options) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue