From 5b3b824b2d7bc174f2c9bc34304520dbf64cea8b Mon Sep 17 00:00:00 2001 From: benjamin Date: Thu, 7 Dec 2023 18:03:57 +0000 Subject: [PATCH] standalone - refresh the same page on login, taking us straight where we wanted to go --- .../templates/CRM/Standaloneusers/Page/Login.tpl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ext/standaloneusers/templates/CRM/Standaloneusers/Page/Login.tpl b/ext/standaloneusers/templates/CRM/Standaloneusers/Page/Login.tpl index ac40561086..2fe5fe543a 100644 --- a/ext/standaloneusers/templates/CRM/Standaloneusers/Page/Login.tpl +++ b/ext/standaloneusers/templates/CRM/Standaloneusers/Page/Login.tpl @@ -58,7 +58,12 @@ } else { // OK response (it includes contact_id and user_id in JSON, but we don't need those) - window.location = '/civicrm/'; + + // reload the page + // if we were trying to access a specific url, we will be taken to it + // if we reload the /civicrm/login we will be redirected to the home page + // (or an alternative url if we make that configurable) + location.reload(); } }); }); -- 2.25.1