feat: add subject validation for message types and display error if missing

This commit is contained in:
Focuslinkstech 2025-04-09 12:50:30 +01:00
parent 1cc7057dca
commit cf60c470b1

View File

@ -274,6 +274,16 @@
return;
}
if (messageType == 'all' || messageType == 'inbox' || messageType == 'email' && !subject) {
Swal.fire({
title: 'Error!',
text: "{Lang::T('Please enter a subject for the message.')}",
icon: 'error',
confirmButtonText: 'OK'
});
return;
}
// Disable the button and show loading text
$(this).prop('disabled', true).text('{Lang::T('Sending...')}');