Merge branch '1.9.1' into devel
This commit is contained in:
commit
c460519a88
5 changed files with 16 additions and 10 deletions
|
@ -178,9 +178,10 @@ class LibraryController extends Zend_Controller_Action
|
|||
{
|
||||
$request = $this->getRequest();
|
||||
$form = new Application_Form_EditAudioMD();
|
||||
|
||||
|
||||
$file_id = $this->_getParam('id', null);
|
||||
$file = StoredFile::Recall($file_id);
|
||||
$form->populate($file->getDbColMetadata());
|
||||
|
||||
if ($request->isPost()) {
|
||||
if ($form->isValid($request->getPost())) {
|
||||
|
@ -196,7 +197,6 @@ class LibraryController extends Zend_Controller_Action
|
|||
}
|
||||
}
|
||||
|
||||
$form->populate($file->getDbColMetadata());
|
||||
$this->view->form = $form;
|
||||
}
|
||||
|
||||
|
|
|
@ -29,21 +29,15 @@ class Application_Form_EditAudioMD extends Zend_Form
|
|||
// Add title field
|
||||
$this->addElement('text', 'track_title', array(
|
||||
'label' => 'Title:',
|
||||
'required' => true,
|
||||
'class' => 'input_text',
|
||||
'filters' => array('StringTrim'),
|
||||
'validators' => array(
|
||||
'NotEmpty',
|
||||
)
|
||||
));
|
||||
|
||||
// Add artist field
|
||||
$this->addElement('text', 'artist_name', array(
|
||||
'label' => 'Artist:',
|
||||
'required' => true,
|
||||
'class' => 'input_text',
|
||||
'filters' => array('StringTrim'),
|
||||
'validators' => array('NotEmpty')
|
||||
));
|
||||
|
||||
// Add album field
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue