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