<?php

namespace ModulesGarden\ProxmoxAddon\App\UI\IpLog\Forms;

use ModulesGarden\ProxmoxAddon\App\UI\IpLog\Providers\IpLogProvider;
use ModulesGarden\ProxmoxAddon\Core\UI\Interfaces\AdminArea;
use ModulesGarden\ProxmoxAddon\Core\UI\Widget\Forms\BaseForm;
use ModulesGarden\ProxmoxAddon\Core\UI\Widget\Forms\Fields\Hidden;

/**
 * Description of CreateForm
 *
 * @author Pawel Kopec <pawelk@modulesgarden.com>
 */
class DeleteForm extends BaseForm implements AdminArea
{

    public function initContent()
    {
        $this->initIds('deleteForm');
        $this->setFormType('delete');
        $this->setProvider(new IpLogProvider());
        $this->initFields();
    }

    protected function initFields()
    {
        $field = new Hidden('id');
        $this->addField($field);
        $this->setConfirmMessage('confirmDelete', ['name' => null]);
        $this->loadDataToForm();
    }

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