31 lines
1.1 KiB
PHP
31 lines
1.1 KiB
PHP
<?php
|
|
|
|
class ReferenceForm extends Zend_Form
|
|
{
|
|
public function __construct($options = null)
|
|
{
|
|
parent::__construct($options);
|
|
$this->setName('Reference');
|
|
|
|
$uuid = new Zend_Form_Element_Text('uuid');
|
|
$uuid->setLabel('UUID')->setRequired(true)->addValidator('NotEmpty')
|
|
->addFilter('StripTags') ->addFilter('StringTrim');
|
|
|
|
|
|
$reference=new Zend_Form_Element_Text('reference');
|
|
$reference->setLabel('文献')
|
|
->setRequired(true)
|
|
->addFilter('StringTrim')
|
|
->addValidator('NotEmpty');
|
|
|
|
$link=new Zend_Form_Element_Text('link');
|
|
$link->setLabel('URL(optional)')
|
|
->addFilter('StringTrim');
|
|
$reftype=new Zend_Form_Element_Radio('reftype');
|
|
$reftype->setRequired(true)->setLabel('文献类型')->setMultiOptions(array('0'=>'作者文献','1'=>'用户文献'))->setValue(0);
|
|
|
|
$submit = new Zend_Form_Element_Submit('submit');
|
|
$submit->setAttrib('id', 'submitbutton')->setLabel('发送');
|
|
$this->addElements(array($uuid,$reference,$link,$reftype,$submit));
|
|
}
|
|
} |