| 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_Board extends Zend_Form
{
public function __construct($params = null)
{
$this->setMethod("POST");
$this->setAction("admin/board/add");
$this->setName("add_board");
/************ Id *****************/
$id = $this->createElement('hidden','id',
array(
'value' => '',
'class' => 'input-xlarge',
'id' => 'id',
'required'=>false,
'filters' => array('StringTrim'),
//'validators' => array(array('StringLength', false, array(3, 100))),
))
->setErrorMessages(array('Please enter id'))
->removeDecorator('label')
->removeDecorator('HtmlTag')
->removeDecorator('DtDdWrapper');
/************ Board Type *****************/
$dataBoard = array();
$dataBoard[""]="--Select Type--";
$dataBoardarr = array('board-of-directors'=>'Board of Directors','our-team'=>'Our Team');
$board_type = $this->createElement('select', 'board_type');
foreach ($dataBoardarr as $key=>$val) {
$dataBoard[$key] = $val;
}
$board_type->setRequired(true);
$board_type->setMultiOptions($dataBoard);
$board_type->setErrorMessages(array('Please select status'));
$board_type->removeDecorator('label');
$board_type->removeDecorator('HtmlTag');
$board_type->class = "input-xlarge";
/************ Name *****************/
$name = $this->createElement('text','name',
array(
'value' => trim($params['name']),
'class' => 'input-xlarge',
'id' => 'name',
'required'=>true,
'filters' => array('StringTrim'),
//'validators' => array(array('StringLength', false, array(3, 100))),
))
->setErrorMessages(array('Please enter name'))
->removeDecorator('label')
->removeDecorator('HtmlTag')
->removeDecorator('DtDdWrapper');
/************ Designation *****************/
$designation = $this->createElement('text','designation',
array(
'value' => trim($params['designation']),
'class' => 'input-xlarge',
'id' => 'designation',
'required'=>FALSE,
'filters' => array('StringTrim'),
//'validators' => array(array('StringLength', false, array(3, 100))),
))
->setErrorMessages(array('Please enter designation'))
->removeDecorator('label')
->removeDecorator('HtmlTag')
->removeDecorator('DtDdWrapper');
/************ Profile Image *****************/
$profile_image = $this->createElement('file','profile_image',
array(
'required' => false,
'MaxFileSize' => 100000,
'autocomplete' => 'off',
'class' => 'input-xlarge',
'id' => 'profile_image',
'validators' => array(
array('Count', false, 1),
array('Size', false, 100000),
array('Extension', false, 'gif,jpg,png'),
array('ImageSize', false,
array('minwidth' => 82,
'minheight' => 82,
'maxwidth' => 90,
'maxheight' => 90)),
)
))
->setErrorMessages(array('Please upload (gif, jpg and png) file'))
->removeDecorator('label')
->removeDecorator('HtmlTag')
->removeDecorator('DtDdWrapper');
/************ Profile Description *****************/
$profile_details = $this->createElement('textarea','profile_details',
array(
'required' => true,
'autocomplete' => 'off',
'class' => 'fckeditor',
'id' => 'profile_details',
'filters' => array('StringTrim'),
))
->setErrorMessages(array('Please enter user details'))
->removeDecorator('label')
->removeDecorator('HtmlTag')
->removeDecorator('DtDdWrapper');
/************ OrderOfAppearance *****************/
$OrderOfAppearance = array();
$OrderOfAppearanceStatus[""]="--Select Order--";
$OrderOfAppearance = $this->createElement('select', 'orderOfAppearance');
for($i=1;$i<=50;$i++) {
$OrderOfAppearanceStatus[$i] = $i;
}
$OrderOfAppearance->setRequired(true);
$OrderOfAppearance->setMultiOptions($OrderOfAppearanceStatus);
$OrderOfAppearance->setErrorMessages(array('Please select order of appearance'));
$OrderOfAppearance->removeDecorator('label');
$OrderOfAppearance->removeDecorator('HtmlTag');
$OrderOfAppearance->class = "input-xlarge";
/************ Status *****************/
$dataStatus = array();
$dataStatus[""]="--Select Status--";
$dataMenuarr = array('Activate'=>'Activate','Deactivate'=>'Deactivate');
$status = $this->createElement('select', 'status');
foreach ($dataMenuarr as $key=>$val) {
$dataStatus[$key] = $val;
}
$status->setRequired(true);
$status->setMultiOptions($dataStatus);
$status->setErrorMessages(array('Please select status'));
$status->removeDecorator('label');
$status->removeDecorator('HtmlTag');
$status->class = "input-xlarge";
$this->addElements(array(
$id,
$board_type,
$name,
$designation,
$profile_image,
$profile_details,
$OrderOfAppearance,
$status
));
}
}