diff --git a/airtime_mvc/application/controllers/PlaylistController.php b/airtime_mvc/application/controllers/PlaylistController.php index a2e55034a..d5ee2b89f 100644 --- a/airtime_mvc/application/controllers/PlaylistController.php +++ b/airtime_mvc/application/controllers/PlaylistController.php @@ -446,14 +446,13 @@ class PlaylistController extends Zend_Controller_Action $request = $this->getRequest(); $params = $request->getPost(); $result = array(); - - $this->setPlaylistNameDescAction(); - + if ($params['type'] == 'block') { $form = new Application_Form_SmartBlockCriteria(); $form->startForm($params['obj_id']); $bl = new Application_Model_Block($params['obj_id']); if ($form->isValid($params)) { + $this->setPlaylistNameDescAction(); $bl->saveSmartBlockCriteria($params['data']); $result['html'] = $this->createFullResponse($bl, true, true); $result['result'] = 0; @@ -461,6 +460,8 @@ class PlaylistController extends Zend_Controller_Action $this->view->obj = $bl; $this->view->id = $bl->getId(); $this->view->form = $form; + $this->view->unsavedName = $params['name']; + $this->view->unsavedDesc = $params['description']; $viewPath = 'playlist/smart-block.phtml'; $result['html'] = $this->view->render($viewPath); $result['result'] = 1; diff --git a/airtime_mvc/application/views/scripts/playlist/smart-block.phtml b/airtime_mvc/application/views/scripts/playlist/smart-block.phtml index 9b43655f6..9c37dfffa 100644 --- a/airtime_mvc/application/views/scripts/playlist/smart-block.phtml +++ b/airtime_mvc/application/views/scripts/playlist/smart-block.phtml @@ -19,7 +19,12 @@ if (isset($this->obj)) {

- obj->getName(); ?> + + unsavedName)) echo $this->unsavedName; + else echo $this->obj->getName(); + ?> +

length; ?>

@@ -30,7 +35,10 @@ if (isset($this->obj)) {
- +