Big Update Added Services and Admin
This commit is contained in:
9
views/dashboard.html.twig
Normal file
9
views/dashboard.html.twig
Normal file
@@ -0,0 +1,9 @@
|
||||
{% extends '@novaconium/master.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{{title}}</h1>
|
||||
<p>Dashboard page</p>
|
||||
<p><a href="/">Homepage</a></p>
|
||||
<p><a href="/novaconium/logout">logout</p>
|
||||
|
||||
{% endblock %}
|
||||
67
views/init.html.twig
Normal file
67
views/init.html.twig
Normal file
@@ -0,0 +1,67 @@
|
||||
{% extends '@novaconium/master.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{{title}}</h1>
|
||||
|
||||
{% if not secure_key %}
|
||||
<div id="secure_key">
|
||||
<h2>Secure Key</h2>
|
||||
<p>Please set the <code>secure_key</code> in <code>App/config.php</code> to an alphanumeric code that is 64 characters in length.</p>
|
||||
<p>You can generate a secure key like this:</p>
|
||||
<pre><code>pwgen -sB 64 1</code></pre>
|
||||
<p>Or use this one:</p>
|
||||
<pre><code>{{gen_key}}</code></pre>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if users_created %}
|
||||
<div id="users_created">
|
||||
<h2>Users Table Created</h2>
|
||||
<p>There was no users table in the database. One was created.</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if empty_users and secure_key %}
|
||||
<div id="users_created">
|
||||
<h2>Create Admin</h2>
|
||||
<p>No admin users exist, make an admin user now.</p>
|
||||
|
||||
<form method="post" action="/novaconium/create_admin">
|
||||
<input type="hidden" name="token" value="{{ token }}" />
|
||||
|
||||
<label for="username">Username:</label><br>
|
||||
<input type="text" id="username" name="username" required><br><br>
|
||||
|
||||
<label for="email">Email:</label><br>
|
||||
<input type="text" id="email" name="email" required><br><br>
|
||||
|
||||
<label for="password">Password:</label><br>
|
||||
<input type="password" id="password" name="password" required><br><br>
|
||||
|
||||
<label for="secure_key">Secure Key <i>The <code>secure_key</code> from your config.php file</i>:</label><br>
|
||||
<input type="text" id="secure_key" name="secure_key" required><br><br>
|
||||
|
||||
<button type="submit">Create User</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if show_login %}
|
||||
<div id="users_created">
|
||||
<h2>Administrator Login</h2>
|
||||
|
||||
<form method="post" action="/novaconium/login">
|
||||
<input type="hidden" name="token" value="{{ token }}" />
|
||||
|
||||
<label for="username">Username:</label><br>
|
||||
<input type="text" id="username" name="username" required><br><br>
|
||||
|
||||
<label for="password">Password:</label><br>
|
||||
<input type="password" id="password" name="password" required><br><br>
|
||||
|
||||
<button type="submit">Login</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
23
views/login.html.twig
Normal file
23
views/login.html.twig
Normal file
@@ -0,0 +1,23 @@
|
||||
{% extends '@novaconium/master.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{{title}}</h1>
|
||||
|
||||
|
||||
<div id="login_form">
|
||||
|
||||
<form method="post" action="/novaconium/login">
|
||||
<input type="hidden" name="token" value="{{ token }}" />
|
||||
|
||||
<label for="username">Username:</label><br>
|
||||
<input type="text" id="username" name="username" required><br><br>
|
||||
|
||||
<label for="password">Password:</label><br>
|
||||
<input type="password" id="password" name="password" required><br><br>
|
||||
|
||||
<button type="submit">Login</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user