Case log form entry: Protection against general form not found when in bridge mode

This commit is contained in:
Molkobain
2021-02-18 15:39:40 +01:00
parent 146089e021
commit cb338e1ce5

View File

@@ -111,9 +111,13 @@ $(function() {
// Update the general form input on submit.
// This cannot be "completely" done in the "change" handler above because we don't have an event for when
// the image has been uploaded and its HTML markup added to the data. The "change" event occurs too early.
this._GetGeneralFormElement().on('submit', function () {
me._UpdateBridgeInput();
});
if (null === this._GetGeneralFormElement()) {
CombodoJSConsole.Error('CaseLogEntryForm: Could not find the general form element, image upload will NOT work in CKEditor');
} else {
this._GetGeneralFormElement().on('submit', function () {
me._UpdateBridgeInput();
});
}
}
// Form buttons