Commit 487de3d7 by Takumi Imai

Merge branch 'feature/1.0_check_web_dev_50270' into 'feature/1.0_check_web_dev'

check max length message content when send

See merge request !35
parents c584d99e f836d9d3
......@@ -88,6 +88,7 @@
"buttonTemplateSelection":"Template",
"buttonSend":"Send",
"msgContentRequired":"Content is required",
"msgContentInvalidLength":"The content length exceeds the maximum of {0} characters",
"msgOperationRequired":"Operation is required",
"msgSendTypeRequired":"Send type is required",
"operationSelection":"Operation select",
......
......@@ -86,6 +86,7 @@
"buttonTemplateSelection":"テンプレート選択",
"buttonSend":"送信",
"msgContentRequired":"Content is required",
"msgContentInvalidLength":"The content length exceeds the maximum of {0} characters",
"msgOperationRequired":"Operation is required",
"msgSendTypeRequired":"Send type is required",
"operationSelection":"作業選択",
......
......@@ -85,6 +85,7 @@
"buttonTemplateSelection":"Template",
"buttonSend":"Send",
"msgContentRequired":"Content is required",
"msgContentInvalidLength":"The content length exceeds the maximum of {0} characters",
"msgOperationRequired":"Operation is required",
"msgSendTypeRequired":"Send type is required",
"operationSelection":"Operation select",
......
......@@ -6,6 +6,7 @@
var SendMessage = {};
SendMessage.baseApiUrl = COMMON.format(ClientData.conf_checkApiUrl(), ClientData.userInfo_accountPath()) + CONSTANT.URL.CMS.API.SEND_PUSH_MESSAGE;
SendMessage.contentMaxLength = 207;
/**
* Get input content
......@@ -41,6 +42,10 @@ SendMessage.checkValidation = function() {
alert(I18N.i18nText('msgContentRequired'));
return false;
}
if (!ValidationUtil.CheckMaxLengthForByte(message, SendMessage.contentMaxLength)) {
alert(COMMON.format(I18N.i18nText('msgContentInvalidLength'), SendMessage.contentMaxLength));
return false;
}
const operationId = SendMessage.getCurrentOperationId();
if (!ValidationUtil.IsNumber(operationId)) {
alert(I18N.i18nText('msgOperationRequired'));
......@@ -114,6 +119,7 @@ SendMessage.init = function () {
TEMPLATE.loadMainNavsTitle("#includedMainTitle", "sendMessageTitle", navs, null);
TEMPLATE.loadOperationSelect('#includeOperationSelect', SendMessage.operationSelectedCallback);
TEMPLATE.loadNotificationSelect('#includeTemplateModal', SendMessage.templateSelectedCallback);
$('#messageContent').attr('maxlength', SendMessage.contentMaxLength);
//load lang for elements none class lang
I18N.initi18n();
$("label[for='sendTypeGroup']").append(I18N.i18nText('labelSendTypeGroup'));
......
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