File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -204,6 +204,7 @@ class HomeSecurityHandler extends Handler {
204204 ] ) ) ,
205205 geoipProvider : this . ctx . get ( 'geoip' ) ?. provider ,
206206 relations,
207+ loginMethods : this . loginMethods ,
207208 } ;
208209 }
209210
Original file line number Diff line number Diff line change @@ -48,7 +48,10 @@ class UserLoginHandler extends Handler {
4848
4949 async get ( ) {
5050 this . response . template = 'user_login.html' ;
51- this . response . body . loginMethods = this . loginMethods ;
51+ this . response . body = {
52+ builtInLogin : system . get ( 'server.login' ) ,
53+ loginMethods : this . loginMethods ,
54+ } ;
5255 }
5356
5457 @param ( 'uname' , Types . Username )
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ <h1 class="section__title" id="linked-accounts" data-heading>{{ _('Linked Accoun
7070 < form method ="post ">
7171 < input type ="hidden " name ="operation " value ="unlink_account ">
7272 {%- for relation in relations -%}{% if relation.platform != 'mail' %}
73- {% set platform = handler. loginMethods.find(eval("r => r.id === '" + relation.platform + "'")) %}
73+ {% set platform = loginMethods.find(eval("r => r.id === '" + relation.platform + "'")) %}
7474 < li class ="platform-list__item ">
7575 < div class ="media ">
7676 {% if platform.icon %}
@@ -88,7 +88,7 @@ <h1 class="section__title" id="linked-accounts" data-heading>{{ _('Linked Accoun
8888 </ form >
8989 < form method ="post ">
9090 < input type ="hidden " name ="operation " value ="link_account ">
91- {%- for method in handler. loginMethods -%}
91+ {%- for method in loginMethods -%}
9292 {%- if not relations.some(eval("r => r.platform === '" + method.id + "'")) -%}
9393 < li class ="platform-list__item ">
9494 < div class ="media ">
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ <h1 class="dialog--signin__title">{{ _('SIGN IN') }}</h1>
4040 < input type ="submit " value ="{{ _('Login') }} " name ="login_submit " class ="expanded rounded primary button ">
4141 </ div > </ div >
4242 {% endif %}
43- {%- for v in handler. loginMethods -%}
43+ {%- for v in loginMethods -%}
4444 < div class ="row "> < div class ="columns ">
4545 < a href ="{{ url('user_oauth', type=v.id) }} " class ="expanded rounded button "> {{ _(v.text) }}</ a >
4646 </ div > </ div >
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ <h1>{{ _('Login') }}</h1>
3030 </ div >
3131 </ div > </ div >
3232 {% endif %}
33- {%- for v in handler. loginMethods -%}
33+ {%- for v in loginMethods -%}
3434 < div class ="row "> < div class ="columns ">
3535 < a href ="{{ url('user_oauth', type=v.id) }} " class ="expanded rounded button inverse "> {{ _(v.text) }}</ a >
3636 </ div > </ div >
You can’t perform that action at this time.
0 commit comments