CC-1915 playlist name no longer required in form, defaults to "Untitled Playlist"

This commit is contained in:
Naomi 2011-02-11 15:59:16 -05:00
parent 4cf5a46c67
commit 12dbdf8f4c
7 changed files with 8 additions and 11 deletions

View File

@ -120,7 +120,9 @@ class PlaylistController extends Zend_Controller_Action
$formdata = $form->getValues(); $formdata = $form->getValues();
$pl = $this->getPlaylist(); $pl = $this->getPlaylist();
$pl->setName($formdata["title"]);
if($formdata["title"])
$pl->setName($formdata["title"]);
if(isset($formdata["description"])) { if(isset($formdata["description"])) {
$pl->setPLMetaData(UI_MDATA_KEY_DESCRIPTION, $formdata["description"]); $pl->setPLMetaData(UI_MDATA_KEY_DESCRIPTION, $formdata["description"]);

View File

@ -39,6 +39,7 @@ class Application_Form_AddShowRepeats extends Zend_Form_SubForm
$this->addElement('text', 'add_show_end_date', array( $this->addElement('text', 'add_show_end_date', array(
'label' => 'Date End:', 'label' => 'Date End:',
'class' => 'input_text', 'class' => 'input_text',
'value' => date("Y-m-d"),
'required' => false, 'required' => false,
'filters' => array('StringTrim'), 'filters' => array('StringTrim'),
'validators' => array( 'validators' => array(

View File

@ -10,6 +10,7 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
'label' => 'Date Start:', 'label' => 'Date Start:',
'class' => 'input_text', 'class' => 'input_text',
'required' => true, 'required' => true,
'value' => date("Y-m-d"),
'filters' => array('StringTrim'), 'filters' => array('StringTrim'),
'validators' => array( 'validators' => array(
'NotEmpty', 'NotEmpty',

View File

@ -8,7 +8,7 @@ class Application_Form_PlaylistMetadata extends Zend_Form
// Add username element // Add username element
$this->addElement('text', 'title', array( $this->addElement('text', 'title', array(
'label' => 'Title:', 'label' => 'Title:',
'required' => true, 'required' => false,
'filters' => array('StringTrim'), 'filters' => array('StringTrim'),
'validators' => array( 'validators' => array(
'NotEmpty', 'NotEmpty',

View File

@ -340,10 +340,6 @@ function createPlaylistMetaForm(json) {
data = $("#side_playlist form").serialize(); data = $("#side_playlist form").serialize();
$.post(url, data, function(json){ $.post(url, data, function(json){
if(json.form){
}
openDiffSPL(json); openDiffSPL(json);
}) })
}); });

View File

@ -25,15 +25,12 @@ function endDpSelect(dateText, inst) {
function createDateInput(el, onSelect) { function createDateInput(el, onSelect) {
var date; var date;
el.datepicker({ el.datepicker({
minDate: new Date(), minDate: new Date(),
onSelect: onSelect, onSelect: onSelect,
dateFormat: 'yy-mm-dd' dateFormat: 'yy-mm-dd'
}); });
date = $.datepicker.formatDate("yy-mm-dd", new Date());
el.val(date);
} }
function autoSelect(event, ui) { function autoSelect(event, ui) {

View File

@ -124,7 +124,7 @@ function viewDisplay( view ) {
opt.defaultView = view.name; opt.defaultView = view.name;
$(calendarEl).fullCalendar('destroy'); $(calendarEl).fullCalendar('destroy');
$(calendarEl).fullCalendar(opt); $(calendarEl).fullCalendar(opt);
$(calendarEl).fullCalendar( 'gotoDate', d ) $(calendarEl).fullCalendar( 'gotoDate', d );
}); });
var x = $(view.element).find(".fc-agenda-head th:first"); var x = $(view.element).find(".fc-agenda-head th:first");