Fix authentication dropdown

This commit is contained in:
guillaume 2019-02-15 17:06:05 +01:00
parent ec453b89b8
commit 4ce766853c
3 changed files with 9 additions and 3 deletions

View file

@ -24,7 +24,7 @@ template(name="userFormsLayout")
section.auth-dialog
+Template.dynamic(template=content)
if currentSetting.displayAuthenticationMethod
+connectionMethod
+connectionMethod(authenticationMethod=currentSetting.defaultAuthenticationMethod)
div.at-form-lang
select.select-lang.js-userform-set-language
each languages

View file

@ -2,5 +2,8 @@ template(name='connectionMethod')
div.at-form-authentication
label {{_ 'authentication-method'}}
select.select-authentication
each authentications
option(value="{{value}}") {{_ value}}
each authentications
if isSelected value
option(value="{{value}}" selected) {{_ value}}
else
option(value="{{value}}") {{_ value}}

View file

@ -31,4 +31,7 @@ Template.connectionMethod.helpers({
authentications() {
return Template.instance().authenticationMethods.get();
},
isSelected(match) {
return Template.instance().data.authenticationMethod === match;
},
});