mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-01 04:32:16 +08:00
Raise character limit for rich text fields and reword limit text error [SCI-7959] (#5221)
This commit is contained in:
parent
80b25f695e
commit
3ad1d384ee
6 changed files with 23 additions and 12 deletions
|
@ -83,7 +83,6 @@
|
|||
var data = xhr.responseJSON;
|
||||
var $el;
|
||||
$form.renderFormErrors('result', data);
|
||||
TinyMCE.highlight();
|
||||
if (data['result_text.text']) {
|
||||
$el = $form.find(
|
||||
'textarea[name=result\\[result_text_attributes\\]\\[text\\]]'
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
:objectId="parseInt(protocol.id)"
|
||||
:fieldName="'protocol[description]'"
|
||||
:lastUpdated="protocol.attributes.updated_at"
|
||||
:characterLimit="100000"
|
||||
:characterLimit="1000000"
|
||||
@update="updateDescription"
|
||||
/>
|
||||
</div>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
:objectId="element.attributes.orderable.id"
|
||||
:fieldName="'step_text[text]'"
|
||||
:lastUpdated="element.attributes.orderable.updated_at"
|
||||
:characterLimit="100000"
|
||||
:characterLimit="1000000"
|
||||
@update="update"
|
||||
@editingDisabled="disableEditMode"
|
||||
@editingEnabled="enableEditMode"
|
||||
|
|
|
@ -101,14 +101,8 @@
|
|||
error() {
|
||||
if(this.characterLimit && this.characterCount > this.characterLimit) {
|
||||
return(
|
||||
this.i18n.t(
|
||||
'inline_edit.errors.over_limit',
|
||||
{
|
||||
attribute: this.i18n.t('general.text.name'),
|
||||
limit: this.numberWithSpaces(this.characterLimit)
|
||||
}
|
||||
)
|
||||
)
|
||||
this.i18n.t('errors.general_text_too_long')
|
||||
);
|
||||
}
|
||||
|
||||
return false
|
||||
|
|
|
@ -18,7 +18,7 @@ class Constants
|
|||
# Max characters for long text fields
|
||||
TEXT_MAX_LENGTH = 10000
|
||||
# Max characters for rich text fields (in html format)
|
||||
RICH_TEXT_MAX_LENGTH = 100000
|
||||
RICH_TEXT_MAX_LENGTH = 1000000
|
||||
# Max characters for color field (given in HEX format)
|
||||
COLOR_MAX_LENGTH = 7
|
||||
# Max characters for text in dropdown list element
|
||||
|
|
|
@ -158,16 +158,22 @@ en:
|
|||
invalid: "Invalid step order."
|
||||
name:
|
||||
taken: "This protocol template name has to be unique inside a team (this includes the archive)."
|
||||
description:
|
||||
too_long: 'Text is too long'
|
||||
step:
|
||||
attributes:
|
||||
step_orderable_element_order:
|
||||
invalid: "Invalid step element order"
|
||||
description:
|
||||
too_long: 'Text is too long'
|
||||
my_module:
|
||||
attributes:
|
||||
my_module_status_id:
|
||||
not_correct_order: "Status can be changed only on next or previous status."
|
||||
position:
|
||||
not_unique: "X and Y position has already been taken by another task in the experiment."
|
||||
description:
|
||||
too_long: 'Text is too long'
|
||||
my_module_status:
|
||||
attributes:
|
||||
next_status:
|
||||
|
@ -211,12 +217,24 @@ en:
|
|||
disabled: 'Webhooks are disabled'
|
||||
url:
|
||||
not_valid: 'Not valid URL'
|
||||
result_text:
|
||||
attributes:
|
||||
text:
|
||||
too_long: 'Text is too long'
|
||||
step_text:
|
||||
attributes:
|
||||
text:
|
||||
too_long: 'Text is too long'
|
||||
system_notification:
|
||||
attributes:
|
||||
modal_body: 'Text is too long'
|
||||
connection:
|
||||
attributes:
|
||||
output_id:
|
||||
creates_cycle: "mustn't create cycle"
|
||||
errors:
|
||||
general: "Something went wrong."
|
||||
general_text_too_long: 'Text is too long'
|
||||
storage:
|
||||
limit_reached: "Storage limit has been reached."
|
||||
helpers:
|
||||
|
|
Loading…
Reference in a new issue