website/web/templates/admin/maintenance.html

109 lines
3.9 KiB
HTML
Raw Permalink Normal View History

{{define "title"}}Admin - Maintenance Mode{{end}}
{{define "content"}}
{{$Root := .}}
<div class="container">
<section class="hero is-danger is-bold">
<div class="hero-body">
<div class="container">
<h1 class="title">
Maintenance Mode
</h1>
</div>
</div>
</section>
<form method="POST" action="{{.Request.URL.Path}}">
{{InputCSRF}}
<div class="p-4">
<p class="block">
This page allows you to set various Maintenance Mode flags that can pause or
disable website features if needed.
In an emergency, click on the Lock Down Everything button that will enable ALL maintenance
mode flags and basically disable the whole website for everybody except admin user accounts.
</p>
<p class="block">
<button type="submit" class="button is-danger mr-2"
name="intent" value="everything"
onclick="return confirm('Do you want to lock down EVERYTHING?')">
<i class="fa fa-exclamation-triangle mr-2"></i> Lock Down Everything
</button>
<button type="submit" class="button is-success"
name="intent" value="nothing"
onclick="return confirm('Do you want to RESTORE ALL site functionality?')">
<i class="fa fa-exclamation-triangle mr-2"></i> Restore Everything
</button>
</p>
<hr>
<label class="label">Maintenance Mode Settings</label>
<div class="field">
<label class="checkbox">
<input type="checkbox"
name="signup"
value="true"
{{if .Maint.PauseSignup}}checked{{end}}>
Pause new account signups
</label>
<p class="help">
New account signups are paused and a maintenance page is shown in its place.
</p>
</div>
<div class="field">
<label class="checkbox">
<input type="checkbox"
name="login"
value="true"
{{if .Maint.PauseLogin}}checked{{end}}>
Pause new logins
</label>
<p class="help">
The login page is disabled (except for admin user login). Already logged-in
users can remain logged in.
</p>
</div>
<div class="field">
<label class="checkbox">
<input type="checkbox"
name="chat"
value="true"
{{if .Maint.PauseChat}}checked{{end}}>
Pause chat room entry
</label>
<p class="help">
No new entries into the chat room are allowed.
</p>
</div>
<div class="field">
<label class="checkbox">
<input type="checkbox"
name="interaction"
value="true"
{{if .Maint.PauseInteraction}}checked{{end}}>
Pause <strong>all</strong> interactions
</label>
<p class="help">
Every site feature becomes basically 'admin required' and users are given an error
page where their only option is to log out or come back later.
</p>
</div>
<div class="block">
<button type="submit" class="button is-primary"
name="intent" value="save">
Save Settings
</button>
</div>
</div>
</div>
{{end}}