mirror of
https://github.com/hrfee/jfa-go.git
synced 2024-12-22 17:10:10 +00:00
form: show radios for only linked contact methods
This commit is contained in:
parent
dbefb80f63
commit
25451eb763
@ -126,21 +126,21 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if or (.telegramEnabled) (or .discordEnabled .matrixEnabled) }}
|
{{ if or (.telegramEnabled) (or .discordEnabled .matrixEnabled) }}
|
||||||
<div id="contact-via" class="unfocused">
|
<div id="contact-via" class="unfocused">
|
||||||
<label class="row switch pb-4">
|
<label class="row switch pb-4 unfocused">
|
||||||
<input type="radio" name="contact-via" value="email" class="mr-2"><span>Contact through Email</span>
|
<input type="radio" name="contact-via" value="email" id="contact-via-email" class="mr-2"><span>Contact through Email</span>
|
||||||
</label>
|
</label>
|
||||||
{{ if .telegramEnabled }}
|
{{ if .telegramEnabled }}
|
||||||
<label class="row switch pb-4">
|
<label class="row switch pb-4 unfocused">
|
||||||
<input type="radio" name="contact-via" value="telegram" id="contact-via-telegram" class="mr-2"><span>Contact through Telegram</span>
|
<input type="radio" name="contact-via" value="telegram" id="contact-via-telegram" class="mr-2"><span>Contact through Telegram</span>
|
||||||
</label>
|
</label>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if .discordEnabled }}
|
{{ if .discordEnabled }}
|
||||||
<label class="row switch pb-4">
|
<label class="row switch pb-4 unfocused">
|
||||||
<input type="radio" name="contact-via" value="discord" id="contact-via-discord" class="mr-2"><span>Contact through Discord</span>
|
<input type="radio" name="contact-via" value="discord" id="contact-via-discord" class="mr-2"><span>Contact through Discord</span>
|
||||||
</label>
|
</label>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if .matrixEnabled }}
|
{{ if .matrixEnabled }}
|
||||||
<label class="row switch pb-4">
|
<label class="row switch pb-4 unfocused">
|
||||||
<input type="radio" name="contact-via" value="matrix" id="contact-via-matrix" class="mr-2"><span>Contact through Matrix</span>
|
<input type="radio" name="contact-via" value="matrix" id="contact-via-matrix" class="mr-2"><span>Contact through Matrix</span>
|
||||||
</label>
|
</label>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -70,7 +70,9 @@ if (window.telegramEnabled) {
|
|||||||
setTimeout(window.telegramModal.close, 2000);
|
setTimeout(window.telegramModal.close, 2000);
|
||||||
telegramButton.classList.add("unfocused");
|
telegramButton.classList.add("unfocused");
|
||||||
document.getElementById("contact-via").classList.remove("unfocused");
|
document.getElementById("contact-via").classList.remove("unfocused");
|
||||||
|
document.getElementById("contact-via-email").parentElement.classList.remove("unfocused");
|
||||||
const radio = document.getElementById("contact-via-telegram") as HTMLInputElement;
|
const radio = document.getElementById("contact-via-telegram") as HTMLInputElement;
|
||||||
|
radio.parentElement.classList.remove("unfocused");
|
||||||
radio.checked = true;
|
radio.checked = true;
|
||||||
validatorFunc();
|
validatorFunc();
|
||||||
} else if (!modalClosed) {
|
} else if (!modalClosed) {
|
||||||
@ -131,7 +133,9 @@ if (window.discordEnabled) {
|
|||||||
setTimeout(window.discordModal.close, 2000);
|
setTimeout(window.discordModal.close, 2000);
|
||||||
discordButton.classList.add("unfocused");
|
discordButton.classList.add("unfocused");
|
||||||
document.getElementById("contact-via").classList.remove("unfocused");
|
document.getElementById("contact-via").classList.remove("unfocused");
|
||||||
|
document.getElementById("contact-via-email").parentElement.classList.remove("unfocused");
|
||||||
const radio = document.getElementById("contact-via-discord") as HTMLInputElement;
|
const radio = document.getElementById("contact-via-discord") as HTMLInputElement;
|
||||||
|
radio.parentElement.classList.remove("unfocused")
|
||||||
radio.checked = true;
|
radio.checked = true;
|
||||||
validatorFunc();
|
validatorFunc();
|
||||||
} else if (!modalClosed) {
|
} else if (!modalClosed) {
|
||||||
@ -190,7 +194,9 @@ if (window.matrixEnabled) {
|
|||||||
matrixPIN = input.value;
|
matrixPIN = input.value;
|
||||||
matrixButton.classList.add("unfocused");
|
matrixButton.classList.add("unfocused");
|
||||||
document.getElementById("contact-via").classList.remove("unfocused");
|
document.getElementById("contact-via").classList.remove("unfocused");
|
||||||
const radio = document.getElementById("contact-via-discord") as HTMLInputElement;
|
document.getElementById("contact-via-email").parentElement.classList.remove("unfocused");
|
||||||
|
const radio = document.getElementById("contact-via-matrix") as HTMLInputElement;
|
||||||
|
radio.parentElement.classList.remove("unfocused");
|
||||||
radio.checked = true;
|
radio.checked = true;
|
||||||
validatorFunc();
|
validatorFunc();
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user