baselogin.html 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <!--
  2. Copyright (C) 2023 Nicola Murino
  3. This WebUI uses the KeenThemes Bootstrap Templates:
  4. https://keenthemes.com/bootstrap-templates
  5. KeenThemes HTML/CSS/JS components are allowed for use only within the
  6. SFTPGo product and restricted to be used in a resealable HTML template
  7. that can compete with KeenThemes products anyhow.
  8. This WebUI is allowed for use only within the SFTPGo product and
  9. therefore cannot be used in derivative works/products without an
  10. explicit grant from the SFTPGo Team ([email protected]).
  11. -->
  12. {{- define "baselogin"}}
  13. <!DOCTYPE html>
  14. <html lang="en">
  15. <head>
  16. <title></title>
  17. <meta charset="utf-8" />
  18. <meta name="description" content="" />
  19. <meta name="viewport" content="width=device-width, initial-scale=1" />
  20. <meta name="robots" content="noindex">
  21. <link rel="icon" type="image/png" href="{{.StaticURL}}{{.Branding.FaviconPath}}" />
  22. {{- template "fonts" . }}
  23. {{- range .Branding.DefaultCSS}}
  24. <link href="{{$.StaticURL}}{{.}}" rel="stylesheet" type="text/css">
  25. {{- end}}
  26. {{- template "globalstyle" .CSPNonce }}
  27. {{- range .Branding.ExtraCSS}}
  28. <link href="{{$.StaticURL}}{{.}}" rel="stylesheet" type="text/css">
  29. {{- end}}
  30. {{- template "commonjs" .CSPNonce}}
  31. </head>
  32. <body class="app-blank">
  33. {{- template "theme-setup" .CSPNonce}}
  34. <div id="app_loader" class="align-items-center text-center my-10">
  35. <span class="spinner-border w-15px h-15px text-muted align-middle me-2"></span>
  36. </div>
  37. <div class="d-flex flex-column flex-root d-none" id="app_root">
  38. <div class="d-flex flex-column flex-column-fluid bgi-position-y-bottom position-x-center bgi-no-repeat bgi-size-contain bgi-attachment-fixed">
  39. <div class="d-flex flex-center flex-column flex-column-fluid p-10 pb-lg-20">
  40. <div class="w-lg-500px w-md-450px w-sm-400px bg-body rounded shadow-sm p-10 p-lg-15 mx-auto">
  41. {{template "content" .}}
  42. </div>
  43. </div>
  44. </div>
  45. </div>
  46. <script {{- if .CSPNonce}} nonce="{{.CSPNonce}}"{{- end}} src="{{.StaticURL}}/assets/plugins/global/plugins.bundle.js"></script>
  47. <script {{- if .CSPNonce}} nonce="{{.CSPNonce}}"{{- end}} src="{{.StaticURL}}/assets/js/scripts.bundle.js"></script>
  48. <script {{- if .CSPNonce}} nonce="{{.CSPNonce}}"{{- end}} src="{{.StaticURL}}/vendor/i18next/i18next.min.js"></script>
  49. <script {{- if .CSPNonce}} nonce="{{.CSPNonce}}"{{- end}} src="{{.StaticURL}}/vendor/i18next/jquery-i18next.min.js"></script>
  50. <script {{- if .CSPNonce}} nonce="{{.CSPNonce}}"{{- end}} src="{{.StaticURL}}/vendor/i18next/i18nextBrowserLanguageDetector.min.js"></script>
  51. <script {{- if .CSPNonce}} nonce="{{.CSPNonce}}"{{- end}} src="{{.StaticURL}}/vendor/i18next/i18nextChainedBackend.min.js"></script>
  52. <script {{- if .CSPNonce}} nonce="{{.CSPNonce}}"{{- end}} src="{{.StaticURL}}/vendor/i18next/i18nextLocalStorageBackend.min.js"></script>
  53. <script {{- if .CSPNonce}} nonce="{{.CSPNonce}}"{{- end}} src="{{.StaticURL}}/vendor/i18next/i18nextHttpBackend.min.js"></script>
  54. {{- template "basejs" . }}
  55. <script type="text/javascript" {{- if .CSPNonce}} nonce="{{.CSPNonce}}"{{- end}}>
  56. KTUtil.onDOMContentLoaded(function () {
  57. $('#sign_in_form').submit(function (event) {
  58. let next = null;
  59. //{{- if .CheckRedirect}}
  60. const urlParams = new URLSearchParams(window.location.search);
  61. next = urlParams.get('next');
  62. //{{- end}}
  63. if (!next){
  64. let submitButton = document.querySelector('#sign_in_submit');
  65. submitButton.setAttribute('data-kt-indicator', 'on');
  66. submitButton.disabled = true;
  67. }
  68. });
  69. });
  70. </script>
  71. </body>
  72. </html>
  73. {{- end}}