private void SetSpecialMessageActions(IPortalContext portalContext, FormActionMetadata formActionMetadata,
                                              int languageCode, Action action, List <ViewActionLink> topItemActionLinks, List <ViewActionLink> bottomItemActionLinks, string portalName = null)
        {
            if (action is CloseIncidentAction)
            {
                var closeIncidentAction = (CloseIncidentAction)action;

                if (!closeIncidentAction.IsConfigurationValid())
                {
                    return;
                }

                var closeIncidentActionLink = new CloseIncidentActionLink(portalContext, formActionMetadata, languageCode, closeIncidentAction, true, null, portalName);

                CloseIncidentActionLink = closeIncidentActionLink;

                AddActionLinkToSet(topItemActionLinks, bottomItemActionLinks, closeIncidentActionLink);
            }

            if (action is ResolveCaseAction)
            {
                var resolveCaseAction = (ResolveCaseAction)action;

                if (!resolveCaseAction.IsConfigurationValid())
                {
                    return;
                }

                var resolveCaseActionLink = new ResolveCaseActionLink(portalContext, formActionMetadata, languageCode, resolveCaseAction, true, null, portalName);

                ResolveCaseActionLink = resolveCaseActionLink;

                AddActionLinkToSet(topItemActionLinks, bottomItemActionLinks, resolveCaseActionLink);
            }

            if (action is ReopenCaseAction)
            {
                var reopenCaseAction = (ReopenCaseAction)action;

                if (!reopenCaseAction.IsConfigurationValid())
                {
                    return;
                }

                var reopenCaseActionLink = new ReopenCaseActionLink(portalContext, formActionMetadata, languageCode, reopenCaseAction, true, null, portalName);

                ReopenCaseActionLink = reopenCaseActionLink;

                AddActionLinkToSet(topItemActionLinks, bottomItemActionLinks, reopenCaseActionLink);
            }

            if (action is CancelCaseAction)
            {
                var cancelCaseAction = (CancelCaseAction)action;

                if (!cancelCaseAction.IsConfigurationValid())
                {
                    return;
                }

                var cancelCaseActionLink = new CancelCaseActionLink(portalContext, formActionMetadata, languageCode, cancelCaseAction, true, null, portalName);

                CancelCaseActionLink = cancelCaseActionLink;

                AddActionLinkToSet(topItemActionLinks, bottomItemActionLinks, cancelCaseActionLink);
            }

            if (action is QualifyLeadAction)
            {
                var qualifyLeadAction = (QualifyLeadAction)action;

                if (!qualifyLeadAction.IsConfigurationValid())
                {
                    return;
                }

                var qualifyLeadActionLink = new QualifyLeadActionLink(portalContext, formActionMetadata, languageCode, qualifyLeadAction, true, null, portalName);

                QualifyLeadActionLink = qualifyLeadActionLink;

                AddActionLinkToSet(topItemActionLinks, bottomItemActionLinks, qualifyLeadActionLink);
            }

            if (action is ConvertQuoteToOrderAction)
            {
                var convertQuoteToOrderAction = (ConvertQuoteToOrderAction)action;

                if (!convertQuoteToOrderAction.IsConfigurationValid())
                {
                    return;
                }

                var convertQuoteToOrderActionLink = new ConvertQuoteToOrderActionLink(portalContext, formActionMetadata, languageCode, (ConvertQuoteToOrderAction)action);

                ConvertQuoteToOrderActionLink = convertQuoteToOrderActionLink;

                AddActionLinkToSet(topItemActionLinks, bottomItemActionLinks, convertQuoteToOrderActionLink);
            }

            if (action is ConvertOrderToInvoiceAction)
            {
                var convertOrderToInvoiceAction = (ConvertOrderToInvoiceAction)action;

                if (!convertOrderToInvoiceAction.IsConfigurationValid())
                {
                    return;
                }

                var convertOrderToInvoiceActionLink = new ConvertOrderToInvoiceActionLink(portalContext, formActionMetadata, languageCode, convertOrderToInvoiceAction, true, null, portalName);

                ConvertOrderToInvoiceActionLink = convertOrderToInvoiceActionLink;

                AddActionLinkToSet(topItemActionLinks, bottomItemActionLinks, convertOrderToInvoiceActionLink);
            }

            if (action is DeactivateAction)
            {
                var deactivateAction = (DeactivateAction)action;

                if (!deactivateAction.IsConfigurationValid())
                {
                    return;
                }

                var deactivateActionLink = new DeactivateActionLink(portalContext, formActionMetadata, languageCode, deactivateAction, true, null, portalName);

                DeactivateActionLink = deactivateActionLink;

                AddActionLinkToSet(topItemActionLinks, bottomItemActionLinks, deactivateActionLink);
            }

            if (action is ActivateAction)
            {
                var activateAction = (ActivateAction)action;

                if (!activateAction.IsConfigurationValid())
                {
                    return;
                }

                var activateActionLink = new ActivateActionLink(portalContext, formActionMetadata, languageCode, activateAction, true, null, portalName);

                ActivateActionLink = activateActionLink;

                AddActionLinkToSet(topItemActionLinks, bottomItemActionLinks, activateActionLink);
            }

            if (action is ActivateQuoteAction)
            {
                var activateQuoteAction = (ActivateQuoteAction)action;

                if (!activateQuoteAction.IsConfigurationValid())
                {
                    return;
                }

                var activateQuoteActionLink = new ActivateQuoteActionLink(portalContext, formActionMetadata, languageCode, activateQuoteAction, true, null, portalName);

                ActivateQuoteActionLink = activateQuoteActionLink;

                AddActionLinkToSet(topItemActionLinks, bottomItemActionLinks, activateQuoteActionLink);
            }

            if (action is SetOpportunityOnHoldAction)
            {
                var setOpportunityOnHoldAction = (SetOpportunityOnHoldAction)action;

                if (!setOpportunityOnHoldAction.IsConfigurationValid())
                {
                    return;
                }

                var setOpportunityOnHoldActionLink = new SetOpportunityOnHoldActionLink(portalContext, formActionMetadata, languageCode, setOpportunityOnHoldAction, true, null, portalName);

                SetOpportunityOnHoldActionLink = setOpportunityOnHoldActionLink;

                AddActionLinkToSet(topItemActionLinks, bottomItemActionLinks, setOpportunityOnHoldActionLink);
            }

            if (action is ReopenOpportunityAction)
            {
                var reopenOpportunityAction = (ReopenOpportunityAction)action;

                if (!reopenOpportunityAction.IsConfigurationValid())
                {
                    return;
                }

                var reopenOpportunityActionLink = new ReopenOpportunityActionLink(portalContext, formActionMetadata, languageCode, reopenOpportunityAction, true, null, portalName);

                ReopenOpportunityActionLink = reopenOpportunityActionLink;

                AddActionLinkToSet(topItemActionLinks, bottomItemActionLinks, reopenOpportunityActionLink);
            }

            if (action is CalculateOpportunityAction)
            {
                var calculateOpportunityAction = (CalculateOpportunityAction)action;

                if (!calculateOpportunityAction.IsConfigurationValid())
                {
                    return;
                }

                var calculateOpportunityActionLink = new CalculateOpportunityActionLink(portalContext, formActionMetadata, languageCode, calculateOpportunityAction, true, null, portalName);

                CalculateOpportunityActionLink = calculateOpportunityActionLink;

                AddActionLinkToSet(topItemActionLinks, bottomItemActionLinks, calculateOpportunityActionLink);
            }

            if (action is WinOpportunityAction)
            {
                var winOpportunityAction = (WinOpportunityAction)action;

                if (!winOpportunityAction.IsConfigurationValid())
                {
                    return;
                }

                var winOpportunityActionLink = new WinOpportunityActionLink(portalContext, formActionMetadata, languageCode, winOpportunityAction, true, null, portalName);

                WinOpportunityActionLink = winOpportunityActionLink;

                AddActionLinkToSet(topItemActionLinks, bottomItemActionLinks, winOpportunityActionLink);
            }

            if (action is LoseOpportunityAction)
            {
                var loseOpportunityAction = (LoseOpportunityAction)action;

                if (!loseOpportunityAction.IsConfigurationValid())
                {
                    return;
                }

                var loseOpportunityActionLink = new LoseOpportunityActionLink(portalContext, formActionMetadata, languageCode, loseOpportunityAction, true, null, portalName);

                LoseOpportunityActionLink = loseOpportunityActionLink;

                AddActionLinkToSet(topItemActionLinks, bottomItemActionLinks, loseOpportunityActionLink);
            }

            if (action is GenerateQuoteFromOpportunityAction)
            {
                var generateQuoteFromOpportunityAction = (GenerateQuoteFromOpportunityAction)action;

                if (!generateQuoteFromOpportunityAction.IsConfigurationValid())
                {
                    return;
                }

                var generateQuoteFromOpportunityActionLink = new GenerateQuoteFromOpportunityActionLink(portalContext, formActionMetadata, languageCode, generateQuoteFromOpportunityAction, true, null, portalName);

                GenerateQuoteFromOpportunityActionLink = generateQuoteFromOpportunityActionLink;

                AddActionLinkToSet(topItemActionLinks, bottomItemActionLinks, generateQuoteFromOpportunityActionLink);
            }

            if (action is UpdatePipelinePhaseAction)
            {
                var updatePipelinePhaseAction = (UpdatePipelinePhaseAction)action;

                if (!updatePipelinePhaseAction.IsConfigurationValid())
                {
                    return;
                }

                var updatePipelinePhaseActionLink = new UpdatePipelinePhaseActionLink(portalContext, formActionMetadata, languageCode, updatePipelinePhaseAction, true, null, portalName);

                UpdatePipelinePhaseActionLink = updatePipelinePhaseActionLink;

                AddActionLinkToSet(topItemActionLinks, bottomItemActionLinks, updatePipelinePhaseActionLink);
            }
        }
