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 section.auth-dialog
+Template.dynamic(template=content) +Template.dynamic(template=content)
if currentSetting.displayAuthenticationMethod if currentSetting.displayAuthenticationMethod
+connectionMethod +connectionMethod(authenticationMethod=currentSetting.defaultAuthenticationMethod)
div.at-form-lang div.at-form-lang
select.select-lang.js-userform-set-language select.select-lang.js-userform-set-language
each languages each languages

View file

@ -3,4 +3,7 @@ template(name='connectionMethod')
label {{_ 'authentication-method'}} label {{_ 'authentication-method'}}
select.select-authentication select.select-authentication
each authentications each authentications
if isSelected value
option(value="{{value}}" selected) {{_ value}}
else
option(value="{{value}}") {{_ value}} option(value="{{value}}") {{_ value}}

View file

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