<?php

namespace Modules\Partners\Customers;

class View_Utils_FormLock extends \App\Mvc\View_Utils_FormAbstract
{

	/**
	 * Creates the form for customer lock.
	 * @see \App\Mvc\View_Utils_FormAbstract::getForm()
	 */
	public function getForm()
	{
		// FORM FIELDS FOR LOCKING AND UNLOCKING CUSTOMERS ///////////////////////////////////////////
		$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);

		// customer 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;
	}

}
