Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LPS-78784 SF #56466

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -55,6 +55,10 @@ Locale displayLocale = LocaleUtil.fromLanguageId(languageId);
<c:when test="<%= ddmFormDisplayContext.isFormAvailable() %>">
<portlet:actionURL name="addFormInstanceRecord" var="addFormInstanceRecordActionURL" />

<%
DDMFormInstance formInstance = ddmFormDisplayContext.getFormInstance();
%>

<div class="portlet-forms">
<aui:form action="<%= addFormInstanceRecordActionURL %>" data-DDMFormInstanceId="<%= formInstanceId %>" method="post" name="fm">

Expand All @@ -66,10 +70,6 @@ Locale displayLocale = LocaleUtil.fromLanguageId(languageId);
<aui:input name="redirect" type="hidden" value="<%= redirect %>" />
</c:if>

<%
DDMFormInstance formInstance = ddmFormDisplayContext.getFormInstance();
%>

<aui:input name="groupId" type="hidden" value="<%= formInstance.getGroupId() %>" />
<aui:input name="formInstanceId" type="hidden" value="<%= formInstance.getFormInstanceId() %>" />
<aui:input name="workflowAction" type="hidden" value="<%= WorkflowConstants.ACTION_PUBLISH %>" />
Expand Down Expand Up @@ -149,6 +149,10 @@ Locale displayLocale = LocaleUtil.fromLanguageId(languageId);

Liferay.on('destroyPortlet', <portlet:namespace />clearPortletHandlers);

<c:if test="<%= ddmFormDisplayContext.isFormShared() %>">
document.title = '<%= HtmlUtil.escape(formInstance.getName(displayLocale)) %>';
</c:if>

<c:choose>
<c:when test="<%= ddmFormDisplayContext.isAutosaveEnabled() %>">
var <portlet:namespace />form;
Expand Down
Expand Up @@ -17,6 +17,7 @@
<%@ include file="/layout/init.jsp" %>

<%@ taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme" %><%@
taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %><%@
taglib uri="http://liferay.com/tld/util" prefix="liferay-util" %>

<%@ page import="com.liferay.portal.kernel.layoutconfiguration.util.RuntimePageUtil" %><%@
Expand Down
Expand Up @@ -17,11 +17,13 @@
<%@ include file="/layout/view/init.jsp" %>

<%
String ppid = ParamUtil.getString(request, "p_p_id");
String velocityTemplateId = theme.getThemeId() + LayoutTemplateConstants.STANDARD_SEPARATOR + "pop_up";
String velocityTemplateContent = LayoutTemplateLocalServiceUtil.getContent("pop_up", true, theme.getThemeId());
String ppid = ParamUtil.getString(request, "p_p_id");
String velocityTemplateId = theme.getThemeId() + LayoutTemplateConstants.STANDARD_SEPARATOR + "pop_up";
String velocityTemplateContent = LayoutTemplateLocalServiceUtil.getContent("pop_up", true, theme.getThemeId());

if (Validator.isNotNull(velocityTemplateContent)) {
RuntimePageUtil.processTemplate(request, response, ppid, new StringTemplateResource(velocityTemplateId, velocityTemplateContent));
}
%>
if (Validator.isNotNull(velocityTemplateContent)) {
RuntimePageUtil.processTemplate(request, response, ppid, new StringTemplateResource(velocityTemplateId, velocityTemplateContent));
}
%>

<liferay-ui:layout-common />