change the rich text max limit on frontend to 50000

This commit is contained in:
mlorb 2018-10-18 14:22:15 +02:00
parent 4dc1320988
commit e5fca1b1cd
4 changed files with 8 additions and 3 deletions

View file

@ -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');

View file

@ -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) {

View file

@ -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);

View file

@ -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: