diff options
author | Lauri Ojansivu <x@xet7.org> | 2018-07-05 23:22:57 +0300 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2018-07-05 23:22:57 +0300 |
commit | b1b9170afe15be89ea6ed1f4361364940e9abd4f (patch) | |
tree | 2865f4348e6fab8003ce354a2c0a9320c27f65c7 /client/components | |
parent | 13e5ccb56e68eb7563b76b5f8b8eaf01b6ed552f (diff) | |
parent | 02f14d967f3f1cdd633131a31782297ef564a6d8 (diff) | |
download | wekan-b1b9170afe15be89ea6ed1f4361364940e9abd4f.tar.gz wekan-b1b9170afe15be89ea6ed1f4361364940e9abd4f.tar.bz2 wekan-b1b9170afe15be89ea6ed1f4361364940e9abd4f.zip |
Merge branch 'devel' of https://github.com/ppoulard/wekan into ppoulard-devel
Diffstat (limited to 'client/components')
-rw-r--r-- | client/components/main/layouts.jade | 3 | ||||
-rw-r--r-- | client/components/main/layouts.js | 17 |
2 files changed, 20 insertions, 0 deletions
diff --git a/client/components/main/layouts.jade b/client/components/main/layouts.jade index 4d76aabb..911f23f4 100644 --- a/client/components/main/layouts.jade +++ b/client/components/main/layouts.jade @@ -17,6 +17,9 @@ template(name="userFormsLayout") img(src="{{pathFor '/wekan-logo.png'}}" alt="Wekan") section.auth-dialog +Template.dynamic(template=content) + if isCas + .at-form + button#cas(class='at-btn submit' type='submit') {{casSignInLabel}} div.at-form-lang select.select-lang.js-userform-set-language each languages diff --git a/client/components/main/layouts.js b/client/components/main/layouts.js index f12718a7..6d6e616d 100644 --- a/client/components/main/layouts.js +++ b/client/components/main/layouts.js @@ -39,6 +39,16 @@ Template.userFormsLayout.helpers({ const curLang = T9n.getLanguage() || 'en'; return t9nTag === curLang; }, + + isCas() { + return Meteor.settings.public && + Meteor.settings.public.cas && + Meteor.settings.public.cas.loginUrl; + }, + + casSignInLabel() { + return TAPi18n.__('casSignIn', {}, T9n.getLanguage() || 'en'); + }, }); Template.userFormsLayout.events({ @@ -47,6 +57,13 @@ Template.userFormsLayout.events({ T9n.setLanguage(i18nTagToT9n(i18nTag)); evt.preventDefault(); }, + 'click button#cas'() { + Meteor.loginWithCas(function() { + if (FlowRouter.getRouteName() === 'atSignIn') { + FlowRouter.go('/'); + } + }); + }, }); Template.defaultLayout.events({ |