<?php
namespace ModulesGarden\ProxmoxAddon\App\UI\CloudInitScriptCreate\Sections;

use ModulesGarden\ProxmoxAddon\Core\UI\Widget\Forms\Fields\Hidden;
use ModulesGarden\ProxmoxAddon\Core\UI\Widget\Forms\Fields\Text;
use ModulesGarden\ProxmoxAddon\Core\UI\Widget\Forms\Fields\Textarea;
use ModulesGarden\ProxmoxAddon\Core\UI\Widget\Forms\Sections\BoxSection;

class GeneralSection extends BoxSection
{

    public function initContent()
    {
        //id
        $field = new Hidden("id");
        $this->addField($field);
        //name
        $field = new Text("name");
        $field->notEmpty();
        $field->setLabelWidth(12);
        $this->addField($field);
        //script
        $field = new Textarea("script");
        $field->setLabelWidth(12);
        $this->addField($field);
        //meta
        $field = new Textarea("meta");
        $field->setLabelWidth(12);
        $this->addField($field);
        //network
        $field = new Textarea("network");
        $field->setLabelWidth(12);
        $this->addField($field);
    }
}