I have created a custom modal as if the report was modal. The available fields can be parameterized. I can not do this at meetings.
For example;
For example;
actionCreate: function (data) {
this.createView('createModal', 'crm:views/meeting/modals/create', {}, function (view) {
view.render();
this.listenToOnce(view, 'create', function (data) {
view.close();
this.getRouter().dispatch('Meeting', 'create', {
status: data.status,
returnUrl: this.lastUrl || '#' + this.scope,
returnDispatchParams: {
controller: this.scope,
action: null,
options: {
isReturn: true
}
}
});
this.getRouter().navigate('#Meeting/create/status=' + data.status, {trigger: false});
}, this);
});
}
create: function (options) {
options = options || {};
options.attributes = options.attributes || {};
if ('parent' in options) {
options.attributes.parent = options.parent;
}
Dep.prototype.create.call(this, options);
}
actionCreate: function (data) {
this.createView('createModal', 'crm:views/meeting/modals/create', {}, function (view) {
view.render();
this.listenToOnce(view, 'create', function (data) {
view.close();
this.getRouter().dispatch('Meeting', 'create', {
parent: data.parent,
returnUrl: this.lastUrl || '#' + this.scope,
returnDispatchParams: {
controller: this.scope,
action: null,
options: {
isReturn: true
}
}
});
this.getRouter().navigate('#Meeting/create/parent=' + data.parent, {trigger: false});
}, this);
});
}
events: {
'click #send': function (e) {
var parent = 'Contact';
this.trigger('create', {
parent: parent
});
}
},
setup: function () {
this.buttonList = [
{
name: 'cancel',
label: 'Cancel',
onClick: function (dialog) {
dialog.close();
}
}
];
this.header = this.translate('Create Meeting', 'labels', 'Meeting');
}
Comment