Front-End Stuff

This commit is contained in:
Chris Mann 2023-07-20 19:43:52 +02:00
parent 7e9e301bfb
commit d3bf04be03
2 changed files with 2 additions and 2 deletions

View file

@ -149,7 +149,7 @@ func handleNewAccount(w http.ResponseWriter, r *http.Request, l *ldap.Conn, invi
// tryCreateAccount(l, data, password1, password2, invitedBy)
} else {
data.SuggestPW = suggestPassword()
data.SuggestPW = fmt.Sprint("%s", suggestPassword())
}
templateInviteNewAccount.Execute(w, data)

View file

@ -62,7 +62,7 @@
<label for="surname">Nom de famille :</label>
<input type="text" id="surname" name="surname" class="form-control" value="{{ .Surname }}" />
</div>
<p><a href="#" onClick="javascript:document.getElementById('password').value='{{ .SuggestPW }}';document.getElementById('password2').value='{{ .SuggestPW }}';">Utiliser ce mot de passe :</a> <pre>{{ .SuggestPW }}</pre></p>
<p><a href="#" onClick="javascript:var suggestPW = Math.random().toString(36).slice(-10); document.getElementById('password').value='{{ .SuggestPW }}';document.getElementById('password2').value='{{ .SuggestPW }}';">Générer un mot de passe :</a> <pre id="suggestPW">{{ .SuggestPW }}</pre></p>
<div class="form-group">
<label for="password">Mot de passe :</label>
<input type="password" id="password" name="password" class="form-control" />