<?php
namespace Modules\Partners\Corporates\CreditCards;

class View_Utils_FormAdmin extends \App\Mvc\View_Utils_FormAbstract
{
	public function getForm()
	{

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

		// corporate
		$corporate = \App\Form\Input\Autocomplete_Corporate::create($this->lang['insert']['corporate'], 'corporate', $this->values['corporate']);
		$corporate->setMandatory();
		$fieldset->addElement($corporate);

		// credit card details
		$ccDetails = \App\Form\Input\CreditCardDetails::create($this->lang['insert']['ccDetails'], 'ccDetails', $this->values['ccDetails']);

		if ($this->controller->getAction() == 'update') {
			$ccDetails->setTooltip($this->lang['update']['numberTooltip']);
		}
		$fieldset->addElement($ccDetails);

		$form->addElement(\Engine\Form\Input\Hidden::create('', $this->submitButtonName, 1));
		return $form;
	}

}