mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-06 06:56:54 +08:00
Merge pull request #1336 from mlorb/ml-sci-2780
Change the rich text max limit on frontend to 50000 [SCI-2780]
This commit is contained in:
commit
00bdc3dab6
4 changed files with 8 additions and 3 deletions
|
@ -148,7 +148,7 @@
|
|||
<%= Constants::NAME_MAX_LENGTH %>);
|
||||
var $descrTextarea = $form.find("#result_result_text_attributes_text");
|
||||
var $tinyMCEInput = TinyMCE.getContent();
|
||||
textValidator(ev, $descrTextarea, 1, <%= Constants::TEXT_MAX_LENGTH %>, false, $tinyMCEInput);
|
||||
textValidator(ev, $descrTextarea, 1, <%= Constants::RICH_TEXT_MAX_LENGTH %>, false, $tinyMCEInput);
|
||||
break;
|
||||
case ResultTypeEnum.COMMENT:
|
||||
var $commentInput = $form.find('#comment_message');
|
||||
|
|
|
@ -544,7 +544,7 @@
|
|||
var $descrTextarea = $form.find("#step_description");
|
||||
var $tinyMCEInput = TinyMCE.getContent();
|
||||
var descriptionValid = textValidator(ev, $descrTextarea, 0,
|
||||
<%= Constants::TEXT_MAX_LENGTH %>, false, $tinyMCEInput);
|
||||
<%= Constants::RICH_TEXT_MAX_LENGTH %>, false, $tinyMCEInput);
|
||||
var tableNamesValidArray = [];
|
||||
// iterate over table titles and validate their length
|
||||
$form.find(".table_name").each(function(index , tableName) {
|
||||
|
|
|
@ -45,7 +45,11 @@ function textValidator(ev, textInput, textLimitMin, textLimitMax, clearErr, tiny
|
|||
errMsg = I18n.t("general.text.length_too_short", { min_length: textLimitMin });
|
||||
}
|
||||
} else if (nameTooLong) {
|
||||
errMsg = I18n.t("general.text.length_too_long", { max_length: textLimitMax });
|
||||
if(tinyMCEInput){
|
||||
errMsg = I18n.t("general.text.length_too_long_general");
|
||||
} else {
|
||||
errMsg = I18n.t("general.text.length_too_long", { max_length: textLimitMax });
|
||||
}
|
||||
}
|
||||
|
||||
var noErrors = _.isUndefined(errMsg);
|
||||
|
|
|
@ -1930,6 +1930,7 @@ en:
|
|||
upload_failure: "Upload connection error. Try again or contact the administrator."
|
||||
text:
|
||||
not_blank: "can't be blank"
|
||||
length_too_long_general: "is too long"
|
||||
length_too_long: "is too long (maximum is %{max_length} characters)"
|
||||
length_too_short: "is too short (minimum is %{min_length} characters)"
|
||||
query:
|
||||
|
|
Loading…
Reference in a new issue