浏览代码

Fix login flow

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Carl Schwan 1 年之前
父节点
当前提交
3fa6ee3c60

文件差异内容过多而无法显示
+ 0 - 1
core/css/server.css.map


+ 6 - 1
core/js/login/authpicker.js

@@ -5,4 +5,9 @@ jQuery(document).ready(function() {
 		$('#redirect-link').addClass('hidden');
 		$('#app-token-login-field').removeClass('hidden');
 	});
-});
+
+	document.getElementById('login-form').addEventListener('submit', function (e) {
+		e.preventDefault();
+		document.location.href = e.target.attributes.action.value
+	})
+})

+ 2 - 2
core/templates/loginflow/authpicker.php

@@ -46,9 +46,9 @@ $urlGenerator = $_['urlGenerator'];
 	<br/>
 
 	<p id="redirect-link">
-		<a href="<?php p($urlGenerator->linkToRoute('core.ClientFlowLogin.grantPage', ['stateToken' => $_['stateToken'], 'clientIdentifier' => $_['clientIdentifier'], 'oauthState' => $_['oauthState'], 'user' => $_['user'], 'direct' => $_['direct']])) ?>">
+		<form id="login-form" action="<?php p($urlGenerator->linkToRoute('core.ClientFlowLogin.grantPage', ['stateToken' => $_['stateToken'], 'clientIdentifier' => $_['clientIdentifier'], 'oauthState' => $_['oauthState'], 'user' => $_['user'], 'direct' => $_['direct']])) ?>" method="get">
 			<input type="submit" class="login primary icon-confirm-white" value="<?php p($l->t('Log in')) ?>">
-		</a>
+		</form>
 	</p>
 
 	<form action="<?php p($urlGenerator->linkToRouteAbsolute('core.ClientFlowLogin.apptokenRedirect')); ?>" method="post" id="app-token-login-field" class="hidden">

+ 1 - 1
core/templates/loginflowv2/authpicker.php

@@ -46,7 +46,7 @@ $urlGenerator = $_['urlGenerator'];
 	<br/>
 
 	<p id="redirect-link">
-		<form action="<?php p($urlGenerator->linkToRouteAbsolute('core.ClientFlowLoginV2.grantPage', ['stateToken' => $_['stateToken'], 'user' => $_['user']])) ?>" method="get">
+		<form id="login-form" action="<?php p($urlGenerator->linkToRouteAbsolute('core.ClientFlowLoginV2.grantPage', ['stateToken' => $_['stateToken'], 'user' => $_['user']])) ?>" method="get">
 			<input type="submit" class="login primary icon-confirm-white" value="<?php p($l->t('Log in')) ?>">
 		</form>
 	</p>

文件差异内容过多而无法显示
+ 0 - 0
dist/core-common.js


文件差异内容过多而无法显示
+ 0 - 0
dist/core-common.js.map


部分文件因为文件数量过多而无法显示