141 lines
3.8 KiB
ERB
141 lines
3.8 KiB
ERB
<% kind = request.params["kind"] %>
|
|
<% valid_kind = %w[individual organization].include?(kind) %>
|
|
|
|
<section class="page-section">
|
|
<div class="content page-panel">
|
|
<h1>Créer un compte</h1>
|
|
|
|
<p>
|
|
Créez un compte pour accéder à votre espace personnel
|
|
et, si vous le souhaitez, demander à rejoindre NETig.
|
|
</p>
|
|
|
|
<% if error = flash["error"] %>
|
|
<p class="flash flash--error" role="alert"><%= error %></p>
|
|
<% end %>
|
|
|
|
<% unless valid_kind %>
|
|
<p>Quel type de compte souhaitez-vous créer ?</p>
|
|
|
|
<div class="hero__actions">
|
|
<a
|
|
class="button button--secondary"
|
|
href="<%= rodauth.create_account_path %>?kind=individual"
|
|
>
|
|
Personne physique
|
|
</a>
|
|
|
|
<a
|
|
class="button button--secondary"
|
|
href="<%= rodauth.create_account_path %>?kind=organization"
|
|
>
|
|
Personne morale
|
|
</a>
|
|
</div>
|
|
|
|
<% else %>
|
|
<form
|
|
action="<%= rodauth.create_account_path %>"
|
|
method="post"
|
|
class="contact-form"
|
|
accept-charset="UTF-8"
|
|
>
|
|
<%== rodauth.csrf_tag %>
|
|
|
|
<input type="hidden" name="kind" value="<%= kind %>">
|
|
|
|
<% if kind == "individual" %>
|
|
<h2>Personne physique</h2>
|
|
|
|
<label for="first_name">Prénom</label>
|
|
<input
|
|
id="first_name"
|
|
name="first_name"
|
|
type="text"
|
|
maxlength="128"
|
|
autocomplete="given-name"
|
|
value="<%= request.params["first_name"] %>"
|
|
required
|
|
>
|
|
|
|
<% if error = rodauth.field_error("first_name") %>
|
|
<p class="flash flash--error"><%= error %></p>
|
|
<% end %>
|
|
|
|
<label for="last_name">Nom</label>
|
|
<input
|
|
id="last_name"
|
|
name="last_name"
|
|
type="text"
|
|
maxlength="128"
|
|
autocomplete="family-name"
|
|
value="<%= request.params["last_name"] %>"
|
|
required
|
|
>
|
|
|
|
<% if error = rodauth.field_error("last_name") %>
|
|
<p class="flash flash--error"><%= error %></p>
|
|
<% end %>
|
|
|
|
<% else %>
|
|
<h2>Personne morale</h2>
|
|
|
|
<label for="organization_name">Dénomination</label>
|
|
<input
|
|
id="organization_name"
|
|
name="organization_name"
|
|
type="text"
|
|
maxlength="255"
|
|
autocomplete="organization"
|
|
value="<%= request.params["organization_name"] %>"
|
|
required
|
|
>
|
|
|
|
<% if error = rodauth.field_error("organization_name") %>
|
|
<p class="flash flash--error"><%= error %></p>
|
|
<% end %>
|
|
<% end %>
|
|
|
|
<label for="<%= rodauth.login_param %>">
|
|
Adresse électronique
|
|
</label>
|
|
<input
|
|
id="<%= rodauth.login_param %>"
|
|
name="<%= rodauth.login_param %>"
|
|
type="<%= rodauth.login_input_type %>"
|
|
maxlength="254"
|
|
autocomplete="email"
|
|
value="<%= request.params[rodauth.login_param] %>"
|
|
required
|
|
>
|
|
|
|
<% if error = rodauth.field_error(rodauth.login_param) %>
|
|
<p class="flash flash--error"><%= error %></p>
|
|
<% end %>
|
|
|
|
<p>
|
|
Nous vous enverrons un courriel pour vérifier votre adresse
|
|
électronique. Vous choisirez votre mot de passe à cette étape.
|
|
</p>
|
|
|
|
<input
|
|
type="submit"
|
|
value="<%= rodauth.create_account_button %>"
|
|
class="submit"
|
|
>
|
|
</form>
|
|
|
|
<p>
|
|
<a href="<%= rodauth.create_account_path %>">
|
|
Changer de type de compte
|
|
</a>
|
|
</p>
|
|
<% end %>
|
|
|
|
<p>
|
|
Vous avez déjà un compte ?
|
|
<a href="<%= rodauth.login_path %>">Se connecter</a>.
|
|
</p>
|
|
</div>
|
|
</section>
|