feat: add subject validation for message types and display error if missing
This commit is contained in:
parent
1cc7057dca
commit
cf60c470b1
@ -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...')}');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user