fix(email): mark required fields on incoming mail to match outgoing SMTP

The IMAP card was restyled to match SMTP but didn't carry the required-field
markers. Aligned the required set (protocol differences kept):
- red asterisks on Host *, Port *, Username * (SMTP marks Host/Port/From-Email;
  IMAP has no From-Email but always needs a login)
- client-side guard mirroring handleSaveSmtp (block save without host/port/user)
- backend POST /incoming-config now requires imap_user (the poller's
  getImapConfig returns null without it)
- en/de requiredFields string
This commit is contained in:
Luca
2026-06-12 12:33:04 +02:00
parent abb23f01c7
commit fb48ba4cb4
4 changed files with 17 additions and 4 deletions
+3
View File
@@ -141,6 +141,9 @@ router.post('/incoming-config', [
requirePermission('email.edit'),
body('imap_host').notEmpty().withMessage('IMAP host is required'),
body('imap_port').isInt({ min: 1, max: 65535 }).withMessage('Invalid port number'),
// IMAP always needs a login (unlike SMTP relay) — the poller's
// getImapConfig() returns null without a username, so require it.
body('imap_user').notEmpty().withMessage('IMAP username is required'),
], async (req, res) => {
try {
const errors = validationResult(req);