2020-10-22 18:50:40 +02:00
|
|
|
{{ define "form-base" }}
|
|
|
|
<script>
|
2020-12-07 23:46:17 +01:00
|
|
|
window.usernameEnabled = {{ .username }};
|
2021-01-18 23:06:50 +01:00
|
|
|
window.validationStrings = JSON.parse({{ .validationStrings }});
|
|
|
|
window.invalidPassword = "{{ .strings.reEnterPasswordInvalid }}";
|
2020-11-22 17:36:43 +01:00
|
|
|
window.URLBase = "{{ .urlBase }}";
|
2021-01-14 15:22:20 +01:00
|
|
|
window.code = "{{ .code }}";
|
2021-04-07 16:17:15 +02:00
|
|
|
window.language = "{{ .langName }}";
|
2021-01-25 19:01:18 +01:00
|
|
|
window.messages = JSON.parse({{ .notifications }});
|
2021-01-30 20:19:12 +01:00
|
|
|
window.confirmation = {{ .confirmation }};
|
2021-02-28 16:41:06 +01:00
|
|
|
window.userExpiryEnabled = {{ .userExpiry }};
|
2021-04-08 21:43:01 +02:00
|
|
|
window.userExpiryMonths = {{ .userExpiryMonths }};
|
2021-02-28 16:41:06 +01:00
|
|
|
window.userExpiryDays = {{ .userExpiryDays }};
|
|
|
|
window.userExpiryHours = {{ .userExpiryHours }};
|
|
|
|
window.userExpiryMinutes = {{ .userExpiryMinutes }};
|
|
|
|
window.userExpiryMessage = {{ .userExpiryMessage }};
|
2021-05-07 02:08:12 +02:00
|
|
|
window.telegramEnabled = {{ .telegramEnabled }};
|
|
|
|
window.telegramRequired = {{ .telegramRequired }};
|
|
|
|
window.telegramPIN = "{{ .telegramPIN }}";
|
2021-12-20 19:44:31 +01:00
|
|
|
window.emailRequired = {{ .emailRequired }};
|
2021-05-21 22:35:25 +02:00
|
|
|
window.discordEnabled = {{ .discordEnabled }};
|
|
|
|
window.discordRequired = {{ .discordRequired }};
|
|
|
|
window.discordPIN = "{{ .discordPIN }}";
|
2021-05-23 20:50:03 +02:00
|
|
|
window.discordInviteLink = {{ .discordInviteLink }};
|
|
|
|
window.discordServerName = "{{ .discordServerName }}";
|
2021-05-29 18:43:11 +02:00
|
|
|
window.matrixEnabled = {{ .matrixEnabled }};
|
|
|
|
window.matrixRequired = {{ .matrixRequired }};
|
|
|
|
window.matrixUserID = "{{ .matrixUser }}";
|
2022-01-10 02:55:48 +01:00
|
|
|
window.captcha = {{ .captcha }};
|
2023-06-15 18:11:27 +02:00
|
|
|
window.reCAPTCHA = {{ .reCAPTCHA }};
|
|
|
|
window.reCAPTCHASiteKey = "{{ .reCAPTCHASiteKey }}";
|
2023-06-22 11:11:56 +02:00
|
|
|
window.userPageEnabled = {{ .userPageEnabled }};
|
2023-06-22 22:57:19 +02:00
|
|
|
window.userPageAddress = "{{ .userPageAddress }}";
|
2020-10-22 18:50:40 +02:00
|
|
|
</script>
|
2021-06-07 14:46:46 +02:00
|
|
|
{{ if .passwordReset }}
|
|
|
|
<script src="js/pwr.js" type="module"></script>
|
|
|
|
{{ else }}
|
2021-01-05 19:16:23 +01:00
|
|
|
<script src="js/form.js" type="module"></script>
|
2023-06-15 18:11:27 +02:00
|
|
|
{{ if .reCAPTCHA }}
|
|
|
|
<script>
|
|
|
|
var reCAPTCHACallback = () => {
|
|
|
|
const el = document.getElementsByClassName("g-recaptcha")[0];
|
|
|
|
grecaptcha.render(el, {
|
2023-06-15 18:35:51 +02:00
|
|
|
"sitekey": window.reCAPTCHASiteKey,
|
|
|
|
"theme": document.documentElement.classList.contains("dark") ? "dark" : "light"
|
2023-06-15 18:11:27 +02:00
|
|
|
});
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<script src="https://www.google.com/recaptcha/api.js?onload=reCAPTCHACallback&render=explicit" async defer></script>
|
|
|
|
{{ end }}
|
2020-10-22 18:50:40 +02:00
|
|
|
{{ end }}
|
2021-06-07 14:46:46 +02:00
|
|
|
{{ end }}
|