BeastBB/templates/install/welcome.html.ep
2021-05-30 16:56:59 +02:00

61 lines
2.6 KiB
Plaintext

<html>
<head>
<script src="js/install/welcome.js"></script>
</head>
<body>
% if ( defined $config->{finished_install} && $config->{finished_install} ) {
<h1>Congrats, installation just finished, restart the Mojolicious server to access it.</h1>
% } elsif ( !defined $config->{db} ) {
<h1>Welcome to the 1 minute BeastBB installation.</h1>
<h2>Please introduce your Postgresql database details.</h2>
<p>Blank fields will be attempted to be guess to sane value if posible</p>
% if ( defined $error ) {
<p style="color: red;"><%= $error %></p>
% }
<form method="POST" action="/install/database">
<label for="username"><h3>Username.</h3></label>
<input type="text" name="username"/>
<label for="password"><h3>Password.</h3></label>
<input type="password" name="password" id="postgres_password"/>
<br/>
<a href="#" id="change_readable_password">Click here to toggle readable/unreadable the password</a>
<label for="host"><h3>Host</h3></label>
<input type="text" name="host"/>
<label for="port"><h3>Port</h3></label>
<input type="number" name="port"/>
<label for="dbname"><h3>Database Name</h3></label>
<input type="text" name="dbname"/>
<input type="submit" value="Submit"/>
</form>
% } else {
<h2>Tell me the details about your new admin user before we migrate the database.</h2>
% if ( defined $error ) {
<p style="color: red;"><%= $error %></p>
% }
<form action="/install/admin_user_create" method="post">
<label for="username"><h3>Username.</h3></label>
<input type="text" name="username"/>
<label for="matrix_address"><h3>Matrix address.</h3></label>
<input type="text" name="matrix_address"/>
<label for="password"><h3>Password.</h3></label>
<input type="password" name="password" id="postgres_password"/>
<br/>
<a href="#" id="change_readable_password">Click here to toggle readable/unreadable the password</a>
<label for="repeat_password"><h3>Repeat password.</h3></label>
<input type="repeat_password" name="repeat_password" id="postgres_password"/>
<input type="submit" value="Submit"/>
</form>
% }
</body>
</html>