allow intl in coupon edition
This commit is contained in:
@@ -187,6 +187,9 @@ class CouponController extends BaseAdminController
|
|||||||
return $this->pageNotFound();
|
return $this->pageNotFound();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$coupon->setLocale($this->getCurrentEditionLocale());
|
||||||
|
|
||||||
/** @var CouponFactory $couponFactory */
|
/** @var CouponFactory $couponFactory */
|
||||||
$couponFactory = $this->container->get('thelia.coupon.factory');
|
$couponFactory = $this->container->get('thelia.coupon.factory');
|
||||||
$couponManager = $couponFactory->buildCouponFromModel($coupon);
|
$couponManager = $couponFactory->buildCouponFromModel($coupon);
|
||||||
@@ -232,7 +235,7 @@ class CouponController extends BaseAdminController
|
|||||||
'isRemovingPostage' => $coupon->getIsRemovingPostage(),
|
'isRemovingPostage' => $coupon->getIsRemovingPostage(),
|
||||||
'maxUsage' => $coupon->getMaxUsage(),
|
'maxUsage' => $coupon->getMaxUsage(),
|
||||||
'conditions' => $conditions,
|
'conditions' => $conditions,
|
||||||
'locale' => $coupon->getLocale(),
|
'locale' => $this->getCurrentEditionLocale(),
|
||||||
);
|
);
|
||||||
|
|
||||||
$args['conditions'] = $this->cleanConditionForTemplate($conditions);
|
$args['conditions'] = $this->cleanConditionForTemplate($conditions);
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
<section class="row">
|
<section class="row">
|
||||||
<form action="{$formAction}" {form_enctype form=$form} method="POST" >
|
<form action="{$formAction}" {form_enctype form=$form} method="POST" >
|
||||||
|
|
||||||
<div class="col-md-12 general-block-decorator">
|
<div class="col-md-12 general-block-decorator">
|
||||||
|
|
||||||
{form_hidden_fields form=$form}
|
{form_hidden_fields form=$form}
|
||||||
@@ -17,6 +18,14 @@
|
|||||||
|
|
||||||
<div class="span4">
|
<div class="span4">
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
|
{if !$noConditions}
|
||||||
|
{include
|
||||||
|
file = "includes/inner-form-toolbar.html"
|
||||||
|
hide_submit_buttons = false
|
||||||
|
|
||||||
|
page_url = "{url path="{$formAction}"}"
|
||||||
|
}
|
||||||
|
{/if}
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
{form_field form=$form field='code'}
|
{form_field form=$form field='code'}
|
||||||
<div class="form-group {if $error}has-error{/if}">
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
@@ -146,7 +155,9 @@
|
|||||||
</div>
|
</div>
|
||||||
{/form_field}
|
{/form_field}
|
||||||
|
|
||||||
|
{if $noConditions}
|
||||||
<button id="save-coupon-btn" type="submit" class="btn btn-default btn-primary">{intl l='Save your modifications'}</button>
|
<button id="save-coupon-btn" type="submit" class="btn btn-default btn-primary">{intl l='Save your modifications'}</button>
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user