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

namespace ModulesGarden\Servers\ZimbraEmail\App\UI\Client\DistributionList\Forms;


use ModulesGarden\Servers\ZimbraEmail\App\UI\Admin\Custom\Forms\SortedFieldForm;
use ModulesGarden\Servers\ZimbraEmail\App\UI\Client\DistributionList\Providers\DeleteListDataProvider;
use ModulesGarden\Servers\ZimbraEmail\App\UI\Client\EmailAccount\Providers\DeleteAccountDataProvider;
use ModulesGarden\Servers\ZimbraEmail\Core\UI\Interfaces\ClientArea;
use ModulesGarden\Servers\ZimbraEmail\Core\UI\Widget\Forms\BaseForm;
use ModulesGarden\Servers\ZimbraEmail\Core\UI\Widget\Forms\Fields\Hidden;
use ModulesGarden\Servers\ZimbraEmail\Core\UI\Widget\Forms\FormConstants;

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

    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();
    }

}