using System;
using System.Collections;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;


using Bitrix.Components;
using Bitrix.UI;
using Bitrix.DataTypes;

public partial class bitrix_components_bitrix_photogallery_section_templates__default_template : BXComponentTemplate<PhotogalleryAlbum>
{
    protected void Page_Load(object sender, EventArgs e)
    {
        ScriptManager.RegisterStartupScript(this, GetType(), GetType().FullName, "<script type='text/javascript'>SetPhotoHeight();</script>", false);


        if (Component.Album != null)
        {
            lButtonDelete.Visible = true;
            lButtonDelete.OnClientClick = string.Format("return confirm(\"{0}\");", JSEncode(GetMessageRaw("ConfirmText.DoYouReallyWantRemoveThisAlbum")));
        }

    }
    protected void lbDelete_Click(object sender, EventArgs e)
    {
        BXParamsBag<object> par = new BXParamsBag<object>();

        List<string> err = new List<string>();

        if (!Component.ProcessCommand("delete", par, err))
        {
            //foreach (string kvp in err)
            //    errorMessage.AddErrorMessage(kvp, "vgLoginForm", "LoginField");
        }
    }
}
