<?php
namespace Modules\Partners\Customers\Dashboard;

class View_Utils_FormAdmin extends \App\Mvc\View_Utils_FormAbstract
{

	/**
	 * Creates the form for update agency details.
	 * @see \App\Mvc\View_Utils_FormAbstract::getForm()
	 */
	public function getForm()
	{
		$_LANG = \App\Loader_Lang::getInstance()->getGlobal();

		// load globals
		$form = \Engine\Form\General::create();
		$form->setStyle('width', '300');

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

		// customer
		$field = new \App\Form\Input\Autocomplete_Customer($this->lang['indexWithoutCustomer']['formFields']['customer'], 'customer', $this->values['customer']);
		$field->onPostSelect("$('form_').submit();");
		$field->setStyle('buttons', false);
		$fieldset->addElement($field);

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

		return $form;
	}

}
