<?php

namespace ModulesGarden\HostingQuotaNotifications\App\UI\Groups\Forms\Configuration;

use \ModulesGarden\HostingQuotaNotifications\Core\UI\Widget\Forms\BaseForm;
use \ModulesGarden\HostingQuotaNotifications\Core\UI\Interfaces\AdminArea;
use \ModulesGarden\HostingQuotaNotifications\Core\UI\Widget\Forms\FormConstants;
use \ModulesGarden\HostingQuotaNotifications\App\UI\Groups\Providers\Configuration\StepsProvider;
use \ModulesGarden\HostingQuotaNotifications\Core\UI\Widget\Forms\Fields\Hidden;

/**
 * Description of StepDeleteForm
 *
 * @author Artur Pilch <artur.pi@modulesgarden.com>
 */
class StepDeleteForm extends BaseForm implements AdminArea
{
    protected $id    = 'GroupDeleteForm';
    protected $name  = 'GroupDeleteForm';
    protected $title = 'GroupDeleteForm';

    public function getAllowedActions()
    {
        return ['deleteStep'];
    }
    
    public function initContent()
    {
        $this->setFormType('deleteStep');
        $this->dataProvider = new StepsProvider();
        
        $this->setConfirmMessage('confirmStepDeleteForm', ['class' => 'btn btn-danger']);

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

        $this->loadDataToForm();
    }
}
