<?php

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


use ModulesGarden\Servers\ZimbraEmail\App\UI\Client\EmailAccount\Providers\AccountDataProvider;
use ModulesGarden\Servers\ZimbraEmail\App\UI\Client\EmailAccount\Providers\EditAccountDataProvider;
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\Fields\Select;
use ModulesGarden\Servers\ZimbraEmail\Core\UI\Widget\Forms\FormConstants;

/**
 *
 * Created by PhpStorm.
 * User: Tomasz Bielecki ( tomasz.bi@modulesgarden.com )
 * 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();
    }

}