Commit b7beffa1 by NGUYEN HOANG SON

#50293 implement alert when click send button

parent 2230a4a9
......@@ -78,5 +78,8 @@
"labelSendTypeAll":"All",
"txtMessageContent":"Message",
"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 @@
"labelSendTypeAll":"作業全体",
"txtMessageContent":"メッセージ",
"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 @@
"labelSendTypeAll":"All",
"txtMessageContent":"Message",
"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() {
SendMessage.checkValidation = function() {
const message = SendMessage.getCurrentMessageContent();
if (!ValidationUtil.CheckRequiredForText(message)) {
console.log('message invalidation');
alert(I18N.i18nText('msgContentRequired'));
return false;
}
const operationId = SendMessage.getCurrentOperationId();
if (!ValidationUtil.IsNumber(operationId)) {
console.log('operationId invalidation');
alert(I18N.i18nText('msgOperationRequired'));
return false;
}
const sendType = SendMessage.getCurrentSendType();
if (!ValidationUtil.IsNumber(sendType)) {
console.log('sendType invalidation');
alert(I18N.i18nText('msgSendTypeRequired'));
return false;
}
return true;
......@@ -71,7 +71,6 @@ SendMessage.postMessage = function(message, operationId, sendType) {
operationId: operationId,
sendType: sendType
};
console.log(param);
COMMON.cmsAjax(SendMessage.baseApiUrl, param, false, function (json) {
}, 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