Ejemplo n.º 1
0
 public function init()
 {
     $this->setName('frmConfiguration');
     $model = new Security_Model_SysConfig();
     $arrLogs = $model->getConfigs();
     $this->addElement('select', 'parentConfigId', array('label' => 'Parent Config Id:', 'required' => false, 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim'), 'MultiOptions' => $arrLogs));
     $this->addElement('text', 'configName', array('label' => 'Config Name:', 'autocomplete' => "off", 'required' => true, 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'You must enter Configuration Name')))), 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim')));
     $this->addElement('textarea', 'configDesc', array('label' => 'Config Desc:', 'autocomplete' => "off", 'rows' => 5, 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'Please Enter Config Description.')))), 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim')));
     $this->addElement('text', 'param1', array('label' => 'Param1:', 'autocomplete' => "off", 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim')));
     $this->addElement('text', 'param2', array('label' => 'Param2:', 'autocomplete' => "off", 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim')));
     $this->addElement('text', 'param3', array('label' => 'Param3:', 'autocomplete' => "off", 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim')));
     $this->addElement('text', 'param4', array('label' => 'Param4:', 'autocomplete' => "off", 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim')));
     $this->addElement('text', 'param5', array('label' => 'Param5:', 'autocomplete' => "off", 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim')));
     $this->addElement('submit', 'submit', array('required' => false, 'class' => 'button', 'ignore' => true, 'label' => 'Submit', 'value' => 'submit', 'decorators' => $this->buttonDecorators));
 }
Ejemplo n.º 2
0
 public function init()
 {
     $this->setName('frmDbConfig');
     $model = new Security_Model_SysConfig();
     $configArray = $model->getConfigs();
     $this->addElement('select', 'configId', array('label' => 'Config Field:', 'autocomplete' => "off", 'class' => 'text-input medium-input', 'required' => true, 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'Select Config Id')))), 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim'), 'MultiOptions' => $configArray));
     $this->addElement('text', 'dbServerName', array('label' => 'Server Name :', 'autocomplete' => "off", 'required' => true, 'class' => 'text-input medium-input', 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim'), 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'You must enter database server name'))))));
     // Add an first name element
     $this->addElement('text', 'dbServerPort', array('label' => 'Server Port:', 'class' => 'text-input medium-input', 'required' => true, 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'You must enter databse server port')))), 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim')));
     // Add an last name element
     $this->addElement('text', 'dbName', array('label' => 'Database Name:', 'class' => 'text-input medium-input', 'required' => true, 'decorators' => $this->elementDecorators, 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'You must enter databse name name')))), 'filters' => array('StringTrim')));
     $this->addElement('text', 'dbUser', array('label' => 'DB Username:'******'required' => true, 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'You must enter database user')))), 'class' => 'text-input medium-input', 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim')));
     $this->addElement('text', 'dbPassword', array('label' => 'DB Password:'******'required' => true, 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'Please enter databse password')))), 'class' => 'text-input medium-input', 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim')));
     $this->addElement('select', 'dbTransType', array('label' => 'Transection Type:', 'class' => 'text-input small-input', 'required' => true, 'decorators' => $this->elementDecorators, 'MultiOptions' => array('0' => "select", '1' => "Insert", '2' => "Update", '3' => "Delete"), 'value' => "select"));
     $this->addElement('select', 'status', array('label' => 'Status:', 'class' => 'text-input medium-input', 'decorators' => $this->elementDecorators, 'required' => false, 'MultiOptions' => array('0' => "Inactive", '1' => "Active")));
     $this->addElement('submit', 'submit', array('required' => false, 'class' => 'button', 'ignore' => true, 'label' => 'Submit', 'value' => 'submit', 'decorators' => $this->buttonDecorators));
 }