diff --git a/controllers/admin/AdminAddressesController.php b/controllers/admin/AdminAddressesController.php
index beac77b2d..45fcf1769 100644
--- a/controllers/admin/AdminAddressesController.php
+++ b/controllers/admin/AdminAddressesController.php
@@ -177,6 +177,18 @@ public function renderForm()
)
);
+ if (!Tools::getValue('liteDisplaying')) {
+ $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['address_type'] = (int)Tools::getValue('address_type', 1);
$id_customer = (int)Tools::getValue('id_customer');
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 @@ public function postProcess()
$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 @@ public function renderForm()
),
'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 @@ public function renderForm()
'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 @@ public function renderForm()
),
'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 @@ public function renderForm()
'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 @@ public function renderForm()
'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/AdminCustomersController.php b/controllers/admin/AdminCustomersController.php
index 6bf3939d4..9aa3205f5 100644
--- a/controllers/admin/AdminCustomersController.php
+++ b/controllers/admin/AdminCustomersController.php
@@ -597,6 +597,18 @@ public function renderForm()
'title' => $this->l('Save'),
);
+ if (!Tools::getValue('liteDisplaying')) {
+ $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',
+ )
+ );
+ }
+
$birthday = explode('-', $this->getFieldValue($obj, 'birthday'));
$this->fields_value = array(
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 @@ public function renderForm()
'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 @@ public function renderForm()
'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 @@ public function processAdd()
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 @@ public function processUpdate()
$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 @@ public function renderForm()
),
'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 c22e02be7..48243b7d3 100644
--- a/controllers/admin/AdminGroupsController.php
+++ b/controllers/admin/AdminGroupsController.php
@@ -232,6 +232,15 @@ public function renderForm()
'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 @@ public function __construct()
),
'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 @@ public function renderForm()
'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 @@ public function renderForm()
),
'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 @@ public function __construct()
),
'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 @@ public function __construct()
),
'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 @@ public function __construct()
),
'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 fd45236ba..5d35dfcfc 100644
--- a/controllers/admin/AdminSpecificPriceRuleController.php
+++ b/controllers/admin/AdminSpecificPriceRuleController.php
@@ -285,6 +285,15 @@ public function renderForm()
'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',
+ ),
+ ),
);
$price = $this->getFieldValue($this->object, 'price');
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 @@ public function renderForm()
),
'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 1e841356a..e10140b77 100644
--- a/controllers/admin/AdminStatusesController.php
+++ b/controllers/admin/AdminStatusesController.php
@@ -228,8 +228,13 @@ protected function initOrderReturnsForm()
'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",
);
}
@@ -468,7 +473,16 @@ public function renderForm()
),
'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')
@@ -673,7 +687,16 @@ protected function renderOrderReturnsForm()
),
'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();
@@ -779,7 +802,11 @@ public function postProcess()
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 586f53c27..d2449776f 100644
--- a/controllers/admin/AdminTabsController.php
+++ b/controllers/admin/AdminTabsController.php
@@ -183,7 +183,16 @@ public function renderForm()
),
'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 @@ public function renderForm()
),
'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 @@ public function postProcess()
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 @@ public function postProcess()
$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 @@ public function renderForm()
),
'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 @@ public function processUpdate()
}
$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 @@ public function postProcess()
}
/*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 @@ public function postProcess()
} 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 @@ public function renderForm()
),
'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 @@ public function processSave()
);
}
- 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) {