Update the url generate for the bulk update action, updated the form to retain the submitted values in case of any error
This commit is contained in:
@@ -203,7 +203,7 @@ class AdminHotelFeaturePricesSettingsController extends ModuleAdminController
|
||||
parent::initToolbar();
|
||||
if (empty($this->display) || $this->display == 'list') {
|
||||
$this->page_header_toolbar_btn['bulk_add'] = array(
|
||||
'href' => self::$currentIndex.'&add'.$this->table.'&bulkAdd'.$this->table.'&token='.$this->token,
|
||||
'href' => self::$currentIndex.'&bulkAdd'.$this->table.'&token='.$this->token,
|
||||
'desc' => $this->l('Bulk create rules'),
|
||||
'imgclass' => 'new'
|
||||
);
|
||||
@@ -230,6 +230,8 @@ class AdminHotelFeaturePricesSettingsController extends ModuleAdminController
|
||||
parent::initProcess();
|
||||
if (Tools::isSubmit('bulkAdd'.$this->table)) {
|
||||
self::$currentIndex = self::$currentIndex.'&bulkAdd'.$this->table.'';
|
||||
$this->action = 'new';
|
||||
$this->display = 'add';
|
||||
}
|
||||
|
||||
if (Tools::isSubmit('submitBulkAdd'.$this->table)) {
|
||||
|
||||
@@ -93,17 +93,17 @@
|
||||
</label>
|
||||
<div class="col-lg-3">
|
||||
<select class="form-control" name="date_selection_type" id="date_selection_type">
|
||||
<option value="{HotelRoomTypeFeaturePricing::DATE_SELECTION_TYPE_RANGE}" {if isset($objFeaturePrice->date_selection_type) && $objFeaturePrice->date_selection_type == HotelRoomTypeFeaturePricing::DATE_SELECTION_TYPE_RANGE}selected = "selected"{/if}>
|
||||
<option value="{HotelRoomTypeFeaturePricing::DATE_SELECTION_TYPE_RANGE}" {if (isset($smarty.post.date_selection_type) && $smarty.post.date_selection_type == HotelRoomTypeFeaturePricing::DATE_SELECTION_TYPE_RANGE) || (isset($objFeaturePrice->date_selection_type) && $objFeaturePrice->date_selection_type == HotelRoomTypeFeaturePricing::DATE_SELECTION_TYPE_RANGE)}selected = "selected"{/if}>
|
||||
{l s='Date Range' mod='hotelreservationsystem'}
|
||||
</option>
|
||||
<option value="{HotelRoomTypeFeaturePricing::DATE_SELECTION_TYPE_SPECIFIC}" {if isset($objFeaturePrice->date_selection_type) && $objFeaturePrice->date_selection_type == HotelRoomTypeFeaturePricing::DATE_SELECTION_TYPE_SPECIFIC}selected = "selected"{/if}>
|
||||
<option value="{HotelRoomTypeFeaturePricing::DATE_SELECTION_TYPE_SPECIFIC}" {if (isset($smarty.post.date_selection_type) && $smarty.post.date_selection_type == HotelRoomTypeFeaturePricing::DATE_SELECTION_TYPE_SPECIFIC) || (isset($objFeaturePrice->date_selection_type) && $objFeaturePrice->date_selection_type == HotelRoomTypeFeaturePricing::DATE_SELECTION_TYPE_SPECIFIC)}selected = "selected"{/if}>
|
||||
{l s='Specific Date' mod='hotelreservationsystem'}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group specific_date_type" {if isset($edit) && $edit}{if isset($objFeaturePrice->date_selection_type) && $objFeaturePrice->date_selection_type != HotelRoomTypeFeaturePricing::DATE_SELECTION_TYPE_SPECIFIC}style="display:none;"{/if}{else}style="display:none;"{/if}>
|
||||
<div class="form-group specific_date_type" {if (isset($smarty.post.date_selection_type) && $smarty.post.date_selection_type != HotelRoomTypeFeaturePricing::DATE_SELECTION_TYPE_SPECIFIC) || (isset($objFeaturePrice->date_selection_type) && $objFeaturePrice->date_selection_type != HotelRoomTypeFeaturePricing::DATE_SELECTION_TYPE_SPECIFIC)}style="display:none;"{else if !isset($edit) && !isset($smarty.post.date_selection_type)}style="display:none;"{/if}>
|
||||
<label class="col-sm-3 control-label required" for="specific_date" >
|
||||
{l s='Specific Date' mod='hotelreservationsystem'}
|
||||
</label>
|
||||
@@ -112,24 +112,24 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group date_range_type" {if isset($objFeaturePrice->date_selection_type) && $objFeaturePrice->date_selection_type == HotelRoomTypeFeaturePricing::DATE_SELECTION_TYPE_SPECIFIC}style="display:none;"{/if}>
|
||||
<div class="form-group date_range_type" {if (isset($objFeaturePrice->date_selection_type) && $objFeaturePrice->date_selection_type == HotelRoomTypeFeaturePricing::DATE_SELECTION_TYPE_SPECIFIC) || (isset($smarty.post.date_selection_type) && $smarty.post.date_selection_type != HotelRoomTypeFeaturePricing::DATE_SELECTION_TYPE_RANGE)}style="display:none;"{/if}>
|
||||
<label class="col-sm-3 control-label required" for="date_form" >
|
||||
{l s='Date From' mod='hotelreservationsystem'}
|
||||
</label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" id="feature_plan_date_from" name="date_from" class="form-control datepicker-input" value="{if isset($objFeaturePrice->date_from)}{$objFeaturePrice->date_from|date_format:'%d-%m-%Y'}{else}{$date_from|date_format:'%d-%m-%Y'}{/if}" readonly/>
|
||||
<input type="text" id="feature_plan_date_from" name="date_from" class="form-control datepicker-input" value="{if isset($smarty.post.date_from) && $smarty.post.date_from}{$smarty.post.date_from}{elseif isset($objFeaturePrice->date_from)}{$objFeaturePrice->date_from|date_format:'%d-%m-%Y'}{else}{$date_from|date_format:'%d-%m-%Y'}{/if}" readonly/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group date_range_type" {if isset($objFeaturePrice->date_selection_type) && $objFeaturePrice->date_selection_type == HotelRoomTypeFeaturePricing::DATE_SELECTION_TYPE_SPECIFIC}style="display:none;"{/if}>
|
||||
<div class="form-group date_range_type" {if (isset($objFeaturePrice->date_selection_type) && $objFeaturePrice->date_selection_type == HotelRoomTypeFeaturePricing::DATE_SELECTION_TYPE_SPECIFIC) || (isset($smarty.post.date_selection_type) && $smarty.post.date_selection_type != HotelRoomTypeFeaturePricing::DATE_SELECTION_TYPE_RANGE)}style="display:none;"{/if}>
|
||||
<label class="col-sm-3 control-label required" for="date_to" >
|
||||
{l s='Date To' mod='hotelreservationsystem'}
|
||||
</label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" id="feature_plan_date_to" name="date_to" class="form-control datepicker-input" value="{if isset($objFeaturePrice->date_to)}{$objFeaturePrice->date_to|date_format:'%d-%m-%Y'}{else}{$date_to|date_format:'%d-%m-%Y'}{/if}" readonly/>
|
||||
<input type="text" id="feature_plan_date_to" name="date_to" class="form-control datepicker-input" value="{if isset($smarty.post.date_to) && $smarty.post.date_to}{$smarty.post.date_to}{elseif isset($objFeaturePrice->date_to)}{$objFeaturePrice->date_to|date_format:'%d-%m-%Y'}{else}{$date_to|date_format:'%d-%m-%Y'}{/if}" readonly/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group special_days_content" {if isset($objFeaturePrice->date_selection_type) && $objFeaturePrice->date_selection_type == HotelRoomTypeFeaturePricing::DATE_SELECTION_TYPE_SPECIFIC}style="display:none;"{/if}>
|
||||
<div class="form-group special_days_content" {if (isset($objFeaturePrice->date_selection_type) && $objFeaturePrice->date_selection_type == HotelRoomTypeFeaturePricing::DATE_SELECTION_TYPE_SPECIFIC) || (isset($smarty.post.date_selection_type) && $smarty.post.date_selection_type != HotelRoomTypeFeaturePricing::DATE_SELECTION_TYPE_RANGE)}style="display:none;"{/if}>
|
||||
<label class="control-label col-lg-3">
|
||||
<span class="label-tooltip" data-toggle="tooltip" data-html="true" title="" data-original-title="{l s='Enable this option to restrict this rule to specific week days (for example, weekends) of the selected date range. If disabled, rule will be applicable to all week days.' mod='hotelreservationsystem'}">
|
||||
{l s='Restrict to Week Days' mod='hotelreservationsystem'}
|
||||
@@ -139,7 +139,7 @@
|
||||
<span class="switch prestashop-switch fixed-width-lg">
|
||||
<input type="radio" {if isset($smarty.post.is_special_days_exists) && $smarty.post.is_special_days_exists == 1}checked="checked"{elseif isset($edit) && $objFeaturePrice->is_special_days_exists == 1}checked="checked"{/if} value="1" id="is_special_days_exists_on" name="is_special_days_exists">
|
||||
<label for="is_special_days_exists_on">{l s='Yes' mod='hotelreservationsystem'}</label>
|
||||
<input {if isset($edit) && $objFeaturePrice->is_special_days_exists == 0} checked="checked" {elseif !isset($smarty.post.is_special_days_exists) && !isset($edit)}checked="checked"{/if} type="radio" value="0" id="is_special_days_exists_off" name="is_special_days_exists">
|
||||
<input {if isset($smarty.post.is_special_days_exists) && $smarty.post.is_special_days_exists == 0} checked="checked" {elseif isset($edit) && $objFeaturePrice->is_special_days_exists == 0} checked="checked"{/if} type="radio" value="0" id="is_special_days_exists_off" name="is_special_days_exists">
|
||||
<label for="is_special_days_exists_off">{l s='No' mod='hotelreservationsystem'}</label>
|
||||
<a class="slide-button btn"></a>
|
||||
</span>
|
||||
@@ -147,7 +147,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group week_days" {if (isset($smarty.post.is_special_days_exists) && $smarty.post.is_special_days_exists) || (isset($objFeaturePrice->is_special_days_exists) && $objFeaturePrice->is_special_days_exists)}style="display:block;"{/if}>
|
||||
<label for="Price Impact Way" class="control-label col-lg-3">
|
||||
<label for="special_days" class="control-label col-lg-3">
|
||||
{l s='Select Week Days' mod='hotelreservationsystem'}
|
||||
</label>
|
||||
<div class="col-lg-3 checkboxes-wrap">
|
||||
@@ -216,13 +216,13 @@
|
||||
</label>
|
||||
<div class="col-lg-3">
|
||||
<select class="form-control" name="price_impact_way" id="price_impact_way">
|
||||
<option value="{HotelRoomTypeFeaturePricing::IMPACT_WAY_DECREASE}" {if isset($objFeaturePrice->impact_way) && $objFeaturePrice->impact_way == HotelRoomTypeFeaturePricing::IMPACT_WAY_DECREASE}selected = "selected"{/if}>
|
||||
<option value="{HotelRoomTypeFeaturePricing::IMPACT_WAY_DECREASE}" {if (isset($smarty.post.price_impact_way) && $smarty.post.price_impact_way == HotelRoomTypeFeaturePricing::IMPACT_WAY_DECREASE) || (isset($objFeaturePrice->impact_way) && $objFeaturePrice->impact_way == HotelRoomTypeFeaturePricing::IMPACT_WAY_DECREASE && !isset($smarty.post.price_impact_way))}selected = "selected"{/if}>
|
||||
{l s='Decrease Price' mod='hotelreservationsystem'}
|
||||
</option>
|
||||
<option value="{HotelRoomTypeFeaturePricing::IMPACT_WAY_INCREASE}" {if isset($objFeaturePrice->impact_way) && $objFeaturePrice->impact_way == HotelRoomTypeFeaturePricing::IMPACT_WAY_INCREASE}selected = "selected"{/if}>
|
||||
<option value="{HotelRoomTypeFeaturePricing::IMPACT_WAY_INCREASE}" {if (isset($smarty.post.price_impact_way) && $smarty.post.price_impact_way == HotelRoomTypeFeaturePricing::IMPACT_WAY_INCREASE) || (isset($objFeaturePrice->impact_way) && $objFeaturePrice->impact_way == HotelRoomTypeFeaturePricing::IMPACT_WAY_INCREASE && !isset($smarty.post.price_impact_way))}selected = "selected"{/if}>
|
||||
{l s='Increase Price' mod='hotelreservationsystem'}
|
||||
</option>
|
||||
<option value="{HotelRoomTypeFeaturePricing::IMPACT_WAY_FIX_PRICE}" {if isset($objFeaturePrice->impact_way) && $objFeaturePrice->impact_way == HotelRoomTypeFeaturePricing::IMPACT_WAY_FIX_PRICE}selected = "selected"{/if}>
|
||||
<option value="{HotelRoomTypeFeaturePricing::IMPACT_WAY_FIX_PRICE}" {if (isset($smarty.post.price_impact_way) && $smarty.post.price_impact_way == HotelRoomTypeFeaturePricing::IMPACT_WAY_FIX_PRICE) || (isset($objFeaturePrice->impact_way) && $objFeaturePrice->impact_way == HotelRoomTypeFeaturePricing::IMPACT_WAY_FIX_PRICE && !isset($smarty.post.price_impact_way))}selected = "selected"{/if}>
|
||||
{l s='Fixed Price' mod='hotelreservationsystem'}
|
||||
</option>
|
||||
</select>
|
||||
@@ -234,11 +234,11 @@
|
||||
{l s='Impact Type :' mod='hotelreservationsystem'}
|
||||
</label>
|
||||
<div class="col-lg-3">
|
||||
<select class="form-control" name="price_impact_type" id="price_impact_type" {if isset($objFeaturePrice->impact_way) && $objFeaturePrice->impact_way == HotelRoomTypeFeaturePricing::IMPACT_WAY_FIX_PRICE}disabled="disabled"{/if}>
|
||||
<option value="{HotelRoomTypeFeaturePricing::IMPACT_TYPE_PERCENTAGE}" {if isset($objFeaturePrice->impact_type) && $objFeaturePrice->impact_type == HotelRoomTypeFeaturePricing::IMPACT_TYPE_PERCENTAGE}selected = "selected"{/if}>
|
||||
<select class="form-control" name="price_impact_type" id="price_impact_type" {if (isset($smarty.post.price_impact_way) && $smarty.post.price_impact_way == HotelRoomTypeFeaturePricing::IMPACT_WAY_FIX_PRICE) || (isset($objFeaturePrice->impact_way) && $objFeaturePrice->impact_way == HotelRoomTypeFeaturePricing::IMPACT_WAY_FIX_PRICE && !isset($smarty.post.price_impact_way))}disabled="disabled"{/if}>
|
||||
<option value="{HotelRoomTypeFeaturePricing::IMPACT_TYPE_PERCENTAGE}" {if (isset($smarty.post.price_impact_type) && $smarty.post.price_impact_type == HotelRoomTypeFeaturePricing::IMPACT_TYPE_PERCENTAGE) || (isset($objFeaturePrice->impact_type) && $objFeaturePrice->impact_type == HotelRoomTypeFeaturePricing::IMPACT_TYPE_PERCENTAGE && !isset($smarty.post.price_impact_type))}selected = "selected"{/if}>
|
||||
{l s='Percentage' mod='hotelreservationsystem'}
|
||||
</option>
|
||||
<option value="{HotelRoomTypeFeaturePricing::IMPACT_TYPE_FIXED_PRICE}" {if isset($objFeaturePrice->impact_type) && $objFeaturePrice->impact_type == HotelRoomTypeFeaturePricing::IMPACT_TYPE_FIXED_PRICE}selected = "selected"{/if}>
|
||||
<option value="{HotelRoomTypeFeaturePricing::IMPACT_TYPE_FIXED_PRICE}" {if (isset($smarty.post.price_impact_way) && $smarty.post.price_impact_way == HotelRoomTypeFeaturePricing::IMPACT_WAY_FIX_PRICE) || (isset($objFeaturePrice->impact_way) && $objFeaturePrice->impact_way == HotelRoomTypeFeaturePricing::IMPACT_WAY_FIX_PRICE && !isset($smarty.post.price_impact_way)) || (isset($smarty.post.price_impact_type) && $smarty.post.price_impact_type == HotelRoomTypeFeaturePricing::IMPACT_TYPE_FIXED_PRICE) || (isset($objFeaturePrice->impact_type) && $objFeaturePrice->impact_type == HotelRoomTypeFeaturePricing::IMPACT_TYPE_FIXED_PRICE && !isset($smarty.post.price_impact_type))}selected = "selected"{/if}>
|
||||
{l s='Amount' mod='hotelreservationsystem'}
|
||||
</option>
|
||||
</select>
|
||||
|
||||
Reference in New Issue
Block a user