mirror of
https://github.com/wekan/wekan.git
synced 2026-11-26 20:45:07 -05:00
Render dates, placement, labels, people, custom-field display values, notes and readable relationships behind an opt-in Details checkbox. Recheck source and related access, admin-only field policy and field definitions; do not serialize account secrets or stale linked-source snapshots. Thirty-six Node suites and two local SMTP browser scenarios pass. Linked-source details and specialized fields remain open under #2713. Thanks to kabi178, bbyszio and xet7 !
27 lines
990 B
JavaScript
27 lines
990 B
JavaScript
import { Utils } from '/client/lib/utils';
|
|
import { saveRuleTriggerAction } from '/client/components/rules/rulesSaveHelper';
|
|
|
|
Template.mailActions.events({
|
|
'click .js-mail-action'(event, tpl) {
|
|
const emailTo = tpl.find('#email-to').value;
|
|
const emailSubject = tpl.find('#email-subject').value;
|
|
const emailMsg = tpl.find('#email-msg').value;
|
|
const data = Template.currentData();
|
|
const trigger = data.triggerVar.get();
|
|
const ruleName = data.ruleName.get();
|
|
const boardId = Session.get('currentBoard');
|
|
const desc = Utils.getTriggerActionDesc(event, tpl);
|
|
saveRuleTriggerAction(boardId, data.ruleId, ruleName, trigger, {
|
|
actionType: 'sendEmail',
|
|
emailTo,
|
|
emailSubject,
|
|
emailMsg,
|
|
includeCardDetails: tpl.find('#email-card-details').checked,
|
|
includeChecklistsAndComments: tpl.find('#email-discussion').checked,
|
|
includeAttachments: tpl.find('#email-attachments').checked,
|
|
boardId,
|
|
desc,
|
|
});
|
|
},
|
|
});
|