diff --git a/source/java/org/alfresco/web/bean/CheckinCheckoutDialog.java b/source/java/org/alfresco/web/bean/CheckinCheckoutDialog.java index c89559ab9f..16b8ef211d 100644 --- a/source/java/org/alfresco/web/bean/CheckinCheckoutDialog.java +++ b/source/java/org/alfresco/web/bean/CheckinCheckoutDialog.java @@ -34,6 +34,7 @@ import javax.faces.event.ActionEvent; import org.alfresco.model.ApplicationModel; import org.alfresco.model.ContentModel; +import org.alfresco.model.WCMAppModel; import org.alfresco.repo.content.MimetypeMap; import org.alfresco.repo.transaction.RetryingTransactionHelper; import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback; @@ -53,6 +54,7 @@ import org.alfresco.web.app.servlet.DownloadContentServlet; import org.alfresco.web.bean.dialog.BaseDialogBean; import org.alfresco.web.bean.repository.Node; import org.alfresco.web.bean.repository.Repository; +import org.alfresco.web.forms.FormNotFoundException; import org.alfresco.web.ui.common.Utils; import org.alfresco.web.ui.common.component.UIActionLink; import org.apache.commons.logging.Log; @@ -282,8 +284,20 @@ public class CheckinCheckoutDialog extends BaseDialogBean boolean editingInline = false; Node node = setupContentDocument(id); + if (node.hasAspect(WCMAppModel.ASPECT_FORM_INSTANCE_DATA)) + { + editingInline = true; + + // editable form document + FacesContext fc = FacesContext.getCurrentInstance(); + this.navigator.setupDispatchContext(node); + + // TODO - rename editContent Wizard since it only deals with editing form content + fc.getApplication().getNavigationHandler().handleNavigation(fc, null, "wizard:editContent"); + } + // detect the inline editing aspect to see which edit mode to use - if (node.hasAspect(ApplicationModel.ASPECT_INLINEEDITABLE) && + else if (node.hasAspect(ApplicationModel.ASPECT_INLINEEDITABLE) && node.getProperties().get(ApplicationModel.PROP_EDITINLINE) != null && ((Boolean)node.getProperties().get(ApplicationModel.PROP_EDITINLINE)).booleanValue() == true) { diff --git a/source/java/org/alfresco/web/bean/wcm/CreateFormWizard.java b/source/java/org/alfresco/web/bean/wcm/CreateFormWizard.java index 337b3d75f0..4e17f5d702 100644 --- a/source/java/org/alfresco/web/bean/wcm/CreateFormWizard.java +++ b/source/java/org/alfresco/web/bean/wcm/CreateFormWizard.java @@ -235,9 +235,17 @@ public class CreateFormWizard if (LOGGER.isDebugEnabled()) LOGGER.debug("creating form " + this.getFormName()); - // get the node ref of the node that will contain the content (either Forms or Web Forms dictionary space) - final NodeRef contentFormsNodeRef = this.navigator.getCurrentNode().getNodeRef(); - + // get the node ref of the node that will contain the content + + // TODO - need better way to determine WCM vs ECM context + // can create form from CreateWebProject Wizard, or from Forms DataDictionary space or Web Forms DataDictionary space + NodeRef contentFormsNodeRef = this.formsService.getWebContentFormsNodeRef(); + if (this.navigator.getCurrentNode().getNodeRef().equals(this.formsService.getContentFormsNodeRef())) + { + // ECM form, store in Forms DataDictionary space + contentFormsNodeRef = this.formsService.getContentFormsNodeRef(); + } + final FileInfo folderInfo = this.fileFolderService.create(contentFormsNodeRef, this.getFormName(), diff --git a/source/web/jsp/wcm/create-website-wizard/forms.jsp b/source/web/jsp/wcm/create-website-wizard/forms.jsp index dce827c72b..02e90c4223 100644 --- a/source/web/jsp/wcm/create-website-wizard/forms.jsp +++ b/source/web/jsp/wcm/create-website-wizard/forms.jsp @@ -41,7 +41,7 @@ - + <%-- Selected Form table, with configuration buttons and info text --%>