Changed edit product to redirect to the edited product.
This commit is contained in:
parent
14c8d56a37
commit
9984696f02
|
|
@ -99,7 +99,8 @@ class ProductsController extends AppController {
|
||||||
if (!empty($this->data)) {
|
if (!empty($this->data)) {
|
||||||
if ($this->Product->save($this->data)) {
|
if ($this->Product->save($this->data)) {
|
||||||
$this->Session->setFlash(__('The Product has been saved', true));
|
$this->Session->setFlash(__('The Product has been saved', true));
|
||||||
$this->redirect(array('action'=>'index'));
|
$id = $this->Product->id;
|
||||||
|
$this->redirect(array('action'=>'view/'.$id));
|
||||||
} else {
|
} else {
|
||||||
$this->Session->setFlash(__('The Product could not be saved. Please, try again.', true));
|
$this->Session->setFlash(__('The Product could not be saved. Please, try again.', true));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -267,7 +267,7 @@ $(function() {
|
||||||
|
|
||||||
var descText = '';
|
var descText = '';
|
||||||
if(data.item_code) {
|
if(data.item_code) {
|
||||||
descText = descText + '<b>Item Code:</b> ' + data.item_code;
|
descText = descText + '<br><b>Item Code:</b> ' + data.item_code;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(data.item_description) {
|
if(data.item_description) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue