summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAngelo Gallarello <angelo.gallarell@gmail.com>2018-10-07 18:19:51 +0200
committerAngelo Gallarello <angelo.gallarell@gmail.com>2018-10-07 18:19:51 +0200
commit6931b88e4013754a7b03205a9916b9e607224f48 (patch)
treeec2a5786817a35a74f3a898bbb4860edf816c121
parentd0735e1d8edb4f88ede9f103e692eac7d41484f9 (diff)
downloadwekan-6931b88e4013754a7b03205a9916b9e607224f48.tar.gz
wekan-6931b88e4013754a7b03205a9916b9e607224f48.tar.bz2
wekan-6931b88e4013754a7b03205a9916b9e607224f48.zip
Prevent rules with no name
-rw-r--r--client/components/rules/rulesMain.js8
-rw-r--r--i18n/en.i18n.json2
2 files changed, 6 insertions, 4 deletions
diff --git a/client/components/rules/rulesMain.js b/client/components/rules/rulesMain.js
index feb46d74..3e871c69 100644
--- a/client/components/rules/rulesMain.js
+++ b/client/components/rules/rulesMain.js
@@ -34,9 +34,11 @@ BlazeComponent.extendComponent({
'click .js-goto-trigger' (event) {
event.preventDefault();
const ruleTitle = this.find('#ruleTitle').value;
- this.find('#ruleTitle').value = '';
- this.ruleName.set(ruleTitle);
- this.setTrigger();
+ if(ruleTitle != undefined && ruleTitle != ''){
+ this.find('#ruleTitle').value = '';
+ this.ruleName.set(ruleTitle);
+ this.setTrigger();
+ }
},
'click .js-goto-action' (event) {
event.preventDefault();
diff --git a/i18n/en.i18n.json b/i18n/en.i18n.json
index fdbe3007..cec9b6e4 100644
--- a/i18n/en.i18n.json
+++ b/i18n/en.i18n.json
@@ -532,7 +532,7 @@
"r-add-rule": "Add rule",
"r-view-rule": "View rule",
"r-delete-rule": "Delete rule",
- "r-new-rule-name": "Add new rule",
+ "r-new-rule-name": "New rule title",
"r-no-rules": "No rules",
"r-when-a-card-is": "When a card is",
"r-added-to": "Added to",