Example #1
0
 public function init()
 {
     $this->setName('frmBookUser');
     $model = new Application_Model_User();
     $users = $model->getAllUsers("active");
     $this->addElement('select', 'userId', array('label' => 'Employee:', 'style' => 'width:193px', 'class' => 'text-input small-input', 'required' => true, 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'Please select user.')))), 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim'), 'MultiOptions' => $users));
     $this->addElement('text', 'issueDate', array('label' => 'Issue Date:', 'required' => true, 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'Please enter issue date')))), 'class' => 'text-input medium-input', 'readonly' => 'true', 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim')));
     $this->addElement('text', 'estimatedReturnDate', array('label' => 'Estimated Return Date:', 'required' => true, 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'Please enter estimated return date')))), 'class' => 'text-input medium-input', 'readonly' => 'true', 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim')));
     $this->addElement('text', 'returnDate', array('label' => 'Return Date:', 'required' => true, 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'Please enter return date')))), 'class' => 'text-input medium-input', 'readonly' => 'true', 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim')));
     $this->addElement('submit', 'submit', array('required' => false, 'class' => 'button', 'ignore' => true, 'label' => 'Submit', 'value' => 'submit', 'decorators' => $this->buttonDecorators));
 }
Example #2
0
 public function init()
 {
     $this->setName('frmDepartment');
     $this->addElement('text', 'title', array('label' => 'Department Title:', 'autocomplete' => "off", 'class' => 'text-input medium-input', 'required' => true, 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'You must enter designation title'))), array('Db_NoRecordExists', true, array('table' => 'department', 'field' => 'title', 'messages' => 'department title already exists'))), 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim')));
     $this->addElement('select', 'type', array('label' => 'Type:', 'style' => 'width:193px', 'class' => 'text-input small-input', 'required' => true, 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'Please select department type.')))), 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim'), 'MultiOptions' => array("normal" => "Normal", "operations" => "Operations")));
     $arrUser = array();
     $user = new Application_Model_User();
     $arrUser = $user->getAllUsers("active");
     //$arrUser=array_merge(array(''=>'Select'),$arrUser);
     $this->addElement('select', 'departmentHeadId', array('label' => 'Department Head:', 'style' => 'width:193px', 'class' => 'text-input medium-input', 'required' => true, 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'Please select department head.')))), 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim'), 'MultiOptions' => $arrUser));
     $this->addElement('submit', 'submit', array('required' => false, 'class' => 'button', 'ignore' => true, 'label' => 'Submit', 'value' => 'submit', 'decorators' => $this->buttonDecorators));
 }
Example #3
0
 public function init()
 {
     $model = new Application_Model_User();
     $arr = $model->getAllUsers();
     $arr = array_merge(array('' => 'Select'), $arr);
     $this->addElement('select', 'userId', array('label' => 'Employee:', 'class' => 'text-input small-input', 'required' => true, 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'Please select employee')))), 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim'), 'MultiOptions' => $arr));
     $model = new Application_Model_AppriciationType();
     $arr = $model->getAppriciationType();
     //$arr=array_merge(array(''=>'Select'),$arr);
     $this->addElement('select', 'appriciationTypeId', array('label' => 'Appriciation Type:', 'class' => 'text-input small-input', 'required' => true, 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'Please select type')))), 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim'), 'MultiOptions' => $arr));
     $this->addElement('text', 'appriciationDate', array('label' => 'Date:', 'required' => true, 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'Please enter date')))), 'class' => 'text-input small-input', 'readonly' => 'true', 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim')));
     $this->addElement('textarea', 'remarks', array('label' => 'Remarks:', 'class' => 'text-input textarea address', 'required' => true, 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'Please enter remarks.')))), 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim')));
     $this->addElement('submit', 'submit', array('required' => false, 'class' => 'button', 'ignore' => true, 'label' => 'Submit', 'value' => 'submit', 'decorators' => $this->buttonDecorators));
 }
Example #4
0
 public function init()
 {
     $this->setName('frmProject');
     $this->addElement('text', 'title', array('label' => 'Project Title:', 'autocomplete' => "off", 'class' => 'text-input medium-input', 'required' => true, 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'You must enter project title')))), 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim')));
     $this->addElement('textarea', 'description', array('label' => 'Description:', 'class' => 'text-input textarea address', 'required' => false, 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim')));
     $this->addElement('textarea', 'clientInfo', array('label' => 'Client Info.:', 'class' => 'text-input textarea address', 'required' => false, 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim')));
     $this->addElement('text', 'startDate', array('label' => 'Start Date:', 'required' => true, 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'Please enter start date')))), 'class' => 'text-input small-input', 'readonly' => 'true', 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim')));
     $this->addElement('text', 'endDate', array('label' => 'End Date:', 'required' => false, 'class' => 'text-input small-input', 'readonly' => 'true', 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim')));
     $this->addElement('select', 'status', array('label' => 'Status:', 'class' => 'text-input small-input', 'required' => true, 'decorators' => $this->elementDecorators, 'MultiOptions' => array('open' => "Open", 'close' => "Close"), 'value' => "open"));
     $user = new Application_Model_User();
     $arrUser = $user->getAllUsers('active');
     $this->addElement('select', 'projectManagerId', array('label' => 'Project Manager:', 'class' => 'text-input small-input', 'required' => false, 'decorators' => $this->elementDecorators, 'MultiOptions' => $arrUser));
     $this->addElement('select', 'teamLeaderId', array('label' => 'Team Leader:', 'class' => 'text-input small-input', 'required' => false, 'decorators' => $this->elementDecorators, 'MultiOptions' => $arrUser));
     $this->addElement('select', 'resource', array('label' => 'Resource:', 'class' => 'text-input small-input', 'required' => false, 'decorators' => $this->elementDecorators, 'MultiOptions' => $arrUser));
     $this->addElement('submit', 'submit', array('required' => false, 'class' => 'button', 'ignore' => true, 'label' => 'Submit', 'value' => 'submit', 'decorators' => $this->buttonDecorators));
 }