<?php

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

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

/**
 *
 * Created by PhpStorm.
 * User: ThurData
 * Date: 16.10.19
 * Time: 13:20
 * Class ChangeStatusForm
 */
class ChangeStatusForm extends BaseForm implements ClientArea
{
    protected $id    = 'changeStatusForm';
    protected $name  = 'changeStatusForm';
    protected $title = 'changeStatusForm';

    protected function getDefaultActions()
    {
        return ['updateStatus'];
    }

    public function initContent()
    {
        $this->setFormType('updateStatus');
        $this->dataProvider = new EditAccountDataProvider();

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

        $field = new Select('status');
        $this->addField($field);

        $this->loadDataToForm();
    }

}