<?php
namespace Plugin\CategoryDelete42;
use Eccube\Event\TemplateEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class Event implements EventSubscriberInterface
{
/**
* @return array
*/
public static function getSubscribedEvents()
{
return [
'@admin/Product/category.twig' => 'onAdminProductCategoryTwig',
];
}
public function onAdminProductCategoryTwig(TemplateEvent $event)
{
$event->addSnippet('<script>$(\'a[data-bs-target="#DeleteModal"]\').removeClass("disabled")</script>', false);
}
}