24 lines
641 B
Go Template
24 lines
641 B
Go Template
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<title>Lishwist</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<script>
|
|
function getSubmissionNames(form) {
|
|
return Array.from(new FormData(form).keys());
|
|
}
|
|
function acceptNames(form, submitId, ...acceptedNames) {
|
|
const submissionNames = getSubmissionNames(form);
|
|
const submitter = document.getElementById(submitId);
|
|
const accepted = submissionNames.length > 0 && submissionNames.every((name) => acceptedNames.includes(name));
|
|
submitter.disabled = !accepted;
|
|
}
|
|
</script>
|
|
</head>
|
|
|
|
<body>
|
|
{{template "body" .}}
|
|
</body>
|
|
|
|
</html> |