<?php

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

use ThurData\Servers\KerioEmail\App\UI\Client\EmailAccount\Providers\DeleteAccountDataProvider;
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;

/**
 *
 * Created by PhpStorm.
 * User: ThurData
 * Date: 18.09.19
 * Time: 11:28
 * Class DeleteAccountForm
 */
class DeleteAccountForm extends BaseForm implements ClientArea
{
    protected $id    = 'deleteAccountForm';
    protected $name  = 'deleteAccountForm';
    protected $title = 'deleteAccountForm';

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

        $this->setConfirmMessage('confirmRemoveAccount');

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

        $this->loadDataToForm();
    }
}