Merge pull request #260 from Asturyan/master

Fix "Undefined variable: ex" and add translation to jQplot title on Dashboard
This commit is contained in:
Manuel Raynaud
2014-03-21 23:11:55 +01:00
5 changed files with 1928 additions and 1920 deletions

View File

@@ -335,15 +335,17 @@ abstract class AbstractCrudController extends BaseAdminController
$error_msg = $ex->getMessage();
}
$this->setupFormErrorContext(
$this->getTranslator()->trans("%obj creation", array('%obj' => $this->objectName)),
$error_msg,
$creationForm,
$ex
);
if (false !== $error_msg) {
$this->setupFormErrorContext(
$this->getTranslator()->trans("%obj creation", array('%obj' => $this->objectName)),
$error_msg,
$creationForm,
$ex
);
// At this point, the form has error, and should be redisplayed.
return $this->renderList();
// At this point, the form has error, and should be redisplayed.
return $this->renderList();
}
}
/**
@@ -435,15 +437,17 @@ abstract class AbstractCrudController extends BaseAdminController
$error_msg = $ex->getMessage();*/
}
// At this point, the form has errors, and should be redisplayed.
$this->setupFormErrorContext(
$this->getTranslator()->trans("%obj modification", array('%obj' => $this->objectName)),
$error_msg,
$changeForm,
$ex
);
if (false !== $error_msg) {
// At this point, the form has errors, and should be redisplayed.
$this->setupFormErrorContext(
$this->getTranslator()->trans("%obj modification", array('%obj' => $this->objectName)),
$error_msg,
$changeForm,
$ex
);
return $this->renderEditionTemplate();
return $this->renderEditionTemplate();
}
}
/**

View File

@@ -221,15 +221,17 @@ abstract class AbstractSeoCrudController extends AbstractCrudController
// Pass it to the parser
$this->getParserContext()->addForm($changeForm);
}
$this->setupFormErrorContext(
$this->getTranslator()->trans("%obj SEO modification", array('%obj' => $this->objectName)),
$error_msg,
$updateSeoForm,
$ex
);
// At this point, the form has errors, and should be redisplayed.
return $this->renderEditionTemplate();
if (false !== $error_msg) {
$this->setupFormErrorContext(
$this->getTranslator()->trans("%obj SEO modification", array('%obj' => $this->objectName)),
$error_msg,
$updateSeoForm,
$ex
);
// At this point, the form has errors, and should be redisplayed.
return $this->renderEditionTemplate();
}
}
}

View File

@@ -45,7 +45,7 @@ class HomeController extends BaseAdminController
$data = new \stdClass();
$data->title = "Stats on " . $this->getRequest()->query->get('month', date('m')) . "/" . $this->getRequest()->query->get('year', date('Y'));
$data->title = $this->getTranslator()->trans("Stats on %month/%year", array('%month' => $this->getRequest()->query->get('month', date('m')), '%year' => $this->getRequest()->query->get('year', date('Y'))));
/* sales */
$saleSeries = new \stdClass();

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff