Merge pull request #260 from Asturyan/master
Fix "Undefined variable: ex" and add translation to jQplot title on Dashboard
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
Reference in New Issue
Block a user