META-INF.resources.ddm_template.edit_basic_info.jsp Maven / Gradle / Ivy
<%--
/**
* SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
* SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
*/
--%>
<%@ include file="/init.jsp" %>
<%
JournalEditDDMTemplateDisplayContext journalEditDDMTemplateDisplayContext = (JournalEditDDMTemplateDisplayContext)request.getAttribute(JournalEditDDMTemplateDisplayContext.class.getName());
DDMTemplate ddmTemplate = journalEditDDMTemplateDisplayContext.getDDMTemplate();
DDMStructure ddmStructure = journalEditDDMTemplateDisplayContext.getDDMStructure();
%>
">
" id="<%= liferayPortletResponse.getNamespace() %>ddmStructure" name="structure" readonly value="<%= (ddmStructure != null) ? HtmlUtil.escape(ddmStructure.getName(locale)) : StringPool.BLANK %>" class="form-control lfr-input-resource" />
<%
Portlet portlet = PortletLocalServiceUtil.getPortletById(portletDisplay.getId());
%>
">
Liferay.Util.toggleBoxes(
' cacheable',
' -cacheableWarningMessage'
);
const selectDDMStructure = document.getElementById(
' selectDDMStructure'
);
const onClick = (event) => {
Liferay.Util.openSelectionModal({
onSelect: function (selectedItem) {
const itemValue = JSON.parse(selectedItem.value);
if (
document. fm. classPK
.value != itemValue.ddmstructureid
) {
document. fm. classPK.value =
itemValue.ddmstructureid;
Liferay.fire(' refreshEditor');
}
},
selectEventName: ' selectDDMStructure',
title: Liferay.Util.sub(
'<%= UnicodeLanguageUtil.get(request, "select-x") %>',
'<%= UnicodeLanguageUtil.get(request, "structure") %>'
),
url: '<%= journalDisplayContext.getSelectDDMStructureURL() %>>',
});
};
if (selectDDMStructure) {
selectDDMStructure.addEventListener('click', onClick);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy