<?php
namespace Modules\Admin\Config\Documents\Email;

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()
	{
		// load globals
		$_LANG = \App\Loader_Lang::getInstance()->getGlobal();

		$form = \Engine\Form\General::create();
		$form->setStyle('width', '600');

		$fieldset = \Engine\Form\Container\Fieldset::create($this->lang['index']['formFields']['docEmail_fieldsetLabel']);
		$form->addContainer($fieldset);

		// order email subject
		$docEmail_order_defaultSubject = new \Engine\Form\Input\Text($this->lang['index']['formFields']['docEmail_order_defaultSubject'], 'order[subject]', $this->values['order']['subject']);
		$fieldset->addElement($docEmail_order_defaultSubject);

		// order email body
		$docEmail_order_defaultBody = new \App\Form\Input\HtmlArea($this->lang['index']['formFields']['docEmail_order_defaultBody'], 'order[body]', $this->values['order']['body']);
		$docEmail_order_defaultBody->setHeight('100');
		$fieldset->addElement($docEmail_order_defaultBody);

		// service email subject
		$docEmail_service_defaultSubject = new \Engine\Form\Input\Text($this->lang['index']['formFields']['docEmail_service_defaultSubject'], 'service[subject]', $this->values['service']['subject']);
		$fieldset->addElement($docEmail_service_defaultSubject);

		// service email body
		$docEmail_service_defaultBody = new \App\Form\Input\HtmlArea($this->lang['index']['formFields']['docEmail_service_defaultBody'], 'service[body]', $this->values['service']['body']);
		$docEmail_service_defaultBody->setHeight('100');
		$fieldset->addElement($docEmail_service_defaultBody);

		// invoice email subject
		$docEmail_invoice_defaultSubject = new \Engine\Form\Input\Text($this->lang['index']['formFields']['docEmail_invoice_defaultSubject'], 'invoice[subject]', $this->values['invoice']['subject']);
		$fieldset->addElement($docEmail_invoice_defaultSubject);

		// invoice email body
		$docEmail_invoice_defaultBody = new \App\Form\Input\HtmlArea($this->lang['index']['formFields']['docEmail_invoice_defaultBody'], 'invoice[body]', $this->values['invoice']['body']);
		$docEmail_invoice_defaultBody->setHeight('100');
		$fieldset->addElement($docEmail_invoice_defaultBody);

		// cashing email subject
		$docEmail_cashing_defaultSubject = new \Engine\Form\Input\Text($this->lang['index']['formFields']['docEmail_cashing_defaultSubject'], 'cashing[subject]', $this->values['cashing']['subject']);
		$fieldset->addElement($docEmail_cashing_defaultSubject);

		// cashing email body
		$docEmail_cashing_defaultBody = new \App\Form\Input\HtmlArea($this->lang['index']['formFields']['docEmail_cashing_defaultBody'], 'cashing[body]', $this->values['cashing']['body']);
		$docEmail_cashing_defaultBody->setHeight('100');
		$fieldset->addElement($docEmail_cashing_defaultBody);

		// payment email subject
		$docEmail_payment_defaultSubject = new \Engine\Form\Input\Text($this->lang['index']['formFields']['docEmail_payment_defaultSubject'], 'payment[subject]', $this->values['payment']['subject']);
		$fieldset->addElement($docEmail_payment_defaultSubject);

		// payment email body
		$docEmail_payment_defaultBody = new \App\Form\Input\HtmlArea($this->lang['index']['formFields']['docEmail_payment_defaultBody'], 'payment[body]', $this->values['payment']['body']);
		$docEmail_payment_defaultBody->setHeight('100');
		$fieldset->addElement($docEmail_payment_defaultBody);

		// cashbook email subject
		$docEmail_cashBookDoc_defaultSubject = new \Engine\Form\Input\Text($this->lang['index']['formFields']['docEmail_cashBookDoc_defaultSubject'], 'cashBookDoc[subject]', $this->values['cashBookDoc']['subject']);
		$fieldset->addElement($docEmail_cashBookDoc_defaultSubject);

		// cashbook email body
		$docEmail_cashBookDoc_defaultBody = new \App\Form\Input\HtmlArea($this->lang['index']['formFields']['docEmail_cashBookDoc_defaultBody'], 'cashBookDoc[body]', $this->values['cashBookDoc']['body']);
		$docEmail_cashBookDoc_defaultBody->setHeight('100');
		$fieldset->addElement($docEmail_cashBookDoc_defaultBody);

		// imported service email subject
		$docEmail_importedService_defaultSubject = new \Engine\Form\Input\Text($this->lang['index']['formFields']['docEmail_importedService_defaultSubject'], 'importedService[subject]', $this->values['importedService']['subject']);
		$fieldset->addElement($docEmail_importedService_defaultSubject);

		// imported service email body
		$docEmail_importedService_defaultBody = new \App\Form\Input\HtmlArea($this->lang['index']['formFields']['docEmail_importedService_defaultBody'], 'importedService[body]', $this->values['importedService']['body']);
		$docEmail_importedService_defaultBody->setHeight('100');
		$fieldset->addElement($docEmail_importedService_defaultBody);

		// imported document email subject
		$docEmail_importedDocument_defaultSubject = new \Engine\Form\Input\Text($this->lang['index']['formFields']['docEmail_importedDocument_defaultSubject'], 'importedDocument[subject]', $this->values['importedDocument']['subject']);
		$fieldset->addElement($docEmail_importedDocument_defaultSubject);

		// imported document email body
		$docEmail_importedDocument_defaultBody = new \App\Form\Input\HtmlArea($this->lang['index']['formFields']['docEmail_importedDocument_defaultBody'], 'importedDocument[body]', $this->values['importedDocument']['body']);
		$fieldset->addElement($docEmail_importedDocument_defaultBody);

		// balance email subject
		$docEmail_balance_defaultSubject = new \Engine\Form\Input\Text($this->lang['index']['formFields']['docEmail_balance_defaultSubject'], 'balance[subject]', $this->values['balance']['subject']);
		$fieldset->addElement($docEmail_balance_defaultSubject);

		// balance email body
		$docEmail_balance_defaultBody = new \App\Form\Input\HtmlArea($this->lang['index']['formFields']['docEmail_balance_defaultBody'], 'balance[body]', $this->values['balance']['body']);
		$fieldset->addElement($docEmail_balance_defaultBody);

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

		// submit button
		$form->addButton(new \Engine\Form\Button\Submit($_LANG['save']));

		return $form;
	}

}
