<?php

namespace ModulesGarden\HostingQuotaNotifications\App\UI\TicketTemplates\Forms;

use \ModulesGarden\HostingQuotaNotifications\Core\UI\Widget\Forms\BaseForm;
use \ModulesGarden\HostingQuotaNotifications\Core\UI\Interfaces\AdminArea;
use \ModulesGarden\HostingQuotaNotifications\Core\UI\Widget\Forms\FormConstants;
use \ModulesGarden\HostingQuotaNotifications\App\UI\TicketTemplates\Providers\TicketTemplatesProvider;
use \ModulesGarden\HostingQuotaNotifications\Core\UI\Widget\Forms\Fields\Hidden;

/**
 * Description of DeleteTicketTemplateForm
 *
 * @author Artur Pilch <artur.pi@modulesgarden.com>
 */
class DeleteTicketTemplateForm extends BaseForm implements AdminArea
{
    protected $id    = 'deleteTicketTemplateForm';
    protected $name  = 'deleteTicketTemplateForm';
    protected $title = 'deleteTicketTemplateForm';

    
    public function initContent()
    {
        $this->setFormType(FormConstants::DELETE);
        $this->dataProvider = new TicketTemplatesProvider();
        $this->setConfirmMessage('confirmGroupDeleteForm');
        $this->initFields();
        $this->loadDataToForm();
    }
    
    
    private function initFields()
    {   
        $this->addField(new Hidden('ticketTemplateIdToDelete'));
    }
}
