CC-4285: Playlists-> Smart Block - displays that certain amount meets the criteria while no criteria is specified
-fixed
This commit is contained in:
parent
f84f611ab2
commit
69b61c4cfe
3 changed files with 45 additions and 34 deletions
|
@ -88,7 +88,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
|
|||
|
||||
}
|
||||
|
||||
public function startForm($p_blockId)
|
||||
public function startForm($p_blockId, $p_isValid = false)
|
||||
{
|
||||
// load type
|
||||
$out = CcBlockQuery::create()->findPk($p_blockId);
|
||||
|
@ -236,7 +236,13 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
|
|||
|
||||
//getting block content candidate count that meets criteria
|
||||
$bl = new Application_Model_Block($p_blockId);
|
||||
$files = $bl->getListofFilesMeetCriteria();
|
||||
if ($p_isValid) {
|
||||
$files = $bl->getListofFilesMeetCriteria();
|
||||
$showPoolCount = true;
|
||||
} else {
|
||||
$files = null;
|
||||
$showPoolCount = false;
|
||||
}
|
||||
|
||||
$generate = new Zend_Form_Element_Button('generate_button');
|
||||
$generate->setAttrib('class', 'ui-button ui-state-default sp-button');
|
||||
|
@ -256,7 +262,8 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
|
|||
|
||||
$this->setDecorators(array(
|
||||
array('ViewScript', array('viewScript' => 'form/smart-block-criteria.phtml', "openOption"=> $openSmartBlockOption,
|
||||
'criteriasLength' => count($this->criteriaOptions), 'poolCount' => $files['count'], 'modRowMap' => $modRowMap))
|
||||
'criteriasLength' => count($this->criteriaOptions), 'poolCount' => $files['count'], 'modRowMap' => $modRowMap,
|
||||
'showPoolCount' => $showPoolCount))
|
||||
));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue