示例#1
0
 public function prepareElements()
 {
     $translator = Utility::translate();
     $this->add(array('name' => 'id', 'attributes' => array('type' => 'hidden')));
     $supArray = Utility::getPaymentCategoryArray();
     $this->add(array('type' => 'Zend\\Form\\Element\\Select', 'attributes' => array(), 'name' => 'categoryId', 'options' => array('label' => $translator->translate('Category'), 'value_options' => $supArray, 'selected' => true)));
     $this->add(array('name' => 'title', 'options' => array('label' => $translator->translate('Title')), 'attributes' => array('type' => 'text', 'class' => 'input-xlarge')));
     $this->add(array('name' => 'value', 'options' => array('label' => $translator->translate('Value')), 'attributes' => array('type' => 'text', 'class' => 'input-xlarge')));
     $this->add(array('name' => 'reason', 'options' => array('label' => $translator->translate('Reason')), 'attributes' => array('type' => 'textarea', 'class' => 'input-xlarge jqueryte')));
     $this->add(array('name' => 'time', 'attributes' => array('type' => 'text', 'class' => 'input-xlarge date-picker')));
     $this->add(array('name' => 'submit', 'attributes' => array('type' => 'submit', 'value' => 'Go', 'id' => 'submitbutton', 'class' => 'btn btn-danger')));
 }