| Server IP : 103.234.187.230 / Your IP : 216.73.216.216 Web Server : Apache System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64 User : apache ( 48) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/ptcfinance/application/modules/admin/forms/ |
Upload File : |
<?php
class Admin_Form_State extends Zend_Form
{
public function __construct($params = null)
{
$siteurl = Catabatic_Helper::getSiteUrl();
$this->setMethod("POST");
$this->setAction($siteurl."admin/state/add");
$this->setName("add_state");
$id = $this->createElement('hidden','id',
array(
'value' => '',
'class' => 'input-xlarge',
'id' => 'level',
'required'=>false,
'filters' => array('StringTrim'),
//'validators' => array(array('StringLength', false, array(3, 100))),
))
->removeDecorator('label')
->removeDecorator('HtmlTag')
->removeDecorator('DtDdWrapper');
/************ state *****************/
$state_name = $this->createElement('text','state_name',
array(
'value' => trim($params['state_name']),
'class' => 'input-xlarge',
'id' => 'state_name',
'required'=>true,
'filters' => array('StringTrim'),
//'validators' => array(array('StringLength', false, array(3, 100))),
))
->setErrorMessages(array('Please enter state'))
->removeDecorator('label')
->removeDecorator('HtmlTag')
->removeDecorator('DtDdWrapper');
/************ Status *****************/
$dataMenu = array();
$dataMenu[""]="--Select--";
$dataMenuarr = array('Activate'=>'Activate','Deactivate'=>'Deactivate');
$status = $this->createElement('select', 'status');
foreach ($dataMenuarr as $key=>$val) {
$dataMenu[$key] = $val;
}
$status->setRequired(true);
$status->setMultiOptions($dataMenu);
$status->setErrorMessages(array('Please select status'));
$status->removeDecorator('label');
$status->removeDecorator('HtmlTag');
$status->class = "select-xlarge";
$this->addElements(array(
$id,
$state_name,
$status
));
}
}