40 lines
1.4 KiB
HTML
40 lines
1.4 KiB
HTML
{{define "admin"}}
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>{{.Title}}</title>
|
|
<link rel="stylesheet" href="{{.StaticPath}}/style.css">
|
|
<script src="{{.StaticPath}}/app.js" defer></script>
|
|
</head>
|
|
<body>
|
|
{{template "navbar" .}}
|
|
<main>
|
|
<header>
|
|
<h2>Admin Panel</h2>
|
|
</header>
|
|
{{if .ShowSuccess}}
|
|
<div class="notification success" style="position: static; margin-bottom: 1em; animation: none;">
|
|
Settings saved successfully!
|
|
</div>
|
|
{{end}}
|
|
<section>
|
|
<h3>Registration</h3>
|
|
<form method="post" action="{{.BasePath}}/admin/">
|
|
<input type="hidden" name="csrf_token" value="{{.CSRFToken}}">
|
|
<label for="allow_signup" style="display: flex; align-items: center; gap: 0.5em; cursor: pointer;">
|
|
<input type="checkbox" id="allow_signup" name="allow_signup" {{if .AllowSignup}}checked{{end}}>
|
|
<span>Allow new user signups</span>
|
|
</label>
|
|
<p style="margin-left: 1.5em; margin-top: 0.25em; font-size: 0.9em; opacity: 0.8;">
|
|
When disabled, the signup page redirects to login and prevents account creation.
|
|
</p>
|
|
|
|
<input type="submit" value="Save Settings" style="margin-top: 1.5em;">
|
|
</form>
|
|
</section>
|
|
</main>
|
|
{{template "cookie_banner" .}}
|
|
</body>
|
|
</html>
|
|
{{end}}
|