Commit 7eb24fc0937662e0fd600ead99c6fd8bafa60a55

Thomas de Grivel 2022-08-03T10:27:09

add info about characters allowed in slug_ and passwords

diff --git a/lib/kmxgit_web/templates/page/new_admin.html.heex b/lib/kmxgit_web/templates/page/new_admin.html.heex
index 432d330..f124629 100644
--- a/lib/kmxgit_web/templates/page/new_admin.html.heex
+++ b/lib/kmxgit_web/templates/page/new_admin.html.heex
@@ -30,14 +30,16 @@
     </div>
 
     <div class="mb-3">
-      <%= label f, :slug_, class: "form-label" %>
+      <%= label f, :slug_, gettext("Login"), class: "form-label" %>
       <%= text_input f, :slug_, class: "form-control" %>
+      <small class="form-text text-muted">Must start with a letter and contain no space.</small>
       <%= error_tag f, :slug_ %>
     </div>
 
     <div class="mb-3">
       <%= label f, :password, class: "form-label" %>
       <%= password_input f, :password, class: "form-control" %>
+      <small class="form-text text-muted">Must contain letters, numbers, special characters and be 12 character long.</small>
       <%= error_tag f, :password %>
     </div>
 
diff --git a/lib/kmxgit_web/templates/user_registration/new.html.heex b/lib/kmxgit_web/templates/user_registration/new.html.heex
index 06c01e9..1653489 100644
--- a/lib/kmxgit_web/templates/user_registration/new.html.heex
+++ b/lib/kmxgit_web/templates/user_registration/new.html.heex
@@ -23,12 +23,14 @@
     <div class="mb-3">
       <%= label f, :slug_, gettext("Login"), class: "form-label" %>
       <%= text_input f, :slug_, class: "form-control", required: true %>
+      <small class="form-text text-muted">Must start with a letter and contain no space.</small>
       <%= error_tag f, :slug_ %>
     </div>
 
     <div class="mb-3">
       <%= label f, :password, class: "form-label" %>
       <%= password_input f, :password, class: "form-control", required: true %>
+      <small class="form-text text-muted">Must contain letters, numbers, special characters and be 12 character long.</small>
       <%= error_tag f, :password %>
     </div>