Refactoring

This commit is contained in:
Lexi / Zoe 2021-09-12 22:16:06 +02:00
parent 87928dbbc9
commit 23127dd193
Signed by: binaryDiv
GPG key ID: F8D4956E224DA232
4 changed files with 58 additions and 36 deletions

View file

@ -39,12 +39,12 @@
</tr>
<tr>
<td><label for="edit_username">New username:</label></td>
<td><input id="edit_username" name="username" value="{{ editData['username'] | default('') }}"/></td>
<td><input id="edit_username" name="username" value="{{ formData['username'] | default('') }}"/></td>
</tr>
<tr>
<td colspan="2">
<label>
<input type="checkbox" name="username_create_alias" {{ editData['username_create_alias'] | default('') ? 'checked' : '' }}/>
<input type="checkbox" name="username_create_alias" {{ formData['username_create_alias'] | default('') ? 'checked' : '' }}/>
Create alias for old username
</label>
</td>
@ -52,7 +52,7 @@
<tr>
<td colspan="2">
<label>
<input type="checkbox" name="username_replace_alias" {{ editData['username_replace_alias'] | default('') ? 'checked' : '' }}/>
<input type="checkbox" name="username_replace_alias" {{ formData['username_replace_alias'] | default('') ? 'checked' : '' }}/>
Replace existing alias
</label>
</td>
@ -66,11 +66,11 @@
<table>
<tr>
<td><label for="edit_password">New password:</label></td>
<td><input type="password" id="edit_password" name="password" value="{{ editData['password'] | default('') }}"/></td>
<td><input type="password" id="edit_password" name="password" value="{{ formData['password'] | default('') }}"/></td>
</tr>
<tr>
<td><label for="edit_password_repeat">Repeat password:</label></td>
<td><input type="password" id="edit_password_repeat" name="password_repeat" value="{{ editData['password_repeat'] | default('') }}"/></td>
<td><input type="password" id="edit_password_repeat" name="password_repeat" value="{{ formData['password_repeat'] | default('') }}"/></td>
</tr>
</table>
</div>
@ -87,8 +87,8 @@
<td>
<label>
<input type="checkbox" name="is_active"
{%- if editData | default() -%}
{{ editData['is_active'] ? ' checked' : '' }}
{%- if formData | default() -%}
{{ formData['is_active'] | default() ? ' checked' : '' }}
{%- else -%}
{{ account.isActive() ? ' checked' : '' }}
{%- endif -%}
@ -111,7 +111,7 @@
<tr>
<td><label for="edit_home_dir">New home directory:</label></td>
<td>
<span class="gray">/srv/vmail/</span><input id="edit_home_dir" name="home_dir" value="{{ editData['home_dir'] | default('') }}"/>
<span class="gray">/srv/vmail/</span><input id="edit_home_dir" name="home_dir" value="{{ formData['home_dir'] | default('') }}"/>
</td>
</tr>
</table>
@ -123,7 +123,7 @@
<table>
<tr>
<td><label for="edit_memo">Admin memo:</label></td>
<td><textarea id="edit_memo" name="memo" style="min-width: 40em;">{{ editData | default() ? editData['memo'] : account.getMemo() }}</textarea></td>
<td><textarea id="edit_memo" name="memo" style="min-width: 40em;">{{ formData | default() ? formData['memo'] : account.getMemo() }}</textarea></td>
</tr>
</table>
</div>