Browse Source

update initial-setup.html template -- massive overhaul.

I've removed the 'extends' blocks and built a completely seperated template from
the rest of the website. The template was not rendering properly because certain
parts of the website had not been set-up yet so the complete isolated template
was/is required.

I've, also, added extra options for the user to set during this first run
process which will be processed by the back-end. I've not put much work into
adding validation checks because it is a one-time thing (this page). You'll need
access to the server anyway -- at this point -- so a bit of manual correction of
mistakes will be easy to achieve. Deleting the database will be enough to
trigger the first run process again.
stable
Craig Oates 1 year ago
parent
commit
a834f54a13
  1. 170
      templates/initial-setup.html

170
templates/initial-setup.html

@ -1,32 +1,138 @@
{% extends "layouts/default.html" %}
{% block title %}Set-up your new archive{% endblock %}
{% block content %}
<h1>Let's get your new site up and running...</h1>
<p>
It looks like this is the first time you've started this
website. Create your new account and start uploading stuff.
</p>
<p>
Note: You will not be able to access this page again after you've
created your account. So, make sure you've made a note of you
account details.
</p>
<div>
<form action="/run-setup" method="post">
<fieldset>
<legend>Account Details</legend>
<input type="hidden" name="AUTHENTICITY-TOKEN" value="{{token}}">
<!-- <input type="hidden" name="METHOD" value="login"> -->
<input type="checkbox" name="allow-sign-up" value="checked" />
<label>Enable Sign-Up Users</label>
<label>Username</label>
<input required type="text" name="USERNAME">
<label>Display Name</label>
<input required type="text" name="DISPLAY-NAME">
<label>Password</label>
<input required type="password" name="PASSWORD">
<input type="submit" value="Create Account">
</fieldset>
</form>
</div>
{% endblock %}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Set-up your new website.</title>
<meta name="viewport"
content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible"
content="IE=edge">
<meta name="viewport"
content="width=device-width, initial-scale=1">
<meta name="description"
content="Explore Nicola Ellis & Ritherdon's archive.">
<meta name="keywords"
content="nicola, ellis, ritherdon, uk, metal, fabrication,
fabricators, steel, welding, powder paint, archive">
<link rel="stylesheet"
type="text/css"
media="screen"
href="/css/main.css">
<link rel="icon"
href="/images/favicon.png"
type="image/x-icon">
</head>
<body>
<main class="fr-main">
<div class="be-section-thumbnail-row">
<img alt="First Run"
src="/images/icons/default-cat.png">
<h1>Let's get your new site up and running...</h1>
</div>
<p>
It looks like this is the first time you've started this
website. Fill out the form below and start uploading stuff.
</p>
<div>
<form class="be-gui-form"
action="/run-setup"
method="post">
<input type="hidden"
name="AUTHENTICITY-TOKEN"
value="{{token}}">
<label>Website's Name</label>
<p class="fr-gui-form-hint">
This name will be displayed in the site's header. You
can change this after you've completed this initial
set-up.
</p>
<input required
type="text"
name="SITE-NAME"
placeholder="Enter your site's name here...">
<hr>
<div class="be-gui-form-row">
<input type="checkbox"
name="ALLOW-SIGN-UP"
value="checked">
<label>Allow Others to Sign-Up</label>
</div>
<p class="be-gui-form-hint">
Enabling this feature will allow anyone to create an account with
this website, upload files and create 'Archive Entries' and
'Pages'. You can turn this feature on and off in the site's
settings after this initial set-up.
</p>
<hr>
<div class="be-gui-form-row">
<input type="checkbox"
name="SHOW-SITE-LOGO"
value="checked">
<label>Show the Website's Logo</label>
</div>
<p class="be-gui-form-hint">
Enabling this feature will make the website display the
site's logo in the header, alongside the site's
name. You can turn this feature on and off in the
site's settings, after completing this initial set-up,
and replace the default one with your own.
</p>
<hr>
<h2>Account Details</h2>
<p class="be-gui-form-hint">
This account is the site's 'admin' (or 'super-user')
account. This gives you complete access to all the
site's features. No other account will have this
ability.
</p>
<label>Username</label>
<p class="fr-gui-form-hint">
This is the name you will use to log-in to the
website. It cannot be changed after you finish this
set-up. You can use your email address or a typical
username like 'neo' or 'the_milkman_3000'. Each account
must have a unique username.
</p>
<input required
type="text"
name="USERNAME"
placeholder="Enter your username here...">
<label>Display Name</label>
<p class="fr-gui-form-hint">
This is the name the website will refer to you as when
you log-in. Feel free to use your actual name here and
change it as often as you want.
</p>
<input required
type="text"
name="DISPLAY-NAME"
placeholder="Enter your display name here...">
<label>Password</label>
<input required
type="password"
name="PASSWORD"
placeholder="Enter your password here...">
<!-- <input type="submit" value="Create Account"> -->
<button class="be-gui-button"
title="Click to complete the set-up process"
type="submit">
<img alt="Complete Set-Up"
src="/images/icons/power.png">
Start Website
</button>
</form>
</div>
</main>
</body>
</html>

Loading…
Cancel
Save