Exemple #2
0
        public static void ActionModalWindows(this HtmlHelper html, TagBuilder container, DeleteActionLink deleteActionLink,
                                              QualifyLeadActionLink qualifyLeadActionLink, CloseIncidentActionLink closeCaseActionLink,
                                              ResolveCaseActionLink resolveCaseActionLink, ReopenCaseActionLink reopenCaseActionLink,
                                              CancelCaseActionLink cancelCaseActionLink, ConvertQuoteToOrderActionLink convertQuoteActionLink,
                                              ConvertOrderToInvoiceActionLink convertOrderActionLink, CalculateOpportunityActionLink calculateOpportunityActionLink,
                                              DeactivateActionLink deactivateActionLink, ActivateActionLink activateActionLink,
                                              ActivateQuoteActionLink activateQuoteActionLink, SetOpportunityOnHoldActionLink opportunityOnHoldActionLink,
                                              ReopenOpportunityActionLink reopenOpportunityActionLink, WinOpportunityActionLink winOpportunityActionLink,
                                              LoseOpportunityActionLink loseOpportunityActionLink,
                                              GenerateQuoteFromOpportunityActionLink generateQuoteFromOpportunityActionLink,
                                              UpdatePipelinePhaseActionLink updatePipelinePhaseAction, WorkflowActionLink firstWorkflow,
                                              DisassociateActionLink disassociateAction, CreateRelatedRecordActionLink createRelatedRecordAction)
        {
            if (deleteActionLink.Enabled)
            {
                container.InnerHtml += html.DeleteModal(deleteActionLink.Modal.Size ?? BootstrapExtensions.BootstrapModalSize.Default,
                                                        deleteActionLink.Modal.CssClass, deleteActionLink.Modal.Title.GetValueOrDefault(DefaultModalDeleteTitle),
                                                        deleteActionLink.Confirmation.GetValueOrDefault(DefaultModalDeleteBody),
                                                        deleteActionLink.Modal.DismissButtonSrText.GetValueOrDefault(DefaultModalDismissButtonSrText),
                                                        deleteActionLink.Modal.PrimaryButtonText.GetValueOrDefault(DefaultModalDeletePrimaryButtonText),
                                                        deleteActionLink.Modal.CloseButtonText.GetValueOrDefault(DefaultModalDeleteCancelButtonText),
                                                        deleteActionLink.Modal.TitleCssClass, deleteActionLink.Modal.PrimaryButtonCssClass,
                                                        deleteActionLink.Modal.CloseButtonCssClass);
            }

            if (qualifyLeadActionLink.Enabled && (qualifyLeadActionLink.ShowModal == ShowModal.Yes))
            {
                container.InnerHtml +=
                    html.QualifyLeadModal(qualifyLeadActionLink.Modal.Size ?? BootstrapExtensions.BootstrapModalSize.Default,
                                          qualifyLeadActionLink.Modal.CssClass, qualifyLeadActionLink.Modal.Title, qualifyLeadActionLink.Confirmation,
                                          qualifyLeadActionLink.Modal.DismissButtonSrText, qualifyLeadActionLink.Modal.PrimaryButtonText,
                                          qualifyLeadActionLink.Modal.CloseButtonText, qualifyLeadActionLink.Modal.TitleCssClass,
                                          qualifyLeadActionLink.Modal.PrimaryButtonCssClass, qualifyLeadActionLink.Modal.CloseButtonCssClass);
            }

            if (closeCaseActionLink.Enabled && (closeCaseActionLink.ShowModal == ShowModal.Yes))
            {
                container.InnerHtml +=
                    html.CloseCaseModal(closeCaseActionLink.Modal.Size ?? BootstrapExtensions.BootstrapModalSize.Default,
                                        closeCaseActionLink.Modal.CssClass, closeCaseActionLink.Modal.Title, closeCaseActionLink.Confirmation,
                                        null, null, closeCaseActionLink.Modal.DismissButtonSrText, closeCaseActionLink.Modal.PrimaryButtonText,
                                        closeCaseActionLink.Modal.CloseButtonText, closeCaseActionLink.Modal.TitleCssClass,
                                        closeCaseActionLink.Modal.PrimaryButtonCssClass, closeCaseActionLink.Modal.CloseButtonCssClass);
            }

            if (resolveCaseActionLink.Enabled)
            {
                container.InnerHtml +=
                    html.ResolveCaseModal(resolveCaseActionLink.Modal.Size ?? BootstrapExtensions.BootstrapModalSize.Default,
                                          resolveCaseActionLink.Modal.CssClass, resolveCaseActionLink.Modal.Title, resolveCaseActionLink.Confirmation,
                                          resolveCaseActionLink.SubjectLabel, resolveCaseActionLink.DescriptionLabel,
                                          resolveCaseActionLink.Modal.DismissButtonSrText, resolveCaseActionLink.Modal.PrimaryButtonText,
                                          resolveCaseActionLink.Modal.CloseButtonText, resolveCaseActionLink.Modal.TitleCssClass,
                                          resolveCaseActionLink.Modal.PrimaryButtonCssClass, resolveCaseActionLink.Modal.CloseButtonCssClass);
            }

            if (reopenCaseActionLink.Enabled && (reopenCaseActionLink.ShowModal == ShowModal.Yes))
            {
                container.InnerHtml +=
                    html.ReopenCaseModal(reopenCaseActionLink.Modal.Size ?? BootstrapExtensions.BootstrapModalSize.Default,
                                         reopenCaseActionLink.Modal.CssClass, reopenCaseActionLink.Modal.Title, reopenCaseActionLink.Confirmation,
                                         null, null, reopenCaseActionLink.Modal.DismissButtonSrText, reopenCaseActionLink.Modal.PrimaryButtonText,
                                         reopenCaseActionLink.Modal.CloseButtonText, reopenCaseActionLink.Modal.TitleCssClass,
                                         reopenCaseActionLink.Modal.PrimaryButtonCssClass, reopenCaseActionLink.Modal.CloseButtonCssClass);
            }

            if (cancelCaseActionLink.Enabled && (cancelCaseActionLink.ShowModal == ShowModal.Yes))
            {
                container.InnerHtml +=
                    html.CancelCaseModal(cancelCaseActionLink.Modal.Size ?? BootstrapExtensions.BootstrapModalSize.Default,
                                         cancelCaseActionLink.Modal.CssClass, cancelCaseActionLink.Modal.Title, cancelCaseActionLink.Confirmation,
                                         null, null, cancelCaseActionLink.Modal.DismissButtonSrText, cancelCaseActionLink.Modal.PrimaryButtonText,
                                         cancelCaseActionLink.Modal.CloseButtonText, cancelCaseActionLink.Modal.TitleCssClass,
                                         cancelCaseActionLink.Modal.PrimaryButtonCssClass, cancelCaseActionLink.Modal.CloseButtonCssClass);
            }

            if (convertQuoteActionLink.Enabled && (convertQuoteActionLink.ShowModal == ShowModal.Yes))
            {
                container.InnerHtml +=
                    html.ConvertQuoteModal(convertQuoteActionLink.Modal.Size ?? BootstrapExtensions.BootstrapModalSize.Default,
                                           convertQuoteActionLink.Modal.CssClass, convertQuoteActionLink.Modal.Title, convertQuoteActionLink.Confirmation,
                                           convertQuoteActionLink.Modal.DismissButtonSrText, convertQuoteActionLink.Modal.PrimaryButtonText,
                                           convertQuoteActionLink.Modal.CloseButtonText, convertQuoteActionLink.Modal.TitleCssClass,
                                           convertQuoteActionLink.Modal.PrimaryButtonCssClass, convertQuoteActionLink.Modal.CloseButtonCssClass);
            }

            if (convertOrderActionLink.Enabled && (convertOrderActionLink.ShowModal == ShowModal.Yes))
            {
                container.InnerHtml +=
                    html.ConvertOrderModal(closeCaseActionLink.Modal.Size ?? BootstrapExtensions.BootstrapModalSize.Default,
                                           convertOrderActionLink.Modal.CssClass, convertOrderActionLink.Modal.Title, convertOrderActionLink.Confirmation,
                                           convertOrderActionLink.Modal.DismissButtonSrText, convertOrderActionLink.Modal.PrimaryButtonText,
                                           convertOrderActionLink.Modal.CloseButtonText, convertOrderActionLink.Modal.TitleCssClass,
                                           convertOrderActionLink.Modal.PrimaryButtonCssClass, convertOrderActionLink.Modal.CloseButtonCssClass);
            }

            if (calculateOpportunityActionLink.Enabled && (calculateOpportunityActionLink.ShowModal == ShowModal.Yes))
            {
                container.InnerHtml +=
                    html.CalculateOpportunityModal(
                        calculateOpportunityActionLink.Modal.Size ?? BootstrapExtensions.BootstrapModalSize.Default,
                        calculateOpportunityActionLink.Modal.CssClass, calculateOpportunityActionLink.Modal.Title,
                        calculateOpportunityActionLink.Confirmation, calculateOpportunityActionLink.Modal.DismissButtonSrText,
                        calculateOpportunityActionLink.Modal.PrimaryButtonText, calculateOpportunityActionLink.Modal.CloseButtonText,
                        calculateOpportunityActionLink.Modal.TitleCssClass, calculateOpportunityActionLink.Modal.PrimaryButtonCssClass,
                        calculateOpportunityActionLink.Modal.CloseButtonCssClass);
            }

            if (deactivateActionLink.Enabled && (deactivateActionLink.ShowModal == ShowModal.Yes))
            {
                container.InnerHtml +=
                    html.DeactivateModal(deactivateActionLink.Modal.Size ?? BootstrapExtensions.BootstrapModalSize.Default,
                                         deactivateActionLink.Modal.CssClass, deactivateActionLink.Modal.Title, deactivateActionLink.Confirmation,
                                         deactivateActionLink.Modal.DismissButtonSrText, deactivateActionLink.Modal.PrimaryButtonText,
                                         deactivateActionLink.Modal.CloseButtonText,
                                         deactivateActionLink.Modal.TitleCssClass, deactivateActionLink.Modal.PrimaryButtonCssClass,
                                         deactivateActionLink.Modal.CloseButtonCssClass);
            }

            if (activateActionLink.Enabled && (activateActionLink.ShowModal == ShowModal.Yes))
            {
                container.InnerHtml +=
                    html.ActivateModal(activateActionLink.Modal.Size ?? BootstrapExtensions.BootstrapModalSize.Default,
                                       activateActionLink.Modal.CssClass, activateActionLink.Modal.Title, activateActionLink.Confirmation,
                                       activateActionLink.Modal.DismissButtonSrText, activateActionLink.Modal.PrimaryButtonText,
                                       activateActionLink.Modal.CloseButtonText,
                                       activateActionLink.Modal.TitleCssClass, activateActionLink.Modal.PrimaryButtonCssClass,
                                       activateActionLink.Modal.CloseButtonCssClass);
            }

            if (activateQuoteActionLink.Enabled && (activateQuoteActionLink.ShowModal == ShowModal.Yes))
            {
                container.InnerHtml +=
                    html.ActivateQuoteModal(activateQuoteActionLink.Modal.Size ?? BootstrapExtensions.BootstrapModalSize.Default,
                                            activateQuoteActionLink.Modal.CssClass, activateQuoteActionLink.Modal.Title, activateQuoteActionLink.Confirmation,
                                            activateQuoteActionLink.Modal.DismissButtonSrText, activateQuoteActionLink.Modal.PrimaryButtonText,
                                            activateQuoteActionLink.Modal.CloseButtonText,
                                            activateQuoteActionLink.Modal.TitleCssClass, activateQuoteActionLink.Modal.PrimaryButtonCssClass,
                                            activateQuoteActionLink.Modal.CloseButtonCssClass);
            }

            if (opportunityOnHoldActionLink.Enabled && (opportunityOnHoldActionLink.ShowModal == ShowModal.Yes))
            {
                container.InnerHtml +=
                    html.SetOpportunityOnHoldModal(
                        opportunityOnHoldActionLink.Modal.Size ?? BootstrapExtensions.BootstrapModalSize.Default,
                        opportunityOnHoldActionLink.Modal.CssClass, opportunityOnHoldActionLink.Modal.Title,
                        opportunityOnHoldActionLink.Confirmation, opportunityOnHoldActionLink.Modal.DismissButtonSrText,
                        opportunityOnHoldActionLink.Modal.PrimaryButtonText, opportunityOnHoldActionLink.Modal.CloseButtonText,
                        opportunityOnHoldActionLink.Modal.TitleCssClass, opportunityOnHoldActionLink.Modal.PrimaryButtonCssClass,
                        opportunityOnHoldActionLink.Modal.CloseButtonCssClass);
            }

            if (reopenOpportunityActionLink.Enabled && (reopenOpportunityActionLink.ShowModal == ShowModal.Yes))
            {
                container.InnerHtml +=
                    html.ReopenOpportunityModal(reopenOpportunityActionLink.Modal.Size ?? BootstrapExtensions.BootstrapModalSize.Default,
                                                reopenOpportunityActionLink.Modal.CssClass, reopenOpportunityActionLink.Modal.Title,
                                                reopenOpportunityActionLink.Confirmation, reopenOpportunityActionLink.Modal.DismissButtonSrText,
                                                reopenOpportunityActionLink.Modal.PrimaryButtonText, reopenOpportunityActionLink.Modal.CloseButtonText,
                                                reopenOpportunityActionLink.Modal.TitleCssClass, reopenOpportunityActionLink.Modal.PrimaryButtonCssClass,
                                                reopenOpportunityActionLink.Modal.CloseButtonCssClass);
            }

            if (winOpportunityActionLink.Enabled && (winOpportunityActionLink.ShowModal == ShowModal.Yes))
            {
                container.InnerHtml +=
                    html.WinOpportunityModal(winOpportunityActionLink.Modal.Size ?? BootstrapExtensions.BootstrapModalSize.Default,
                                             winOpportunityActionLink.Modal.CssClass, winOpportunityActionLink.Modal.Title, winOpportunityActionLink.Confirmation,
                                             winOpportunityActionLink.Modal.DismissButtonSrText, winOpportunityActionLink.Modal.PrimaryButtonText,
                                             winOpportunityActionLink.Modal.CloseButtonText,
                                             winOpportunityActionLink.Modal.TitleCssClass, winOpportunityActionLink.Modal.PrimaryButtonCssClass,
                                             winOpportunityActionLink.Modal.CloseButtonCssClass);
            }

            if (loseOpportunityActionLink.Enabled && (loseOpportunityActionLink.ShowModal == ShowModal.Yes))
            {
                container.InnerHtml +=
                    html.LoseOpportunityModal(loseOpportunityActionLink.Modal.Size ?? BootstrapExtensions.BootstrapModalSize.Default,
                                              loseOpportunityActionLink.Modal.CssClass, loseOpportunityActionLink.Modal.Title,
                                              loseOpportunityActionLink.Confirmation, loseOpportunityActionLink.Modal.DismissButtonSrText,
                                              loseOpportunityActionLink.Modal.PrimaryButtonText, loseOpportunityActionLink.Modal.CloseButtonText,
                                              loseOpportunityActionLink.Modal.TitleCssClass, loseOpportunityActionLink.Modal.PrimaryButtonCssClass,
                                              loseOpportunityActionLink.Modal.CloseButtonCssClass);
            }

            if (generateQuoteFromOpportunityActionLink.Enabled &&
                (generateQuoteFromOpportunityActionLink.ShowModal == ShowModal.Yes))
            {
                container.InnerHtml +=
                    html.GenerateQuoteFromOpportunityModal(
                        generateQuoteFromOpportunityActionLink.Modal.Size ?? BootstrapExtensions.BootstrapModalSize.Default,
                        generateQuoteFromOpportunityActionLink.Modal.CssClass, generateQuoteFromOpportunityActionLink.Modal.Title,
                        generateQuoteFromOpportunityActionLink.Confirmation,
                        generateQuoteFromOpportunityActionLink.Modal.DismissButtonSrText,
                        generateQuoteFromOpportunityActionLink.Modal.PrimaryButtonText,
                        generateQuoteFromOpportunityActionLink.Modal.CloseButtonText,
                        generateQuoteFromOpportunityActionLink.Modal.TitleCssClass,
                        generateQuoteFromOpportunityActionLink.Modal.PrimaryButtonCssClass,
                        generateQuoteFromOpportunityActionLink.Modal.CloseButtonCssClass);
            }

            if (updatePipelinePhaseAction.Enabled)
            {
                container.InnerHtml += html.UpdatePipelinePhaseModal(GetPipelinePhases(),
                                                                     updatePipelinePhaseAction.Modal.Size ?? BootstrapExtensions.BootstrapModalSize.Default,
                                                                     updatePipelinePhaseAction.Modal.CssClass, updatePipelinePhaseAction.Modal.Title,
                                                                     updatePipelinePhaseAction.Confirmation,
                                                                     updatePipelinePhaseAction.PipelinePhaseLabel, updatePipelinePhaseAction.DescriptionLabel,
                                                                     updatePipelinePhaseAction.Modal.DismissButtonSrText, updatePipelinePhaseAction.Modal.PrimaryButtonText,
                                                                     updatePipelinePhaseAction.Modal.CloseButtonText, updatePipelinePhaseAction.Modal.TitleCssClass,
                                                                     updatePipelinePhaseAction.Modal.PrimaryButtonCssClass, updatePipelinePhaseAction.Modal.CloseButtonCssClass);
            }

            if (firstWorkflow != null && firstWorkflow.Enabled)
            {
                container.InnerHtml += html.WorkflowModal(firstWorkflow.Modal.Size ?? BootstrapExtensions.BootstrapModalSize.Default,
                                                          firstWorkflow.Modal.CssClass, firstWorkflow.Modal.Title, firstWorkflow.Confirmation,
                                                          firstWorkflow.Modal.DismissButtonSrText, firstWorkflow.Modal.PrimaryButtonText, firstWorkflow.Modal.CloseButtonText,
                                                          firstWorkflow.Modal.TitleCssClass, firstWorkflow.Modal.PrimaryButtonCssClass, firstWorkflow.Modal.CloseButtonCssClass);
            }

            if (disassociateAction != null && disassociateAction.Enabled)
            {
                container.InnerHtml +=
                    html.DissassociateModal(disassociateAction.Modal.Size ?? BootstrapExtensions.BootstrapModalSize.Default,
                                            disassociateAction.Modal.CssClass, disassociateAction.Modal.Title, disassociateAction.Confirmation,
                                            disassociateAction.Modal.DismissButtonSrText, disassociateAction.Modal.PrimaryButtonText,
                                            disassociateAction.Modal.CloseButtonText, disassociateAction.Modal.TitleCssClass,
                                            disassociateAction.Modal.PrimaryButtonCssClass, disassociateAction.Modal.CloseButtonCssClass);
            }
        }