first commit

This commit is contained in:
2020-10-17 22:04:19 +02:00
parent d19659c4f8
commit d5e61053f6
10 changed files with 614 additions and 1 deletions

54
templates/form.html Normal file
View File

@@ -0,0 +1,54 @@
<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8">
<link rel="icon" href="{{ favicon }}">
<title>Nextcloud registration form</title>
<link rel="stylesheet" href="{{base_uri}}style.css">
{% if success and instance_link %}
<meta http-equiv="refresh" content="10;URL={{ instance_link }}">
{% endif %}
</head>
<body>
<nav class="navbar">
<div>
</div>
</nav>
<div id="main">
{% if favicon %}
<img src={{favicon}} class="favicon"/>
{% endif %}
{% if max_accounts %}
<div class="count">
Il reste {{ count_accounts }} / {{ max_accounts }} comptes.
</div>
{% endif %}
{% if error %}
<div class="error message">
{{ error }}
</div>
{% endif %}
{% if info %}
<div class="info message">
{{ info }}
</div>
{% endif %}
<form method="POST">
<input type="text" name="username" placeholder="Nom d'utilisateur" value="{{ data.username }}" {% if disable %} disabled="disabled" {% endif %}/>
{% if mandatory_email %}
<input type="text" name="email" placeholder="Adresse email" value="{{ data.email }}" {% if disable %} disabled="disabled" {% endif %}/>
{% endif %}
{% if mandatory_password %}
<input type="password" name="password1" placeholder="Mot de passe" {% if disable %} disabled="disabled" {% endif %}/>
<input type="password" name="password2" placeholder="Confirmez le mot de passe" {% if disable %} disabled="disabled" {% endif %}/>
{% endif %}
{% if eula %}
<div class="eula">
En m'inscrivant à ce service j'accepte ses <a href="{{ eula }}">Conditions Générales d'utilisation</a>
</div>
{% endif %}
<input type="submit" name="validate" value="S'inscrire" {% if disable %} disabled="disabled" {% endif %}/>
</form>
</div>
</body>
</html>

78
templates/style.css Normal file
View File

@@ -0,0 +1,78 @@
body
{
margin: 0;
}
input
{
display: block;
height:25px;
border-radius: 12.5px;
width:440px;
margin:20px;
border-width: 1px;
border-style: solid;
padding-left: 10px;
padding-right: 10px;
border-color: {{ color }};
}
input[type=submit]
{
color:white;
width:460px;
background-color: {{ color }};
}
.favicon
{
display:block;
margin: 0 auto;
max-width: 100px;
}
.navbar
{
color:white;
height:50px;
width:100%;
background-color: {{ color }};
}
#main
{
padding-top:20px;
margin:auto;
width:500px;
}
.eula
{
margin-left: 50px;
}
.error
{
background-color: #fff0f0;
border-color: #ff0000;
}
.info
{
background-color: #f0f0ff;
border-color: #0000ff;
}
.message
{
border-style: solid;
border-width: 1px;
border-radius: 12.5px;
width:440px;
margin:20px;
padding-left: 10px;
padding-right: 10px;
padding-top: 3px;
padding-bottom: 3px;
}
.count
{
text-align: center;
}