mailbox backend: fix create identity form title when mailbox exists

This commit is contained in:
Alice Gaudon 2021-02-26 12:56:56 +01:00
parent 01a1216c99
commit 0a0d284ecc
2 changed files with 2 additions and 1 deletions

View File

@ -88,6 +88,7 @@ export default class MailboxBackendController extends Controller {
id: user.id,
userName: user.as(UserNameComponent).name,
name: await mainMailIdentity?.toEmail() || 'Not created.',
exists: !!mainMailIdentity,
},
domains: mailDomains.map(d => ({
display: d.name,

View File

@ -45,7 +45,7 @@
</table>
<form action="{{ route('backend-create-mail-identity', mailbox.id) }}" method="POST" class="sub-panel">
<h3>{% if mailboxIdentity == null %}Create a mailbox{% else %}Create a new mail identity{% endif %}</h3>
<h3>{% if not mailbox.exists %}Create a mailbox{% else %}Create a new mail identity{% endif %}</h3>
<div class="inline-fields">
{{ macros.field(_locals, 'text', 'name', user.name, 'Email name', null, 'required') }}