<?php

namespace ModulesGarden\Servers\OpenXchange\App\UI\Client\EmailCatchAll\Forms;


use ModulesGarden\Servers\OpenXchange\App\UI\Client\EmailCatchAll\Providers\DeleteEmailCatchAllDataProvider;
use ModulesGarden\Servers\OpenXchange\Core\UI\Interfaces\ClientArea;
use ModulesGarden\Servers\OpenXchange\Core\UI\Widget\Forms\BaseForm;
use ModulesGarden\Servers\OpenXchange\Core\UI\Widget\Forms\Fields\Hidden;
use ModulesGarden\Servers\OpenXchange\Core\UI\Widget\Forms\FormConstants;

/**
 *
 * Created by PhpStorm.
 * User: Tomasz Bielecki ( tomasz.bi@modulesgarden.com )
 * Date: 18.09.19
 * Time: 12:59
 * Class DeleteEmailCatchAllForm
 */
class DeleteEmailCatchAllForm extends BaseForm implements ClientArea
{
    protected $id    = 'deleteAccountForm';
    protected $name  = 'deleteAccountForm';
    protected $title = 'deleteAccountForm';

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

        $this->setConfirmMessage('confirmDeleteAccountAlias');

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

        $this->loadDataToForm();
    }
}