mirror of
https://github.com/Karaka-Management/jsOMS.git
synced 2026-02-15 00:38:42 +00:00
Add automatic invalid form info message
This commit is contained in:
parent
727764ec60
commit
fa094a1d9f
|
|
@ -14,6 +14,8 @@
|
||||||
|
|
||||||
jsOMS.Message.Notification.NotificationLevel = Object.freeze({
|
jsOMS.Message.Notification.NotificationLevel = Object.freeze({
|
||||||
OK: 'ok',
|
OK: 'ok',
|
||||||
|
INFO: 'info',
|
||||||
|
WARNING: 'warning',
|
||||||
ERROR: 'error'
|
ERROR: 'error'
|
||||||
});
|
});
|
||||||
}(window.jsOMS = window.jsOMS || {}));
|
}(window.jsOMS = window.jsOMS || {}));
|
||||||
|
|
|
||||||
|
|
@ -191,6 +191,10 @@
|
||||||
submitForm (form)
|
submitForm (form)
|
||||||
{
|
{
|
||||||
if (!form.isValid()) {
|
if (!form.isValid()) {
|
||||||
|
this.app.notifyManager.send(
|
||||||
|
new jsOMS.Message.Notification.NotificationMessage(jsOMS.Message.Notification.NotificationLevel.INFO, 'Info', 'Invalid form input. Please check the form.'), jsOMS.Message.Notification.NotificationType.APP_NOTIFICATION
|
||||||
|
);
|
||||||
|
|
||||||
jsOMS.Log.Logger.instance.debug('Form "' + form.getId() + '" has invalid values.');
|
jsOMS.Log.Logger.instance.debug('Form "' + form.getId() + '" has invalid values.');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user