-> below are code and attached screenshots as well when I try to add the control checkbox fields with component field then it is not working as expected this.form.addField({ name:"name", label:i18n("Name"), type:"text", value:"copy of task "+ _this.model.getHTML("name") });
this.form.addField({
name: "components",
label: i18n("components"),
type: "Checkbox",
value: false,
"onChange": function(value) {
if (_this.model) {
_this.model.selectedCheckBox = Boolean(value);
// if the box is checked, and the item matches our current filters. (XXX the logic of what is checked should probably not be a CSS class.)
if (value && !domClass.contains(_this.domNode, "does-not-match-filter")){
domClass.add(_this.domNode, "checked-dnd-checked");
domClass.remove(_this.domNode, "checked-dnd-unchecked");
}
else {
domClass.add(_this.domNode, "checked-dnd-unchecked");
domClass.remove(_this.domNode, "checked-dnd-checked");
}
}
}
});
this.form.addField({
name: "advanced",
label: i18n("Advanced"),
type: "Checkbox",
value: this.advanced || false
});
this.form.addField({
name: "comments",
label: i18n("Comments"),
type: "Checkbox",
value: this.comments || false
});
this.form.addField({
name: "depenDencies",
label: i18n("DepenDencies"),
type: "Checkbox",
value: this.depenDencies || false
});
this.form.addField({
type: "Checkbox",
name: "environment",
label: i18n("Environment"),
value: this.environment || false
});
this.form.addField({
name: "attachments",
label: i18n("Attachments"),
type: "Checkbox",
value: this.Attachments || false
});
this.form.placeAt(this.dialog.containerNode);
this.dialog.show();
}
},
Aucun commentaire:
Enregistrer un commentaire