Implement random password generation (create/edit account)

This commit is contained in:
Lexi / Zoe 2021-09-16 19:55:38 +02:00
parent 48925f283f
commit 2ccee2169b
Signed by: binaryDiv
GPG key ID: F8D4956E224DA232
9 changed files with 127 additions and 54 deletions

View file

@ -37,6 +37,7 @@
<div class="form_box">
<h4>Password</h4>
<p>The password will be hashed using the current default hash algorithm.</p>
<p>Leave blank to generate a random password.</p>
<table>
<tr>
<td><label for="create_password">New password:</label></td>

View file

@ -62,6 +62,14 @@
<td><label for="edit_password_repeat">Repeat password:</label></td>
<td><input type="password" id="edit_password_repeat" name="password_repeat" value="{{ formData['password_repeat'] | default('') }}"/></td>
</tr>
<tr>
<td colspan="2">
<label>
<input type="checkbox" name="password_generate_random" {{ formData['password_generate_random'] | default('') ? 'checked' : '' }}/>
Generate new random password
</label>
</td>
</tr>
</table>
</div>

View file

@ -1,11 +1,11 @@
{% if success is defined %}
<div class="success_box">
<h4>Success</h4>
{{ success | raw }}
<p>{{ success | split('\n') | join('</p><p>') | raw }}</p>
</div>
{% elseif error is defined %}
<div class="error_box">
<h4>Error</h4>
{{ error | raw }}
<p>{{ error | split('\n') | join('</p><p>') | raw }}</p>
</div>
{% endif %}