mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-11 15:13:25 +08:00
Revert changing .js.erb file [SCI-8810] (#5741)
This commit is contained in:
parent
b44678d09a
commit
eb4d0f2065
1 changed files with 4 additions and 4 deletions
|
@ -39,13 +39,13 @@ function textValidator(ev, textInput, textLimitMin, textLimitMax, clearErr, tiny
|
|||
if (textLimitMin === 1) {
|
||||
errMsg = I18n.t("general.text.not_blank");
|
||||
} else {
|
||||
errMsg = I18n.t("general.text.length_too_short", min_length: textLimitMin);
|
||||
errMsg = I18n.t("general.text.length_too_short", { min_length: textLimitMin });
|
||||
}
|
||||
} else if (nameTooLong) {
|
||||
if(tinyMCEInput){
|
||||
errMsg = I18n.t("general.text.length_too_long_general");
|
||||
} else {
|
||||
errMsg = I18n.t("general.text.length_too_long", max_length: textLimitMax);
|
||||
errMsg = I18n.t("general.text.length_too_long", { max_length: textLimitMax });
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -143,7 +143,7 @@ function filesSizeValidator(ev, fileInputs, fileTypeEnum) {
|
|||
if (file.size > fileTypeEnum) {
|
||||
switch (fileTypeEnum) {
|
||||
case FileTypeEnum.FILE:
|
||||
return I18n.t('general.file.size_exceeded', file_size: GLOBAL_CONSTANTS.FILE_MAX_SIZE_MB).strToErrorFormat();
|
||||
return I18n.t('general.file.size_exceeded', { file_size: GLOBAL_CONSTANTS.FILE_MAX_SIZE_MB }).strToErrorFormat();
|
||||
case FileTypeEnum.AVATAR:
|
||||
return "<%= I18n.t 'general.file.size_exceeded', file_size: Constants::AVATAR_MAX_SIZE_MB %>".strToErrorFormat();
|
||||
}
|
||||
|
@ -164,7 +164,7 @@ function filesSizeValidator(ev, fileInputs, fileTypeEnum) {
|
|||
if (size > fileTypeEnum) {
|
||||
switch (fileTypeEnum) {
|
||||
case FileTypeEnum.FILE:
|
||||
return I18n.t('general.file.total_size', size: GLOBAL_CONSTANTS.FILE_MAX_SIZE_MB).strToErrorFormat();
|
||||
return I18n.t('general.file.total_size', { size: GLOBAL_CONSTANTS.FILE_MAX_SIZE_MB }).strToErrorFormat();
|
||||
case FileTypeEnum.AVATAR:
|
||||
return "<%= I18n.t('users.registrations.edit.avatar_total_size', size: Constants::AVATAR_MAX_SIZE_MB) %>".strToErrorFormat();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue