2013-07-09 00:00:02 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class Application_Form_EditHistoryFile extends Zend_Form
|
|
|
|
{
|
|
|
|
public function init() {
|
2013-07-18 07:31:20 +02:00
|
|
|
|
2013-07-09 00:00:02 +02:00
|
|
|
/*
|
|
|
|
$this->setDecorators(
|
|
|
|
array(
|
|
|
|
array('ViewScript', array('viewScript' => 'form/edit-history-file.phtml'))
|
|
|
|
)
|
|
|
|
);
|
|
|
|
*/
|
2013-07-18 07:31:20 +02:00
|
|
|
|
2013-07-09 00:00:02 +02:00
|
|
|
$this->setMethod('post');
|
2013-07-18 07:31:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
$file_id = new Zend_Form_Element_Hidden('his_file_id');
|
2013-07-18 07:37:39 +02:00
|
|
|
$file_id->setValidators(array(
|
|
|
|
new Zend_Validate_Int()
|
2013-07-18 07:31:20 +02:00
|
|
|
));
|
|
|
|
$this->addElement($file_id);
|
|
|
|
|
|
|
|
|
2013-07-09 00:00:02 +02:00
|
|
|
/* Title form element */
|
|
|
|
$title = new Zend_Form_Element_Text('his_file_title');
|
|
|
|
$title->setLabel(_('Title:'));
|
|
|
|
$title->setAttrib('class', 'input_text');
|
|
|
|
$title->addFilter('StringTrim');
|
|
|
|
//$title->setDecorators(array('viewHelper'));
|
|
|
|
$this->addElement($title);
|
2013-07-18 07:31:20 +02:00
|
|
|
|
2013-07-09 00:00:02 +02:00
|
|
|
/* Creator form element */
|
|
|
|
$creator = new Zend_Form_Element_Text('his_file_creator');
|
|
|
|
$creator->setLabel(_('Creator:'));
|
|
|
|
$creator->setAttrib('class', 'input_text');
|
|
|
|
$creator->addFilter('StringTrim');
|
|
|
|
//$creator->setDecorators(array('viewHelper'));
|
|
|
|
$this->addElement($creator);
|
2013-07-18 07:31:20 +02:00
|
|
|
|
2013-07-09 00:00:02 +02:00
|
|
|
/* Composer form element */
|
|
|
|
$composer = new Zend_Form_Element_Text('his_file_composer');
|
|
|
|
$composer->setLabel(_('Composer:'));
|
|
|
|
$composer->setAttrib('class', 'input_text');
|
|
|
|
$composer->addFilter('StringTrim');
|
|
|
|
//$composer->setDecorators(array('viewHelper'));
|
|
|
|
$this->addElement($composer);
|
2013-07-18 07:31:20 +02:00
|
|
|
|
2013-07-09 00:00:02 +02:00
|
|
|
/* Copyright form element */
|
|
|
|
$copyright = new Zend_Form_Element_Text('his_file_copyright');
|
|
|
|
$copyright->setLabel(_('Copyright:'));
|
|
|
|
$copyright->setAttrib('class', 'input_text');
|
|
|
|
$copyright->addFilter('StringTrim');
|
|
|
|
//$copyright->setDecorators(array('viewHelper'));
|
|
|
|
$this->addElement($copyright);
|
2013-07-18 07:31:20 +02:00
|
|
|
|
2013-07-09 00:00:02 +02:00
|
|
|
// Add the submit button
|
|
|
|
$this->addElement('button', 'his_file_save', array(
|
|
|
|
'ignore' => true,
|
2013-07-18 07:31:20 +02:00
|
|
|
'class' => 'btn his_file_save',
|
2013-07-09 00:00:02 +02:00
|
|
|
'label' => _('Save'),
|
|
|
|
'decorators' => array(
|
|
|
|
'ViewHelper'
|
|
|
|
)
|
|
|
|
));
|
2013-07-18 07:31:20 +02:00
|
|
|
|
2013-07-09 00:00:02 +02:00
|
|
|
// Add the cancel button
|
|
|
|
$this->addElement('button', 'his_file_cancel', array(
|
|
|
|
'ignore' => true,
|
2013-07-18 07:31:20 +02:00
|
|
|
'class' => 'btn his_file_cancel',
|
2013-07-09 00:00:02 +02:00
|
|
|
'label' => _('Cancel'),
|
|
|
|
'decorators' => array(
|
|
|
|
'ViewHelper'
|
|
|
|
)
|
|
|
|
));
|
2013-07-18 07:31:20 +02:00
|
|
|
|
2013-07-09 00:00:02 +02:00
|
|
|
$this->addDisplayGroup(
|
|
|
|
array(
|
2013-07-18 07:31:20 +02:00
|
|
|
'his_file_save',
|
2013-07-09 00:00:02 +02:00
|
|
|
'his_file_cancel'
|
2013-07-18 07:31:20 +02:00
|
|
|
),
|
|
|
|
'submitButtons',
|
2013-07-09 00:00:02 +02:00
|
|
|
array(
|
|
|
|
'decorators' => array(
|
|
|
|
'FormElements',
|
|
|
|
'DtDdWrapper'
|
|
|
|
)
|
|
|
|
)
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|