2010-01-05 15:12:07 +00:00
|
|
|
<?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');
|
2012-05-19 13:55:50 +00:00
|
|
|
$reftype=new Zend_Form_Element_Radio('reftype');
|
2013-05-24 01:40:14 +00:00
|
|
|
$reftype->setRequired(true)->setLabel('文献类型')->setMultiOptions(array('0'=>'作者文献','1'=>'用户文献','2'=>'数据的参考文献'))->setValue(0);
|
2010-01-05 15:12:07 +00:00
|
|
|
|
|
|
|
$submit = new Zend_Form_Element_Submit('submit');
|
|
|
|
$submit->setAttrib('id', 'submitbutton')->setLabel('发送');
|
2012-05-19 13:55:50 +00:00
|
|
|
$this->addElements(array($uuid,$reference,$link,$reftype,$submit));
|
2010-01-05 15:12:07 +00:00
|
|
|
}
|
|
|
|
}
|