Skip to content

Commit

Permalink
Fix translate
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurent authored and lchenay committed May 16, 2012
1 parent c8f6891 commit 2fb9ee8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
Expand Up @@ -23,6 +23,6 @@ public function init()

public function onSelect($signal, $sender, $select, $applyDefaultFilters)
{
throw new Centurion_Traits_Exception("Not implemented yet");
throw new Centurion_Traits_Exception('Not implemented yet');
}
}
6 changes: 4 additions & 2 deletions library/Centurion/Contrib/translation/traits/Form/Model.php
Expand Up @@ -10,6 +10,9 @@ public function init()
Centurion_Signal::factory('on_populate_with_instance')->connect(array($this, 'populateWithInstance'), $this->_form);
Centurion_Signal::factory('pre_populate')->connect(array($this, 'prePopulate'), $this->_form);
Centurion_Signal::factory('on_form_get_toolbar')->connect(array($this, 'onFormGetToolbar'), $this->_form);

$this->_form->enableElement('original_id');
$this->_form->enableElement('language_id');
}

/**
Expand Down Expand Up @@ -74,7 +77,7 @@ public function preGenerate()
$this->getView()->translate('Language'),
(string) Translation_Traits_Common::getDefaultLanguage()->name));


if ($this->getModel()->isOriginalForcedToDefaultLanguage()) {

$f = new Zend_Form_Element_Hidden(array('disableTranslator' => true, 'name' => Translation_Traits_Model_DbTable::LANGUAGE_FIELD,
Expand All @@ -96,7 +99,6 @@ public function preGenerate()

$this->addElement($f, Translation_Traits_Model_DbTable::LANGUAGE_FIELD);
}

}

public function prePopulate($signal, $sender, $values)
Expand Down
6 changes: 1 addition & 5 deletions library/Centurion/Controller/Mptt.php
Expand Up @@ -159,8 +159,6 @@ public function editAction()

$this->_formViewScript = 'mptt/edit.phtml';
$this->_renderForm($this->view->form);

$this->renderIfNotExists('mptt/edit', null, true);
}

public function newAction()
Expand All @@ -182,8 +180,6 @@ public function createAction()

$this->_formViewScript = 'mptt/create.phtml';
$this->_renderForm($this->view->form);

$this->renderIfNotExists('mptt/create', null, true);
}

public function moveAction()
Expand Down Expand Up @@ -528,4 +524,4 @@ protected function _preSave()
protected function _postSave()
{
}
}
}
3 changes: 2 additions & 1 deletion library/Centurion/Traits/Form/Abstract.php
Expand Up @@ -2,9 +2,10 @@
class Centurion_Traits_Form_Abstract extends Centurion_Traits_Abstract
{
/**
* @var Centurion_Form
* @var Centurion_Form_Model
*/
protected $_form;


/**
* @param Centurion_Form $form
Expand Down

0 comments on commit 2fb9ee8

Please sign in to comment.