Add 'Save and stay' button on missing pages at back office
This commit is contained in:
@@ -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
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -358,6 +358,9 @@
|
||||
<i class="process-icon-cancel"></i>{l s='Cancel' mod='hotelreservationsystem'}
|
||||
</a>
|
||||
<button type="submit" name="submitRefundReqBookings" class="btn btn-default pull-right">
|
||||
<i class="process-icon-save"></i> {l s='Save' mod='hotelreservationsystem'}
|
||||
</button>
|
||||
<button type="submit" name="submitRefundReqBookingsAndStay" class="btn btn-default pull-right">
|
||||
<i class="process-icon-save"></i> {l s='Save and stay' mod='hotelreservationsystem'}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user