Validation for email subject and email html message added , if it is checked the "Send Email" checkbox it will validate on form submisson to not get an empty subject or message.
Also wont be possible to add a subject as " ", or empy html tags as message.
}
if (!empty($fields['is_active']) &&
- CRM_Utils_Array::value('mode', $fields) == 'SMS' &&
CRM_Utils_System::isNull($fields['subject'])
) {
$errors['subject'] = ts('Subject is a required field.');
}
+ if (!empty($fields['is_active']) &&
+ CRM_Utils_System::isNull(trim(strip_tags($fields['html_message'])))
+ ) {
+ $errors['html_message'] = ts('The HTML message is a required field.');
+ }
if (empty($self->_context) && CRM_Utils_System::isNull(CRM_Utils_Array::value(1, $fields['entity']))) {
$errors['entity'] = ts('Please select entity value');