<?php

namespace Modules\Partners\Corporates;

class View_Utils_FormLock extends \App\Mvc\View_Utils_FormAbstract
{

	/**
	 * Creates the form for corporate lock/unlock.
	 * @see \App\Mvc\View_Utils_FormAbstract::getForm()
	 */
	public function getForm()
	{
		// FORM FIELDS FOR LOCKING AND UNLOCKING CORPORATES ///////////////////////////////////////////
		$form = \Engine\Form\General::create();
		$form->addContainer(\Engine\Form\Container\Fieldset::create($this->lang['formFieldCat']['locked']));
		$form->setStyle('width', 300)->setStyle('labelWidth', 25);

		// the lock comments field
		$fld_lockComments = new \Engine\Form\Input\Textarea($this->lang['formFields']['lockedComments'], 'lockedComments', $this->values['lockedComments']);
		$fld_lockComments->setMandatory();
		$form->addElement($fld_lockComments);

		// corporate id
		$form->addElement(new \Engine\Form\Input\Hidden('', 'id', $this->values['id']));

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

		return $form;
	}

}
