HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/RMourik/bassol.nl/wwwroot/CMSModules/Objects/Controls/RecycleBinMenu.ascx.cs
using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using CMS.ExtendedControls;
using CMS.Helpers;
using CMS.SiteProvider;

public partial class CMSModules_Objects_Controls_RecycleBinMenu : CMSContextMenuControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        // Main menu       
        string menuId = ContextMenu.MenuID;
        string parentElemId = ContextMenu.ParentElementClientID;

        string actionPattern = "return ContextBinAction_" + parentElemId + "('{0}', GetContextMenuParameter('" + menuId + "'));";
        string confPattern = "if(confirm(" + ScriptHelper.GetLocalizedString("objectversioning.recyclebin.confirmrestore") + ")) {0} return false;";

        pnlRestoreBindings.Attributes.Add("onclick", string.Format(confPattern, string.Format(actionPattern, "restorewithoutbindings")));

        // Display restore to current site only if current site available
        SiteInfo si = SiteContext.CurrentSite;
        if (si != null)
        {
            pnlRestoreCurrent.Attributes.Add("onclick", string.Format(confPattern, string.Format(actionPattern, "restorecurrentsite")));
            lblRestoreCurrent.Text = String.Format(ResHelper.GetString("objectversioning.recyclebin.restoretocurrentsite"), HTMLHelper.HTMLEncode(si.DisplayName));
        }
        else
        {
            pnlRestoreCurrent.Visible = false;
        }
    }
}