summaryrefslogtreecommitdiffstats
path: root/client/components/settings
diff options
context:
space:
mode:
authorAkuket <32392661+Akuket@users.noreply.github.com>2018-07-16 12:51:18 +0200
committerGitHub <noreply@github.com>2018-07-16 12:51:18 +0200
commit980fd4f61e0fb8086e1ffc9bc5e73c294b5febe4 (patch)
tree46c187c49713349a17cbe5405c9142b9b1dd5b27 /client/components/settings
parent0dd82fedafa4cef98167bfd88917ec34624ae487 (diff)
downloadwekan-980fd4f61e0fb8086e1ffc9bc5e73c294b5febe4.tar.gz
wekan-980fd4f61e0fb8086e1ffc9bc5e73c294b5febe4.tar.bz2
wekan-980fd4f61e0fb8086e1ffc9bc5e73c294b5febe4.zip
Patch Invitation Code
Diffstat (limited to 'client/components/settings')
-rw-r--r--client/components/settings/invitationCode.js17
1 files changed, 12 insertions, 5 deletions
diff --git a/client/components/settings/invitationCode.js b/client/components/settings/invitationCode.js
index a403d8ab..ce2e9a5b 100644
--- a/client/components/settings/invitationCode.js
+++ b/client/components/settings/invitationCode.js
@@ -1,6 +1,13 @@
-Template.invitationCode.onRendered(() => {
- const setting = Settings.findOne();
- if (!setting || !setting.disableRegistration) {
- $('#invitationcode').hide();
- }
+Template.invitationCode.onRendered(function() {
+ Meteor.subscribe('setting', {
+ onReady : function() {
+ const setting = Settings.findOne();
+
+ if (!setting || !setting.disableRegistration) {
+ $('#invitationcode').hide();
+ }
+
+ return this.stop();
+ }
+ });
});