diff --git a/controllers/admin/AdminCmsCategoriesController.php b/controllers/admin/AdminCmsCategoriesController.php
index ccc36eb41..de046954d 100644
--- a/controllers/admin/AdminCmsCategoriesController.php
+++ b/controllers/admin/AdminCmsCategoriesController.php
@@ -105,7 +105,19 @@ class AdminCmsCategoriesControllerCore extends AdminController
$object = parent::postProcess();
$this->updateAssoShop((int)Tools::getValue('id_cms_category'));
if ($object !== false) {
- Tools::redirectAdmin(self::$currentIndex.'&conf=3&id_cms_category='.(int)$object->id.'&token='.Tools::getValue('token'));
+ if (Tools::isSubmit('submitAdd'.$this->table.'AndStay')) {
+ if ($this->id_object) {
+ Tools::redirectAdmin(self::$currentIndex.'&update'.$this->table.'&conf=4&id_cms_category='.(int)$object->id.'&token='.Tools::getValue('token'));
+ } else {
+ Tools::redirectAdmin(self::$currentIndex.'&update'.$this->table.'&conf=3&id_cms_category='.(int)$object->id.'&token='.Tools::getValue('token'));
+ }
+ } else {
+ if ($this->id_object) {
+ Tools::redirectAdmin(self::$currentIndex.'&conf=4&id_cms_category='.(int)$object->id.'&token='.Tools::getValue('token'));
+ } else {
+ Tools::redirectAdmin(self::$currentIndex.'&conf=3&id_cms_category='.(int)$object->id.'&token='.Tools::getValue('token'));
+ }
+ }
}
return $object;
}
@@ -289,7 +301,16 @@ class AdminCmsCategoriesControllerCore extends AdminController
),
'submit' => array(
'title' => $this->l('Save'),
- )
+ ),
+ 'buttons' => array(
+ 'save-and-stay' => array(
+ 'title' => $this->l('Save and stay'),
+ 'name' => 'submitAdd'.$this->table.'AndStay',
+ 'type' => 'submit',
+ 'class' => 'btn btn-default pull-right',
+ 'icon' => 'process-icon-save',
+ ),
+ ),
);
if (Shop::isFeatureActive()) {
diff --git a/controllers/admin/AdminCmsController.php b/controllers/admin/AdminCmsController.php
index 9ca65f327..b39f8bf66 100644
--- a/controllers/admin/AdminCmsController.php
+++ b/controllers/admin/AdminCmsController.php
@@ -218,6 +218,13 @@ class AdminCmsControllerCore extends AdminController
'title' => $this->l('Save'),
),
'buttons' => array(
+ 'save-and-stay' => array(
+ 'title' => $this->l('Save and stay'),
+ 'name' => 'submitAdd'.$this->table.'AndStay',
+ 'type' => 'submit',
+ 'class' => 'btn btn-default pull-right',
+ 'icon' => 'process-icon-save',
+ ),
'save_and_preview' => array(
'name' => 'viewcms',
'type' => 'submit',
diff --git a/controllers/admin/AdminContactsController.php b/controllers/admin/AdminContactsController.php
index 89917f7fc..3d7ae5b25 100644
--- a/controllers/admin/AdminContactsController.php
+++ b/controllers/admin/AdminContactsController.php
@@ -113,7 +113,16 @@ class AdminContactsControllerCore extends AdminController
),
'submit' => array(
'title' => $this->l('Save'),
- )
+ ),
+ 'buttons' => array(
+ 'save-and-stay' => array(
+ 'title' => $this->l('Save and stay'),
+ 'name' => 'submitAdd'.$this->table.'AndStay',
+ 'type' => 'submit',
+ 'class' => 'btn btn-default pull-right',
+ 'icon' => 'process-icon-save',
+ ),
+ ),
);
if (Shop::isFeatureActive()) {
diff --git a/controllers/admin/AdminCountriesController.php b/controllers/admin/AdminCountriesController.php
index 94dd066ac..becf523cb 100644
--- a/controllers/admin/AdminCountriesController.php
+++ b/controllers/admin/AdminCountriesController.php
@@ -368,6 +368,16 @@ class AdminCountriesControllerCore extends AdminController
'title' => $this->l('Save')
);
+ $this->fields_form['buttons'] = array(
+ 'save-and-stay' => array(
+ 'title' => $this->l('Save and stay'),
+ 'name' => 'submitAdd'.$this->table.'AndStay',
+ 'type' => 'submit',
+ 'class' => 'btn btn-default pull-right',
+ 'icon' => 'process-icon-save',
+ )
+ );
+
return parent::renderForm();
}
diff --git a/controllers/admin/AdminCurrenciesController.php b/controllers/admin/AdminCurrenciesController.php
index 2dcd9f445..6f6e1ded2 100644
--- a/controllers/admin/AdminCurrenciesController.php
+++ b/controllers/admin/AdminCurrenciesController.php
@@ -231,6 +231,16 @@ class AdminCurrenciesControllerCore extends AdminController
'title' => $this->l('Save'),
);
+ $this->fields_form['buttons'] = array(
+ 'save-and-stay' => array(
+ 'title' => $this->l('Save and stay'),
+ 'name' => 'submitAdd'.$this->table.'AndStay',
+ 'type' => 'submit',
+ 'class' => 'btn btn-default pull-right',
+ 'icon' => 'process-icon-save',
+ )
+ );
+
return parent::renderForm();
}
diff --git a/controllers/admin/AdminEmployeesController.php b/controllers/admin/AdminEmployeesController.php
index ab1a12d45..c736e1865 100644
--- a/controllers/admin/AdminEmployeesController.php
+++ b/controllers/admin/AdminEmployeesController.php
@@ -403,6 +403,16 @@ class AdminEmployeesControllerCore extends AdminController
'title' => $this->l('Save'),
);
+ $this->fields_form['buttons'] = array(
+ 'save-and-stay' => array(
+ 'title' => $this->l('Save and stay'),
+ 'name' => 'submitAdd'.$this->table.'AndStay',
+ 'type' => 'submit',
+ 'class' => 'btn btn-default pull-right',
+ 'icon' => 'process-icon-save',
+ )
+ );
+
$this->fields_value['passwd'] = false;
$this->fields_value['bo_theme_css'] = $obj->bo_theme.'|'.$obj->bo_css;
diff --git a/controllers/admin/AdminFeaturesController.php b/controllers/admin/AdminFeaturesController.php
index 1f7ee775b..c581d2604 100644
--- a/controllers/admin/AdminFeaturesController.php
+++ b/controllers/admin/AdminFeaturesController.php
@@ -216,6 +216,16 @@ class AdminFeaturesControllerCore extends AdminController
'title' => $this->l('Save'),
);
+ $this->fields_form['buttons'] = array(
+ 'save-and-stay' => array(
+ 'title' => $this->l('Save and stay'),
+ 'name' => 'submitAdd'.$this->table.'AndStay',
+ 'type' => 'submit',
+ 'class' => 'btn btn-default pull-right',
+ 'icon' => 'process-icon-save',
+ )
+ );
+
return parent::renderForm();
}
@@ -544,9 +554,9 @@ class AdminFeaturesControllerCore extends AdminController
if ($this->table == 'feature_value' && ($this->display == 'edit' || $this->display == 'add')) {
$this->redirect_after = self::$currentIndex.'&addfeature_value&id_feature='.(int)Tools::getValue('id_feature').'&token='.$this->token;
} else {
- $this->redirect_after = self::$currentIndex.'&'.$this->identifier.'=&conf=3&update'.$this->table.'&token='.$this->token;
+ $this->redirect_after = self::$currentIndex.'&'.$this->identifier.'='.(int) $object->id.'&conf=3&update'.$this->table.'&token='.$this->token;
}
- } elseif (Tools::isSubmit('submitAdd'.$this->table.'AndStay') && count($this->errors)) {
+ } elseif (Tools::isSubmit('submitAdd'.$this->table.'AndStay') && count($this->errors) && $this->table == 'feature_value') { // enter only if feature is submitted
$this->display = 'editFeatureValue';
}
@@ -562,7 +572,7 @@ class AdminFeaturesControllerCore extends AdminController
$object = parent::processUpdate();
if (Tools::isSubmit('submitAdd'.$this->table.'AndStay') && !count($this->errors)) {
- $this->redirect_after = self::$currentIndex.'&'.$this->identifier.'=&conf=3&update'.$this->table.'&token='.$this->token;
+ $this->redirect_after = self::$currentIndex.'&'.$this->identifier.'='.(int) Tools::getValue('id_feature').'&conf=4&update'.$this->table.'&token='.$this->token;
}
return $object;
diff --git a/controllers/admin/AdminGendersController.php b/controllers/admin/AdminGendersController.php
index 8a008e119..57a9ef514 100644
--- a/controllers/admin/AdminGendersController.php
+++ b/controllers/admin/AdminGendersController.php
@@ -173,7 +173,16 @@ class AdminGendersControllerCore extends AdminController
),
'submit' => array(
'title' => $this->l('Save'),
- )
+ ),
+ 'buttons' => array(
+ 'save-and-stay' => array(
+ 'title' => $this->l('Save and stay'),
+ 'name' => 'submitAdd'.$this->table.'AndStay',
+ 'type' => 'submit',
+ 'class' => 'btn btn-default pull-right',
+ 'icon' => 'process-icon-save',
+ ),
+ ),
);
/** @var Gender $obj */
diff --git a/controllers/admin/AdminGroupsController.php b/controllers/admin/AdminGroupsController.php
index 54ea51ffd..d901fb449 100644
--- a/controllers/admin/AdminGroupsController.php
+++ b/controllers/admin/AdminGroupsController.php
@@ -232,6 +232,15 @@ class AdminGroupsControllerCore extends AdminController
'submit' => array(
'title' => $this->l('Save'),
),
+ 'buttons' => array(
+ 'save-and-stay' => array(
+ 'title' => $this->l('Save and stay'),
+ 'name' => 'submitAdd'.$this->table.'AndStay',
+ 'type' => 'submit',
+ 'class' => 'btn btn-default pull-right',
+ 'icon' => 'process-icon-save',
+ ),
+ ),
'input' => array(
array(
'type' => 'text',
diff --git a/controllers/admin/AdminImagesController.php b/controllers/admin/AdminImagesController.php
index 82368b712..914802c9d 100644
--- a/controllers/admin/AdminImagesController.php
+++ b/controllers/admin/AdminImagesController.php
@@ -403,7 +403,16 @@ class AdminImagesControllerCore extends AdminController
),
'submit' => array(
'title' => $this->l('Save')
- )
+ ),
+ 'buttons' => array(
+ 'save-and-stay' => array(
+ 'title' => $this->l('Save and stay'),
+ 'name' => 'submitAdd'.$this->table.'AndStay',
+ 'type' => 'submit',
+ 'class' => 'btn btn-default pull-right',
+ 'icon' => 'process-icon-save',
+ ),
+ ),
);
parent::__construct();
diff --git a/controllers/admin/AdminLanguagesController.php b/controllers/admin/AdminLanguagesController.php
index 56fca56ad..f655284a7 100644
--- a/controllers/admin/AdminLanguagesController.php
+++ b/controllers/admin/AdminLanguagesController.php
@@ -262,6 +262,16 @@ class AdminLanguagesControllerCore extends AdminController
'title' => $this->l('Save'),
);
+ $this->fields_form['buttons'] = array(
+ 'save-and-stay' => array(
+ 'title' => $this->l('Save and stay'),
+ 'name' => 'submitAdd'.$this->table.'AndStay',
+ 'type' => 'submit',
+ 'class' => 'btn btn-default pull-right',
+ 'icon' => 'process-icon-save',
+ ),
+ );
+
/** @var Language $obj */
if (!($obj = $this->loadObject(true))) {
return;
diff --git a/controllers/admin/AdminMetaController.php b/controllers/admin/AdminMetaController.php
index 6ca06e6d8..cb47df23b 100644
--- a/controllers/admin/AdminMetaController.php
+++ b/controllers/admin/AdminMetaController.php
@@ -381,7 +381,16 @@ class AdminMetaControllerCore extends AdminController
),
'submit' => array(
'title' => $this->l('Save')
- )
+ ),
+ 'buttons' => array(
+ 'save-and-stay' => array(
+ 'title' => $this->l('Save and stay'),
+ 'name' => 'submitAdd'.$this->table.'AndStay',
+ 'type' => 'submit',
+ 'class' => 'btn btn-default pull-right',
+ 'icon' => 'process-icon-save',
+ ),
+ ),
);
return parent::renderForm();
}
diff --git a/controllers/admin/AdminOrderMessageController.php b/controllers/admin/AdminOrderMessageController.php
index 19844d602..b6eb07604 100644
--- a/controllers/admin/AdminOrderMessageController.php
+++ b/controllers/admin/AdminOrderMessageController.php
@@ -91,7 +91,16 @@ class AdminOrderMessageControllerCore extends AdminController
),
'submit' => array(
'title' => $this->l('Save'),
- )
+ ),
+ 'buttons' => array(
+ 'save-and-stay' => array(
+ 'title' => $this->l('Save and stay'),
+ 'name' => 'submitAdd'.$this->table.'AndStay',
+ 'type' => 'submit',
+ 'class' => 'btn btn-default pull-right',
+ 'icon' => 'process-icon-save',
+ ),
+ ),
);
parent::__construct();
diff --git a/controllers/admin/AdminProfilesController.php b/controllers/admin/AdminProfilesController.php
index 887022217..56d9f04d3 100644
--- a/controllers/admin/AdminProfilesController.php
+++ b/controllers/admin/AdminProfilesController.php
@@ -76,7 +76,16 @@ class AdminProfilesControllerCore extends AdminController
),
'submit' => array(
'title' => $this->l('Save'),
- )
+ ),
+ 'buttons' => array(
+ 'save-and-stay' => array(
+ 'title' => $this->l('Save and stay'),
+ 'name' => 'submitAdd'.$this->table.'AndStay',
+ 'type' => 'submit',
+ 'class' => 'btn btn-default pull-right',
+ 'icon' => 'process-icon-save',
+ ),
+ ),
);
$list_profile = array();
diff --git a/controllers/admin/AdminQuickAccessesController.php b/controllers/admin/AdminQuickAccessesController.php
index 38923e60d..1f4b5bab9 100644
--- a/controllers/admin/AdminQuickAccessesController.php
+++ b/controllers/admin/AdminQuickAccessesController.php
@@ -118,7 +118,16 @@ class AdminQuickAccessesControllerCore extends AdminController
),
'submit' => array(
'title' => $this->l('Save'),
- )
+ ),
+ 'buttons' => array(
+ 'save-and-stay' => array(
+ 'title' => $this->l('Save and stay'),
+ 'name' => 'submitAdd'.$this->table.'AndStay',
+ 'type' => 'submit',
+ 'class' => 'btn btn-default pull-right',
+ 'icon' => 'process-icon-save',
+ ),
+ ),
);
parent::__construct();
diff --git a/controllers/admin/AdminSpecificPriceRuleController.php b/controllers/admin/AdminSpecificPriceRuleController.php
index a1185a717..07421466f 100644
--- a/controllers/admin/AdminSpecificPriceRuleController.php
+++ b/controllers/admin/AdminSpecificPriceRuleController.php
@@ -285,6 +285,15 @@ class AdminSpecificPriceRuleControllerCore extends AdminController
'submit' => array(
'title' => $this->l('Save')
),
+ 'buttons' => array(
+ 'save-and-stay' => array(
+ 'title' => $this->l('Save and stay'),
+ 'name' => 'submitAdd'.$this->table.'AndStay',
+ 'type' => 'submit',
+ 'class' => 'btn btn-default pull-right',
+ 'icon' => 'process-icon-save',
+ ),
+ ),
);
if (($value = $this->getFieldValue($this->object, 'price')) != -1) {
$price = number_format($value, 6);
diff --git a/controllers/admin/AdminStatesController.php b/controllers/admin/AdminStatesController.php
index c3972a846..6c549289f 100644
--- a/controllers/admin/AdminStatesController.php
+++ b/controllers/admin/AdminStatesController.php
@@ -199,7 +199,16 @@ class AdminStatesControllerCore extends AdminController
),
'submit' => array(
'title' => $this->l('Save'),
- )
+ ),
+ 'buttons' => array(
+ 'save-and-stay' => array(
+ 'title' => $this->l('Save and stay'),
+ 'name' => 'submitAdd'.$this->table.'AndStay',
+ 'type' => 'submit',
+ 'class' => 'btn btn-default pull-right',
+ 'icon' => 'process-icon-save',
+ ),
+ ),
);
return parent::renderForm();
diff --git a/controllers/admin/AdminStatusesController.php b/controllers/admin/AdminStatusesController.php
index 6958b0735..3dca34847 100644
--- a/controllers/admin/AdminStatusesController.php
+++ b/controllers/admin/AdminStatusesController.php
@@ -238,8 +238,13 @@ class AdminStatusesControllerCore extends AdminController
'show_admin_template' => $mailToSuperadmin || $mailToEmployee || $mailToHotelier,
);
} else {
+ $name = array();
+ foreach ($this->_languages as $language) {
+ $name[$language['id_lang']] = $this->getFieldValue($order_return_state, 'name', $language['id_lang']);
+ }
+
$this->fields_value = array(
- 'name' => $this->getFieldValue($order_return_state, 'name'),
+ 'name' => $name,
'color' => "#ffffff",
);
}
@@ -478,7 +483,16 @@ class AdminStatusesControllerCore extends AdminController
),
'submit' => array(
'title' => $this->l('Save'),
- )
+ ),
+ 'buttons' => array(
+ 'save-and-stay' => array(
+ 'title' => $this->l('Save and stay'),
+ 'name' => 'submitAdd'.$this->table.'AndStay',
+ 'type' => 'submit',
+ 'class' => 'btn btn-default pull-right',
+ 'icon' => 'process-icon-save',
+ ),
+ ),
);
return $this->renderOrderStatusForm();
} elseif (Tools::isSubmit('updateorder_return_state')
@@ -683,7 +697,16 @@ class AdminStatusesControllerCore extends AdminController
),
'submit' => array(
'title' => $this->l('Save'),
- )
+ ),
+ 'buttons' => array(
+ 'save-and-stay' => array(
+ 'title' => $this->l('Save and stay'),
+ 'name' => 'submitAdd'.$this->table.'AndStay',
+ 'type' => 'submit',
+ 'class' => 'btn btn-default pull-right',
+ 'icon' => 'process-icon-save',
+ ),
+ ),
);
return parent::renderForm();
@@ -789,7 +812,11 @@ class AdminStatusesControllerCore extends AdminController
if (!$order_return_state->save()) {
$this->errors[] = Tools::displayError('An error has occurred: Can\'t save the current order\'s refund status.');
} else {
- Tools::redirectAdmin(self::$currentIndex.'&conf=4&token='.$this->token);
+ if (Tools::isSubmit('submitAddorder_return_stateAndStay')) {
+ Tools::redirectAdmin(self::$currentIndex.'&updateorder_return_state&id_order_return_state='.$id_order_return_state.'&conf=4&token='.$this->token);
+ } else {
+ Tools::redirectAdmin(self::$currentIndex.'&conf=4&token='.$this->token);
+ }
}
}
}
diff --git a/controllers/admin/AdminTabsController.php b/controllers/admin/AdminTabsController.php
index 5dc3401ac..0085cd815 100644
--- a/controllers/admin/AdminTabsController.php
+++ b/controllers/admin/AdminTabsController.php
@@ -183,7 +183,16 @@ class AdminTabsControllerCore extends AdminController
),
'submit' => array(
'title' => $this->l('Save'),
- )
+ ),
+ 'buttons' => array(
+ 'save-and-stay' => array(
+ 'title' => $this->l('Save and stay'),
+ 'name' => 'submitAdd'.$this->table.'AndStay',
+ 'type' => 'submit',
+ 'class' => 'btn btn-default pull-right',
+ 'icon' => 'process-icon-save',
+ ),
+ ),
);
$this->fields_form['input'][] = array(
diff --git a/controllers/admin/AdminTaxesController.php b/controllers/admin/AdminTaxesController.php
index d5696d819..8a1640a19 100644
--- a/controllers/admin/AdminTaxesController.php
+++ b/controllers/admin/AdminTaxesController.php
@@ -233,7 +233,16 @@ class AdminTaxesControllerCore extends AdminController
),
'submit' => array(
'title' => $this->l('Save')
- )
+ ),
+ 'buttons' => array(
+ 'save-and-stay' => array(
+ 'title' => $this->l('Save and stay'),
+ 'name' => 'submitAdd'.$this->table.'AndStay',
+ 'type' => 'submit',
+ 'class' => 'btn btn-default pull-right',
+ 'icon' => 'process-icon-save',
+ ),
+ ),
);
return parent::renderForm();
@@ -258,7 +267,11 @@ class AdminTaxesControllerCore extends AdminController
if (!$result) {
$this->errors[] = Tools::displayError('An error occurred while updating an object.').' '.$this->table.'';
} elseif ($this->postImage($object->id)) {
- Tools::redirectAdmin(self::$currentIndex.'&id_'.$this->table.'='.$object->id.'&conf=4'.'&token='.$this->token);
+ if (Tools::isSubmit('submitAdd'.$this->table.'AndStay')) {
+ Tools::redirectAdmin(self::$currentIndex.'&update'.$this->table.'&id_'.$this->table.'='.$object->id.'&conf=4'.'&token='.$this->token);
+ } else {
+ Tools::redirectAdmin(self::$currentIndex.'&conf=4&token='.$this->token);
+ }
}
} else {
$this->errors[] = Tools::displayError('An error occurred while updating an object.').' '.$this->table.' '.Tools::displayError('(cannot load object)');
@@ -272,10 +285,17 @@ class AdminTaxesControllerCore extends AdminController
$this->copyFromPost($object, $this->table);
if (!$object->add()) {
$this->errors[] = Tools::displayError('An error occurred while creating an object.').' '.$this->table.'';
- } elseif (($_POST['id_'.$this->table] = $object->id /* voluntary */) && $this->postImage($object->id) && $this->_redirect) {
+ } elseif ($this->postImage($object->id)) {
+ if (Tools::isSubmit('submitAdd'.$this->table.'AndStay')) {
+ Tools::redirectAdmin(self::$currentIndex.'&update'.$this->table.'&id_'.$this->table.'='.$object->id.'&conf=3'.'&token='.$this->token);
+ } else {
+ Tools::redirectAdmin(self::$currentIndex.'&conf=3&token='.$this->token);
+ }
Tools::redirectAdmin(self::$currentIndex.'&id_'.$this->table.'='.$object->id.'&conf=3'.'&token='.$this->token);
}
}
+ } else {
+ $this->display = 'add';
}
} else {
parent::postProcess();
diff --git a/controllers/admin/AdminThemesController.php b/controllers/admin/AdminThemesController.php
index 4a3a306c7..ce428e008 100644
--- a/controllers/admin/AdminThemesController.php
+++ b/controllers/admin/AdminThemesController.php
@@ -358,7 +358,16 @@ class AdminThemesControllerCore extends AdminController
),
'submit' => array(
'title' => $this->l('Save'),
- )
+ ),
+ 'buttons' => array(
+ 'save-and-stay' => array(
+ 'title' => $this->l('Save and stay'),
+ 'name' => 'submitAdd'.$this->table.'AndStay',
+ 'type' => 'submit',
+ 'class' => 'btn btn-default pull-right',
+ 'icon' => 'process-icon-save',
+ ),
+ ),
);
// adding a new theme, you can create a directory, and copy from an existing theme
if ($this->display == 'add' || !Validate::isLoadedObject($this->object)) {
@@ -644,7 +653,12 @@ class AdminThemesControllerCore extends AdminController
}
$theme->update();
}
- Tools::redirectAdmin(Context::getContext()->link->getAdminLink('AdminThemes').'&conf=29');
+
+ if (Tools::isSubmit('submitAdd'.$this->table.'AndStay')) {
+ Tools::redirectAdmin(self::$currentIndex.'&update'.$this->table.'&id_theme='.$theme->id.'&token='.$this->token.'&conf=4');
+ } else {
+ Tools::redirectAdmin(self::$currentIndex.'&token='.$this->token.'&conf=4');
+ }
}
}
diff --git a/modules/hotelreservationsystem/controllers/admin/AdminOrderRefundRequestsController.php b/modules/hotelreservationsystem/controllers/admin/AdminOrderRefundRequestsController.php
index 28c9b1ba6..6b917f75b 100644
--- a/modules/hotelreservationsystem/controllers/admin/AdminOrderRefundRequestsController.php
+++ b/modules/hotelreservationsystem/controllers/admin/AdminOrderRefundRequestsController.php
@@ -271,7 +271,7 @@ class AdminOrderRefundRequestsController extends ModuleAdminController
}
/*If Admin update the status of the order cancellation request*/
- if (Tools::isSubmit('submitRefundReqBookings')) {
+ if (Tools::isSubmit('submitRefundReqBookings') || Tools::isSubmit('submitRefundReqBookingsAndStay')) {
$idOrderReturn = Tools::getValue('id_order_return');
$idsReturnDetail = Tools::getValue('id_order_return_detail');
if (Validate::isLoadedObject($objOrderReturn = new OrderReturn($idOrderReturn))) {
@@ -611,10 +611,18 @@ class AdminOrderRefundRequestsController extends ModuleAdminController
} elseif ($objRefundState->refunded) {
$confirmation = 102;
}
- Tools::redirectAdmin(
- self::$currentIndex.'&conf='.$confirmation.'&id_order_return='.$idOrderReturn.
- '&vieworder_return&token='.$this->token
- );
+
+ if (Tools::isSubmit('submitRefundReqBookingsAndStay')) {
+ Tools::redirectAdmin(
+ self::$currentIndex.'&conf='.$confirmation.'&id_order_return='.$idOrderReturn.
+ '&vieworder_return&token='.$this->token
+ );
+ } else {
+ Tools::redirectAdmin(
+ self::$currentIndex.'&conf='.$confirmation.'&id_order='.$objOrder->id.
+ '&id_order_return='.$idOrderReturn.'&vieworder_return&token='.$this->token
+ );
+ }
}
}
diff --git a/modules/hotelreservationsystem/views/templates/admin/order_refund_requests/helpers/view/view.tpl b/modules/hotelreservationsystem/views/templates/admin/order_refund_requests/helpers/view/view.tpl
index 6c760e4d7..8ed126d27 100644
--- a/modules/hotelreservationsystem/views/templates/admin/order_refund_requests/helpers/view/view.tpl
+++ b/modules/hotelreservationsystem/views/templates/admin/order_refund_requests/helpers/view/view.tpl
@@ -358,6 +358,9 @@
{l s='Cancel' mod='hotelreservationsystem'}
+
diff --git a/modules/wkhotelfeaturesblock/controllers/admin/AdminFeaturesModuleSettingController.php b/modules/wkhotelfeaturesblock/controllers/admin/AdminFeaturesModuleSettingController.php
index 1cfd97200..12877fc1b 100644
--- a/modules/wkhotelfeaturesblock/controllers/admin/AdminFeaturesModuleSettingController.php
+++ b/modules/wkhotelfeaturesblock/controllers/admin/AdminFeaturesModuleSettingController.php
@@ -224,7 +224,17 @@ class AdminFeaturesModuleSettingController extends ModuleAdminController
),
'submit' => array(
'title' => $this->l('Save')
- ));
+ ),
+ 'buttons' => array(
+ 'save-and-stay' => array(
+ 'title' => $this->l('Save and stay'),
+ 'name' => 'submitAdd'.$this->table.'AndStay',
+ 'type' => 'submit',
+ 'class' => 'btn btn-default pull-right',
+ 'icon' => 'process-icon-save',
+ ),
+ ),
+ );
return parent::renderForm();
}
@@ -318,10 +328,18 @@ class AdminFeaturesModuleSettingController extends ModuleAdminController
);
}
- if ($hotelAmenityId) {
- Tools::redirectAdmin(self::$currentIndex.'&conf=4&token='.$this->token);
+ if (Tools::isSubmit('submitAdd'.$this->table.'AndStay')) {
+ if ($hotelAmenityId) {
+ Tools::redirectAdmin(self::$currentIndex.'&id_features_block='.(int) $hotelAmenityId.'&update'.$this->table.'&conf=4&token='.$this->token);
+ } else {
+ Tools::redirectAdmin(self::$currentIndex.'&id_features_block='.(int) $objFeatureData->id.'&update'.$this->table.'&conf=3&token='.$this->token);
+ }
} else {
- Tools::redirectAdmin(self::$currentIndex.'&conf=3&token='.$this->token);
+ if ($hotelAmenityId) {
+ Tools::redirectAdmin(self::$currentIndex.'&conf=4&token='.$this->token);
+ } else {
+ Tools::redirectAdmin(self::$currentIndex.'&conf=3&token='.$this->token);
+ }
}
} else {
if ($hotelAmenityId) {