Commit f836d9d3 by NGUYEN HOANG SON

implement content max length 207 for html

parent 5cdc9152
......@@ -88,7 +88,7 @@
"buttonTemplateSelection":"Template",
"buttonSend":"Send",
"msgContentRequired":"Content is required",
"msgContentInvalidLength":"The content length exceeds the maximum of 207 characters",
"msgContentInvalidLength":"The content length exceeds the maximum of {0} characters",
"msgOperationRequired":"Operation is required",
"msgSendTypeRequired":"Send type is required",
"operationSelection":"Operation select",
......
......@@ -86,7 +86,7 @@
"buttonTemplateSelection":"テンプレート選択",
"buttonSend":"送信",
"msgContentRequired":"Content is required",
"msgContentInvalidLength":"The content length exceeds the maximum of 207 characters",
"msgContentInvalidLength":"The content length exceeds the maximum of {0} characters",
"msgOperationRequired":"Operation is required",
"msgSendTypeRequired":"Send type is required",
"operationSelection":"作業選択",
......
......@@ -85,7 +85,7 @@
"buttonTemplateSelection":"Template",
"buttonSend":"Send",
"msgContentRequired":"Content is required",
"msgContentInvalidLength":"The content length exceeds the maximum of 207 characters",
"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,8 +42,8 @@ SendMessage.checkValidation = function() {
alert(I18N.i18nText('msgContentRequired'));
return false;
}
if (!ValidationUtil.CheckMaxLengthForByte(message, 207)) {
alert(I18N.i18nText('msgContentInvalidLength'));
if (!ValidationUtil.CheckMaxLengthForByte(message, SendMessage.contentMaxLength)) {
alert(COMMON.format(I18N.i18nText('msgContentInvalidLength'), SendMessage.contentMaxLength));
return false;
}
const operationId = SendMessage.getCurrentOperationId();
......@@ -118,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