<?php

namespace Modules\Partners\Customers\Segments;

class View_Utils_FormAdmin extends \App\Mvc\View_Utils_FormAbstract
{

	/**
	 * Creates the form for customer segment insert/update.
	 * @see \App\Mvc\View_Utils_FormAbstract::getForm()
	 */
	public function getForm()
	{
		$CFG = \Engine\Loader_Cfg::getInstance()->getGlobal();

		$form = \Engine\Form\General::create();
		$fieldset = \Engine\Form\Container\Fieldset::create($this->lang['index']['field']['segmentName']);
		$form->addContainer($fieldset);

		$segmentName =  new \Engine\Form\Input\Text($this->lang['index']['field']['segmentName'], 'segmentName', $this->values['segmentName']);
		$segmentName->setMandatory();
		$fieldset->addElement($segmentName);

		// submit button
		$form->addElement(new \Engine\Form\Input\Hidden('', $this->submitButtonName, 1));

		return $form;
	}

}
