Beispiel #1
0
    /// <summary>
    /// Handles the Load event of the Page control.
    /// </summary>
    protected void Page_Load(object sender, EventArgs e)
    {
        widgetInstanceGuid = QueryHelper.GetGuid("widgetinstanceguid", Guid.Empty);

        widgetInstance = WidgetService.GetWidgetConfiguration(widgetInstanceGuid);
        if (widgetInstance == null)
        {
            ShowWidgetNotFound();
            return;
        }

        widgetTypeDefinition = EmailWidgetInfoProvider.GetEmailWidgetInfo(widgetInstance.TypeIdentifier, SiteContext.CurrentSiteName);
        if (widgetTypeDefinition == null)
        {
            ShowWidgetNotFound();
            return;
        }

        widgetTypeFormInfo = new FormInfo(widgetTypeDefinition.EmailWidgetProperties);

        btnSubmit.Enabled = EditEnabled;
        SetClientApplicationData();
        SetupHeader();
        SetupForm();

        if (EditEnabled)
        {
            btnSubmit.Click += btnSubmit_Click;
        }

        // Add shadow below header actions
        ScriptHelper.RegisterModule(Page, "CMS/HeaderShadow");
    }