<?php

namespace ModulesAbstract\FileExplorer;

abstract class View_Utils_FormFileRename extends \App\Mvc\View_Utils_FormAbstract
{

	/**
	 * The sbstract lang array.
	 * @var array
	 */
	protected $absLang;

	/**
	 * (non-PHPdoc)
	 * @see \App\Mvc\View_Utils_FormAbstract::loadModuleConfigs()
	 */
	protected function loadModuleConfigs()
	{
		parent::loadModuleConfigs();
		$this->absLang =  \App\Loader_Lang::getInstance()->loadAppFolder('_customLoad/modulesAbstract/fileExplorer')->getSection('ModulesAbstract/FileExplorer');
	}


	/**
	 * Creates the form for file rename.
	 * @see \App\Mvc\View_Utils_FormAbstract::getForm()
	 */
	public function getForm()
	{

		$form=\Engine\Form\General::create();
		$form->setStyle('width', '200');
		$form->addContainer(\Engine\Form\Container\Fieldset::create());

		$fld_name=new \Engine\Form\Input\Text($this->absLang['formRow']['name'], 'name', $this->values['name']);
		$fld_name->setMandatory(true);
		$form->addElement($fld_name);

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

		return $form;

	}

}