diff --git a/modules/apps/change-tracking/change-tracking-web/src/main/resources/META-INF/resources/publications/edit_ct_collection_template.jsp b/modules/apps/change-tracking/change-tracking-web/src/main/resources/META-INF/resources/publications/edit_ct_collection_template.jsp index e97db6cc1dcf19..669bac67c697b8 100644 --- a/modules/apps/change-tracking/change-tracking-web/src/main/resources/META-INF/resources/publications/edit_ct_collection_template.jsp +++ b/modules/apps/change-tracking/change-tracking-web/src/main/resources/META-INF/resources/publications/edit_ct_collection_template.jsp @@ -89,6 +89,8 @@ portletDisplay.setShowBackIcon(true); } ).put( "name", name + ).put( + "nameFieldMaxLength", ModelHintsUtil.getMaxLength(CTCollectionTemplate.class.getName(), "name") ).put( "namespace", liferayPortletResponse.getNamespace() ).put( diff --git a/modules/apps/change-tracking/change-tracking-web/src/main/resources/META-INF/resources/publications/js/views/PublicationTemplateEditView.js b/modules/apps/change-tracking/change-tracking-web/src/main/resources/META-INF/resources/publications/js/views/PublicationTemplateEditView.js index 573b08cb1bba8d..238f5863fb78b0 100644 --- a/modules/apps/change-tracking/change-tracking-web/src/main/resources/META-INF/resources/publications/js/views/PublicationTemplateEditView.js +++ b/modules/apps/change-tracking/change-tracking-web/src/main/resources/META-INF/resources/publications/js/views/PublicationTemplateEditView.js @@ -24,6 +24,7 @@ export default function PublicationTemplateEditView({ descriptionFieldMaxLength, getTemplateCollaboratorsURL, name, + nameFieldMaxLength, namespace, publicationDescription, publicationName, @@ -129,6 +130,7 @@ export default function PublicationTemplateEditView({ componentType="input" fieldValue={nameField} label={Liferay.Language.get('name')} + maxLength={nameFieldMaxLength} onChange={(event) => { setNameField(event.target.value); }} @@ -265,8 +267,8 @@ export default function PublicationTemplateEditView({ disabled={ !nameField.length || !publicationNameField.length || - nameField.length > 75 || - publicationNameField.length > 75 || + nameField.length > nameFieldMaxLength || + publicationNameField.length > nameFieldMaxLength || (descriptionField && descriptionField.length > descriptionFieldMaxLength) ||