//added active field on carrier wizard
This commit is contained in:
@@ -36,30 +36,35 @@
|
||||
var summary_translation_price = '<strong>{l s='according to the price' js=1}</strong>';
|
||||
var summary_translation_weight = '<strong>{l s='according to the weight' js=1}</strong>';
|
||||
</script>
|
||||
<div class="defaultForm">
|
||||
<fieldset>
|
||||
{l s='Carrier name:'} <strong id="summary_name"></strong>
|
||||
<div class="clear"> </div>
|
||||
<div id="summary_meta_informations"></div>
|
||||
<div class="clear"> </div>
|
||||
<div id="summary_shipping_cost"></div>
|
||||
<div class="clear"> </div>
|
||||
<div id="summary_range"></div>
|
||||
<div class="clear"> </div>
|
||||
<div>
|
||||
{l s='It will be displayed only for the following zones:'}
|
||||
<ul id="summary_zones"></ul>
|
||||
</div>
|
||||
<div class="clear"> </div>
|
||||
<div>
|
||||
{l s='It will be displayed only for the following groups:'}
|
||||
<ul id="summary_groups"></ul>
|
||||
</div>
|
||||
{if $is_multishop}
|
||||
<div class="clear"> </div>
|
||||
<div>
|
||||
{l s='It will be displayed only for the following shops:'}
|
||||
<ul id="summary_shops"></ul>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="clear"> </div>
|
||||
{$active_form}
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="clear"> </div>
|
||||
|
||||
<fieldset>
|
||||
{l s='Carrier name:'} <strong id="summary_name"></strong>
|
||||
<div class="clear"> </div>
|
||||
<div id="summary_meta_informations"></div>
|
||||
<div class="clear"> </div>
|
||||
<div id="summary_shipping_cost"></div>
|
||||
<div class="clear"> </div>
|
||||
<div id="summary_range"></div>
|
||||
<div class="clear"> </div>
|
||||
<div>
|
||||
{l s='It will be displayed only for the following zones:'}
|
||||
<ul id="summary_zones"></ul>
|
||||
</div>
|
||||
<div class="clear"> </div>
|
||||
<div>
|
||||
{l s='It will be displayed only for the following groups:'}
|
||||
<ul id="summary_groups"></ul>
|
||||
</div>
|
||||
{if $is_multishop}
|
||||
<div class="clear"> </div>
|
||||
<div>
|
||||
{l s='It will be displayed only for the following shops:'}
|
||||
<ul id="summary_shops"></ul>
|
||||
</div>
|
||||
{/if}
|
||||
</fieldset>
|
||||
|
||||
@@ -114,7 +114,7 @@ class AdminCarrierWizardControllerCore extends AdminController
|
||||
0 => $this->renderStepOne($carrier),
|
||||
1 => $this->renderStepThree($carrier),
|
||||
2 => $this->renderStepFour($carrier),
|
||||
3 => $this->renderStepFive(),
|
||||
3 => $this->renderStepFive($carrier),
|
||||
)),
|
||||
'labels' => array('next' => $this->l('Next'), 'previous' => $this->l('Previous'), 'finish' => $this->l('Finish'))
|
||||
);
|
||||
@@ -411,9 +411,47 @@ class AdminCarrierWizardControllerCore extends AdminController
|
||||
return $this->renderGenericForm(array('form' => $this->fields_form), $fields_value);
|
||||
}
|
||||
|
||||
public function renderStepFive()
|
||||
public function renderStepFive($carrier)
|
||||
{
|
||||
return $this->context->smarty->fetch('controllers/carrier_wizard/summary.tpl');
|
||||
$this->fields_form = array(
|
||||
'form' => array(
|
||||
'id_form' => 'step_carrier_summary',
|
||||
'input' => array(
|
||||
array(
|
||||
'type' => 'radio',
|
||||
'label' => $this->l('Status:'),
|
||||
'name' => 'active',
|
||||
'required' => false,
|
||||
'class' => 't',
|
||||
'is_bool' => true,
|
||||
'values' => array(
|
||||
array(
|
||||
'id' => 'active_on',
|
||||
'value' => 1,
|
||||
'label' => $this->l('Enabled')
|
||||
),
|
||||
array(
|
||||
'id' => 'active_off',
|
||||
'value' => 0,
|
||||
'label' => $this->l('Disabled')
|
||||
)
|
||||
),
|
||||
'desc' => $this->l('Enable the carrier in the Front Office')
|
||||
)
|
||||
)
|
||||
));
|
||||
|
||||
$template = $this->createTemplate('controllers/carrier_wizard/summary.tpl');
|
||||
|
||||
$fields_value = $this->getStepFiveFieldsValues($carrier);
|
||||
|
||||
$active_form = $this->renderGenericForm(array('form' => $this->fields_form), $fields_value);
|
||||
|
||||
$active_form = str_replace(array('<fieldset id="fieldset_form">', '</fieldset>'), '', $active_form);
|
||||
|
||||
$template->assign('active_form', $active_form);
|
||||
|
||||
return $template->fetch('controllers/carrier_wizard/summary.tpl');
|
||||
}
|
||||
|
||||
protected function getTplRangesVarsAndValues($carrier, &$tpl_vars, &$fields_value)
|
||||
@@ -516,7 +554,7 @@ class AdminCarrierWizardControllerCore extends AdminController
|
||||
public function getStepFourFieldsValues($carrier)
|
||||
{
|
||||
return array(
|
||||
'range_behavior' => $this->getFieldValue($carrier, 'shop'),
|
||||
'range_behavior' => $this->getFieldValue($carrier, 'range_behavior'),
|
||||
'max_height' => $this->getFieldValue($carrier, 'max_height'),
|
||||
'max_width' => $this->getFieldValue($carrier, 'max_width'),
|
||||
'max_depth' => $this->getFieldValue($carrier, 'max_depth'),
|
||||
@@ -525,6 +563,10 @@ class AdminCarrierWizardControllerCore extends AdminController
|
||||
);
|
||||
}
|
||||
|
||||
public function getStepFiveFieldsValues($carrier)
|
||||
{
|
||||
return array('active' => $this->getFieldValue($carrier, 'active'));
|
||||
}
|
||||
|
||||
public function ajaxProcessChangeRanges()
|
||||
{
|
||||
|
||||
@@ -2631,7 +2631,8 @@ margin-bottom:7px;
|
||||
#carrier_wizard #zones_table input[type=text] {width: 45px;}
|
||||
#carrier_wizard #fieldset_form { min-height: 190px}
|
||||
#carrier_wizard #zone_ranges label { float: none; width: inherit }
|
||||
|
||||
#carrier_wizard #step_carrier_summary label {width: 40px}
|
||||
#carrier_wizard #step_carrier_summary .margin-form {padding-left: 60px;}
|
||||
|
||||
/*** IE10 ***/
|
||||
/*@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
|
||||
|
||||
Reference in New Issue
Block a user