Commit b7beffa1 by NGUYEN HOANG SON

#50293 implement alert when click send button

parent 2230a4a9
...@@ -78,5 +78,8 @@ ...@@ -78,5 +78,8 @@
"labelSendTypeAll":"All", "labelSendTypeAll":"All",
"txtMessageContent":"Message", "txtMessageContent":"Message",
"buttonTemplateSelection":"Template", "buttonTemplateSelection":"Template",
"buttonSend":"Send" "buttonSend":"Send",
"msgContentRequired":"Content is required",
"msgOperationRequired":"Operation is required",
"msgSendTypeRequired":"Send type is required"
} }
\ No newline at end of file
...@@ -78,6 +78,8 @@ ...@@ -78,6 +78,8 @@
"labelSendTypeAll":"作業全体", "labelSendTypeAll":"作業全体",
"txtMessageContent":"メッセージ", "txtMessageContent":"メッセージ",
"buttonTemplateSelection":"テンプレート選択", "buttonTemplateSelection":"テンプレート選択",
"buttonSend":"送信" "buttonSend":"送信",
"msgContentRequired":"Content is required",
"msgOperationRequired":"Operation is required",
"msgSendTypeRequired":"Send type is required"
} }
\ No newline at end of file
...@@ -78,5 +78,8 @@ ...@@ -78,5 +78,8 @@
"labelSendTypeAll":"All", "labelSendTypeAll":"All",
"txtMessageContent":"Message", "txtMessageContent":"Message",
"buttonTemplateSelection":"Template", "buttonTemplateSelection":"Template",
"buttonSend":"Send" "buttonSend":"Send",
"msgContentRequired":"Content is required",
"msgOperationRequired":"Operation is required",
"msgSendTypeRequired":"Send type is required"
} }
\ No newline at end of file
...@@ -29,17 +29,17 @@ SendMessage.getCurrentSendType = function() { ...@@ -29,17 +29,17 @@ SendMessage.getCurrentSendType = function() {
SendMessage.checkValidation = function() { SendMessage.checkValidation = function() {
const message = SendMessage.getCurrentMessageContent(); const message = SendMessage.getCurrentMessageContent();
if (!ValidationUtil.CheckRequiredForText(message)) { if (!ValidationUtil.CheckRequiredForText(message)) {
console.log('message invalidation'); alert(I18N.i18nText('msgContentRequired'));
return false; return false;
} }
const operationId = SendMessage.getCurrentOperationId(); const operationId = SendMessage.getCurrentOperationId();
if (!ValidationUtil.IsNumber(operationId)) { if (!ValidationUtil.IsNumber(operationId)) {
console.log('operationId invalidation'); alert(I18N.i18nText('msgOperationRequired'));
return false; return false;
} }
const sendType = SendMessage.getCurrentSendType(); const sendType = SendMessage.getCurrentSendType();
if (!ValidationUtil.IsNumber(sendType)) { if (!ValidationUtil.IsNumber(sendType)) {
console.log('sendType invalidation'); alert(I18N.i18nText('msgSendTypeRequired'));
return false; return false;
} }
return true; return true;
...@@ -71,7 +71,6 @@ SendMessage.postMessage = function(message, operationId, sendType) { ...@@ -71,7 +71,6 @@ SendMessage.postMessage = function(message, operationId, sendType) {
operationId: operationId, operationId: operationId,
sendType: sendType sendType: sendType
}; };
console.log(param);
COMMON.cmsAjax(SendMessage.baseApiUrl, param, false, function (json) { COMMON.cmsAjax(SendMessage.baseApiUrl, param, false, function (json) {
}, function() { }, function() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment