<?php
/**
 * Class DeleteListForm
 * User: ThurData
 * Date: 2019-10-01
 * Time: 11:25
 * @package ThurData\Servers\KerioEmail\App\UI\Client\DistributionList\Forms
 */

namespace ThurData\Servers\KerioEmail\App\UI\Client\DistributionList\Forms;


use ThurData\Servers\KerioEmail\App\UI\Client\DistributionList\Providers\DeleteListDataProvider;
use ThurData\Servers\KerioEmail\Core\UI\Interfaces\ClientArea;
use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\BaseForm;
use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Fields\Hidden;
use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\FormConstants;

class DeleteListForm extends BaseForm implements ClientArea
{
    protected $id    = 'deleteListForm';
    protected $name  = 'deleteListForm';
    protected $title = 'deleteListForm';

    public function initContent()
    {
        $this->setFormType(FormConstants::DELETE);
        $this->dataProvider = new DeleteListDataProvider();

        $this->setConfirmMessage('confirmRemoveList');

        $field = new Hidden();
        $field->setId('id');
        $field->setName('id');
        $this->addField($field);

        $this->loadDataToForm();
    }

}