<?php
namespace Modules\Admin\Config\ImportedOrders\SystemManagement;

class View_Utils_FormManageAccount extends \App\Mvc\View_Utils_FormAbstract
{
	/**
	 * Creates the form for entities match insert/update.
	 * @see \App\Mvc\View_Utils_FormAbstract::getForm()
	 */
	public function getForm()
	{

		$entityCfg = \Entity\ExtResSystem::loadCFG();

		$form = \Engine\Form\General::create();
		$form->addContainer(\Engine\Form\Container\Fieldset::create());

		// description
		$fldLabel = new \Engine\Form\Input\Label(null);
		$fldLabel->setStyle('noLabel', true);
		$fldLabel->setDetails($this->lang['formFields']['accountsLabel']);
		$form->addElement($fldLabel);

		// username
		$fldUsername = new \Engine\Form\Input\Text($this->lang['formFields']['username'], 'username', $this->values['username']);
		$fldUsername->setMandatory(true);
		$form->addElement($fldUsername);

		// token
		$fldToken = new \Engine\Form\Input\Password($this->lang['formFields']['token'], 'token', $this->values['token']);
		$fldToken->setStyle('showGeneratePasswordButton', true);
		$fldToken->setStyle('showPassword', true);
		$fldToken->setMandatory(true);
		$form->addElement($fldToken);


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

		return $form;
	}
}