summaryrefslogtreecommitdiffstats
path: root/client/components/rules/actions/mailActions.js
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2019-06-29 07:47:57 -0400
committerLauri Ojansivu <x@xet7.org>2019-06-29 07:47:57 -0400
commitb84dc20ded0375d9ab14ec05c78b737398d76b83 (patch)
treec3b91b3657299c779e941a1257df17bb0eade866 /client/components/rules/actions/mailActions.js
parent100288b3e1bce882ab9923a5bff7b5f620f33ee8 (diff)
parent3eb4d2c341b712268bd321173909e0a7b19a88c9 (diff)
downloadwekan-b84dc20ded0375d9ab14ec05c78b737398d76b83.tar.gz
wekan-b84dc20ded0375d9ab14ec05c78b737398d76b83.tar.bz2
wekan-b84dc20ded0375d9ab14ec05c78b737398d76b83.zip
Merge branch 'linting' of https://github.com/justinr1234/wekan into justinr1234-linting
Diffstat (limited to 'client/components/rules/actions/mailActions.js')
-rw-r--r--client/components/rules/actions/mailActions.js57
1 files changed, 28 insertions, 29 deletions
diff --git a/client/components/rules/actions/mailActions.js b/client/components/rules/actions/mailActions.js
index 40cbc280..87cb925c 100644
--- a/client/components/rules/actions/mailActions.js
+++ b/client/components/rules/actions/mailActions.js
@@ -1,35 +1,34 @@
BlazeComponent.extendComponent({
- onCreated() {
-
- },
+ onCreated() {},
events() {
- return [{
- 'click .js-mail-action' (event) {
- const emailTo = this.find('#email-to').value;
- const emailSubject = this.find('#email-subject').value;
- const emailMsg = this.find('#email-msg').value;
- const trigger = this.data().triggerVar.get();
- const ruleName = this.data().ruleName.get();
- const triggerId = Triggers.insert(trigger);
- const boardId = Session.get('currentBoard');
- const desc = Utils.getTriggerActionDesc(event, this);
- const actionId = Actions.insert({
- actionType: 'sendEmail',
- emailTo,
- emailSubject,
- emailMsg,
- boardId,
- desc,
- });
- Rules.insert({
- title: ruleName,
- triggerId,
- actionId,
- boardId,
- });
+ return [
+ {
+ 'click .js-mail-action'(event) {
+ const emailTo = this.find('#email-to').value;
+ const emailSubject = this.find('#email-subject').value;
+ const emailMsg = this.find('#email-msg').value;
+ const trigger = this.data().triggerVar.get();
+ const ruleName = this.data().ruleName.get();
+ const triggerId = Triggers.insert(trigger);
+ const boardId = Session.get('currentBoard');
+ const desc = Utils.getTriggerActionDesc(event, this);
+ const actionId = Actions.insert({
+ actionType: 'sendEmail',
+ emailTo,
+ emailSubject,
+ emailMsg,
+ boardId,
+ desc,
+ });
+ Rules.insert({
+ title: ruleName,
+ triggerId,
+ actionId,
+ boardId,
+ });
+ },
},
- }];
+ ];
},
-
}).register('mailActions');