diff options
| author | Andrew Dolgov <fox@fakecake.org> | 2026-05-24 21:11:15 +0300 |
|---|---|---|
| committer | Andrew Dolgov <fox@fakecake.org> | 2026-05-24 21:11:15 +0300 |
| commit | ce40334f1a4708958b38c8565635019e4fbeefb9 (patch) | |
| tree | 1111c4ce4483f543a3bd3729228d8e04e2ad24ce /login.php | |
| parent | 76b2eb6f191c535a428ee71c74c406dc9d206d9e (diff) | |
| download | the-epube-ce40334f1a4708958b38c8565635019e4fbeefb9.tar.gz the-epube-ce40334f1a4708958b38c8565635019e4fbeefb9.tar.xz | |
remove inline event handlers, bring back html book descriptions
Diffstat (limited to 'login.php')
| -rw-r--r-- | login.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/login.php b/login.php index 41147d9..c15de6f 100644 --- a/login.php +++ b/login.php @@ -106,10 +106,6 @@ <link rel="manifest" href="manifest.json"> <meta name="mobile-web-app-capable" content="yes"> <script type="text/javascript"> - function oidc_login() { - window.location.href = '?op=perform-oidc-login'; - return false; - } function apply_night_mode(is_night) { console.log("night mode changed to", is_night); @@ -131,6 +127,11 @@ $(document).ready(function() { /* global EpubeApp */ + $(".oidc_login_btn").on("click", (e) => { + e.preventDefault(); + window.location.href = '?op=perform-oidc-login'; + }); + if (typeof EpubeApp != "undefined") { EpubeApp.setPage("PAGE_LOGIN"); $("body").addClass("is-epube-app"); @@ -165,7 +166,7 @@ </div> <button type="submit" class="btn btn-primary">Log in</button> <?php if (Config::get(Config::OIDC_URL) != "") { ?> - <button type="submit" onclick="return oidc_login()" class="btn btn-default">Log in with <?= Config::get(Config::OIDC_NAME) ?></button> + <button type="submit" class="oidc_login_btn btn btn-default">Log in with <?= Config::get(Config::OIDC_NAME) ?></button> <?php } ?> </form> </div> |
