CC-1917 file meta data screen
This commit is contained in:
parent
2f796f3d9c
commit
9a7dda49fe
2 changed files with 24 additions and 17 deletions
|
@ -9,9 +9,10 @@ class Application_Form_EditAudioMD extends Zend_Form
|
||||||
$this->setMethod('post');
|
$this->setMethod('post');
|
||||||
|
|
||||||
// Add title field
|
// Add title field
|
||||||
$this->addElement('text', 'track_title', array(
|
$this->addElement('text', 'dc:title', array(
|
||||||
'label' => 'Title:',
|
'label' => 'Title:',
|
||||||
'required' => true,
|
'required' => true,
|
||||||
|
'class' => 'input_text',
|
||||||
'filters' => array('StringTrim'),
|
'filters' => array('StringTrim'),
|
||||||
'validators' => array(
|
'validators' => array(
|
||||||
'NotEmpty',
|
'NotEmpty',
|
||||||
|
@ -19,70 +20,74 @@ class Application_Form_EditAudioMD extends Zend_Form
|
||||||
));
|
));
|
||||||
|
|
||||||
// Add artist field
|
// Add artist field
|
||||||
$this->addElement('text', 'artist_name', array(
|
$this->addElement('text', 'dc:creator', array(
|
||||||
'label' => 'Artist:',
|
'label' => 'Artist:',
|
||||||
'required' => true,
|
'required' => true,
|
||||||
|
'class' => 'input_text',
|
||||||
'filters' => array('StringTrim'),
|
'filters' => array('StringTrim'),
|
||||||
'validators' => array(
|
'validators' => array(
|
||||||
'NotEmpty',
|
'NotEmpty',
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
|
|
||||||
// Add bitrate field
|
|
||||||
// $this->addElement('text', 'bit_rate', array(
|
|
||||||
// 'label' => 'Bitrate:',
|
|
||||||
// 'attribs' => array('disabled' => 'disabled')
|
|
||||||
//));
|
|
||||||
|
|
||||||
// Add album field
|
// Add album field
|
||||||
$this->addElement('text', 'album_title', array(
|
$this->addElement('text', 'dc:source', array(
|
||||||
'label' => 'Album:',
|
'label' => 'Album:',
|
||||||
|
'class' => 'input_text',
|
||||||
'filters' => array('StringTrim')
|
'filters' => array('StringTrim')
|
||||||
));
|
));
|
||||||
|
|
||||||
// Add genre field
|
// Add genre field
|
||||||
$this->addElement('text', 'genre', array(
|
$this->addElement('text', 'genre', array(
|
||||||
'label' => 'Genre:',
|
'label' => 'Genre:',
|
||||||
|
'class' => 'input_text',
|
||||||
'filters' => array('StringTrim')
|
'filters' => array('StringTrim')
|
||||||
));
|
));
|
||||||
|
|
||||||
// Add year field
|
// Add year field
|
||||||
$this->addElement('text', 'year', array(
|
$this->addElement('text', 'ls:year', array(
|
||||||
'label' => 'Year:',
|
'label' => 'Year:',
|
||||||
|
'class' => 'input_text',
|
||||||
'filters' => array('StringTrim'),
|
'filters' => array('StringTrim'),
|
||||||
'validators' => array(
|
'validators' => array(
|
||||||
array('date', false, array('YYYY-MM-DD')),
|
array('date', false, array('YYYY-MM-DD')),
|
||||||
|
array('date', false, array('YYYY-MM')),
|
||||||
array('date', false, array('YYYY'))
|
array('date', false, array('YYYY'))
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
|
|
||||||
// Add label field
|
// Add label field
|
||||||
$this->addElement('text', 'label', array(
|
$this->addElement('text', 'dc:publisher', array(
|
||||||
'label' => 'Label:',
|
'label' => 'Label:',
|
||||||
|
'class' => 'input_text',
|
||||||
'filters' => array('StringTrim')
|
'filters' => array('StringTrim')
|
||||||
));
|
));
|
||||||
|
|
||||||
// Add composer field
|
// Add composer field
|
||||||
$this->addElement('text', 'composer', array(
|
$this->addElement('text', 'ls:composer', array(
|
||||||
'label' => 'Composer:',
|
'label' => 'Composer:',
|
||||||
|
'class' => 'input_text',
|
||||||
'filters' => array('StringTrim')
|
'filters' => array('StringTrim')
|
||||||
));
|
));
|
||||||
|
|
||||||
// Add mood field
|
// Add mood field
|
||||||
$this->addElement('text', 'mood', array(
|
$this->addElement('text', 'ls:mood', array(
|
||||||
'label' => 'Mood:',
|
'label' => 'Mood:',
|
||||||
|
'class' => 'input_text',
|
||||||
'filters' => array('StringTrim')
|
'filters' => array('StringTrim')
|
||||||
));
|
));
|
||||||
|
|
||||||
// Add language field
|
// Add language field
|
||||||
$this->addElement('text', 'language', array(
|
$this->addElement('text', 'dc:language', array(
|
||||||
'label' => 'Language:',
|
'label' => 'Language:',
|
||||||
|
'class' => 'input_text',
|
||||||
'filters' => array('StringTrim')
|
'filters' => array('StringTrim')
|
||||||
));
|
));
|
||||||
|
|
||||||
// Add the submit button
|
// Add the submit button
|
||||||
$this->addElement('submit', 'submit', array(
|
$this->addElement('submit', 'submit', array(
|
||||||
'ignore' => true,
|
'ignore' => true,
|
||||||
|
'class' => 'ui-button ui-state-default',
|
||||||
'label' => 'Submit',
|
'label' => 'Submit',
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
<?php
|
<div class="ui-widget ui-widget-content block-shadow simple-formblock clearfix padded-strong">
|
||||||
|
<h2>Edit Metadata</h2>
|
||||||
|
|
||||||
$this->form->setAction($this->url());
|
<?php $this->form->setAction($this->url());
|
||||||
echo $this->form;
|
echo $this->form; ?>
|
||||||
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue