WIP
- Coupon create
This commit is contained in:
@@ -87,14 +87,35 @@ class CouponController extends BaseAdminController
|
|||||||
|
|
||||||
if ($this->getRequest()->isMethod('POST')) {
|
if ($this->getRequest()->isMethod('POST')) {
|
||||||
try {
|
try {
|
||||||
$couponCreationForm = new CouponCreationForm($this->getRequest());
|
// Create the form from the request
|
||||||
$couponBeingCreated = $this->buildCouponFromForm(
|
$creationForm = new CouponCreationForm(Form($this->getRequest()));
|
||||||
$this->validateForm($couponCreationForm, "POST")->getData()
|
|
||||||
);
|
|
||||||
|
|
||||||
$couponCreateEvent = new CouponCreateEvent(
|
// Check the form against constraints violations
|
||||||
$couponBeingCreated
|
$form = $this->validateForm($creationForm, "POST");
|
||||||
|
|
||||||
|
// Get the form field values
|
||||||
|
$data = $form->getData();
|
||||||
|
|
||||||
|
var_dump($data);
|
||||||
|
|
||||||
|
$couponCreateEvent = new CouponCreateEvent();
|
||||||
|
$couponCreateEvent->setTitle($data['title']);
|
||||||
|
$couponCreateEvent->setShortDescription($data['shortDescription']);
|
||||||
|
$couponCreateEvent->setDescription($data['longDescription']);
|
||||||
|
$couponCreateEvent->setCode($data['code']);
|
||||||
|
$couponCreateEvent->setAmount($data['amount']);
|
||||||
|
|
||||||
|
$couponCreateEvent->setExpirationDate(
|
||||||
|
new \DateTime($data['expirationDate'])
|
||||||
);
|
);
|
||||||
|
$couponCreateEvent->setMaxUsage($data['maxUsage']);
|
||||||
|
$couponCreateEvent->setIsCumulative($data['isCumulative']);
|
||||||
|
$couponCreateEvent->setIsRemovingPostage($data['isRemovingPostage']);
|
||||||
|
$couponCreateEvent->setIsAvailableOnSpecialOffers($data['isAvailableOnSpecialOffers']);
|
||||||
|
|
||||||
|
$couponCreateEvent->setIsEnabled($data['isEnabled']);
|
||||||
|
|
||||||
|
// $couponCreateEvent->setRules($data['rules']);
|
||||||
|
|
||||||
$this->dispatch(
|
$this->dispatch(
|
||||||
TheliaEvents::CREATE_COUPON,
|
TheliaEvents::CREATE_COUPON,
|
||||||
@@ -103,14 +124,14 @@ class CouponController extends BaseAdminController
|
|||||||
$this->adminLogAppend(
|
$this->adminLogAppend(
|
||||||
sprintf(
|
sprintf(
|
||||||
'Coupon %s (ID %s) created',
|
'Coupon %s (ID %s) created',
|
||||||
$couponBeingCreated->getTitle(),
|
$couponCreateEvent->getTitle(),
|
||||||
$couponBeingCreated->getId()
|
$couponCreateEvent->getId()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
// @todo redirect if successful
|
// @todo redirect if successful
|
||||||
} catch (FormValidationException $e) {
|
} catch (FormValidationException $e) {
|
||||||
$couponCreationForm->setErrorMessage($e->getMessage());
|
$creationForm->setErrorMessage($e->getMessage());
|
||||||
$this->getParserContext()->setErrorForm($couponCreationForm);
|
$this->getParserContext()->setErrorForm($creationForm);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
Tlog::getInstance()->error(
|
Tlog::getInstance()->error(
|
||||||
sprintf(
|
sprintf(
|
||||||
@@ -124,7 +145,7 @@ class CouponController extends BaseAdminController
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->render('coupon/edit', array());
|
return $this->render('coupon/create', array('action' => 'create'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -138,7 +159,7 @@ class CouponController extends BaseAdminController
|
|||||||
{
|
{
|
||||||
$this->checkAuth("ADMIN", "admin.coupon.view");
|
$this->checkAuth("ADMIN", "admin.coupon.view");
|
||||||
|
|
||||||
return $this->render('coupon/edit', $args);
|
return $this->render('coupon/update', $args);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -24,7 +24,6 @@
|
|||||||
namespace Thelia\Core\Event\Coupon;
|
namespace Thelia\Core\Event\Coupon;
|
||||||
use Thelia\Core\Event\ActionEvent;
|
use Thelia\Core\Event\ActionEvent;
|
||||||
use Thelia\Coupon\CouponRuleCollection;
|
use Thelia\Coupon\CouponRuleCollection;
|
||||||
use Thelia\Model\Coupon;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by JetBrains PhpStorm.
|
* Created by JetBrains PhpStorm.
|
||||||
@@ -42,198 +41,6 @@ class CouponCreateEvent extends ActionEvent
|
|||||||
/** @var CouponRuleCollection Array of CouponRuleInterface */
|
/** @var CouponRuleCollection Array of CouponRuleInterface */
|
||||||
protected $rules = null;
|
protected $rules = null;
|
||||||
|
|
||||||
/**
|
|
||||||
* @param float $amount
|
|
||||||
*/
|
|
||||||
public function setAmount($amount)
|
|
||||||
{
|
|
||||||
$this->amount = $amount;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return float
|
|
||||||
*/
|
|
||||||
public function getAmount()
|
|
||||||
{
|
|
||||||
return $this->amount;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string $code
|
|
||||||
*/
|
|
||||||
public function setCode($code)
|
|
||||||
{
|
|
||||||
$this->code = $code;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function getCode()
|
|
||||||
{
|
|
||||||
return $this->code;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string $description
|
|
||||||
*/
|
|
||||||
public function setDescription($description)
|
|
||||||
{
|
|
||||||
$this->description = $description;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function getDescription()
|
|
||||||
{
|
|
||||||
return $this->description;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \DateTime $expirationDate
|
|
||||||
*/
|
|
||||||
public function setExpirationDate($expirationDate)
|
|
||||||
{
|
|
||||||
$this->expirationDate = $expirationDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return \DateTime
|
|
||||||
*/
|
|
||||||
public function getExpirationDate()
|
|
||||||
{
|
|
||||||
return $this->expirationDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param boolean $isAvailableOnSpecialOffers
|
|
||||||
*/
|
|
||||||
public function setIsAvailableOnSpecialOffers($isAvailableOnSpecialOffers)
|
|
||||||
{
|
|
||||||
$this->isAvailableOnSpecialOffers = $isAvailableOnSpecialOffers;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return boolean
|
|
||||||
*/
|
|
||||||
public function getIsAvailableOnSpecialOffers()
|
|
||||||
{
|
|
||||||
return $this->isAvailableOnSpecialOffers;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param boolean $isCumulative
|
|
||||||
*/
|
|
||||||
public function setIsCumulative($isCumulative)
|
|
||||||
{
|
|
||||||
$this->isCumulative = $isCumulative;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return boolean
|
|
||||||
*/
|
|
||||||
public function getIsCumulative()
|
|
||||||
{
|
|
||||||
return $this->isCumulative;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param boolean $isEnabled
|
|
||||||
*/
|
|
||||||
public function setIsEnabled($isEnabled)
|
|
||||||
{
|
|
||||||
$this->isEnabled = $isEnabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return boolean
|
|
||||||
*/
|
|
||||||
public function getIsEnabled()
|
|
||||||
{
|
|
||||||
return $this->isEnabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param boolean $isRemovingPostage
|
|
||||||
*/
|
|
||||||
public function setIsRemovingPostage($isRemovingPostage)
|
|
||||||
{
|
|
||||||
$this->isRemovingPostage = $isRemovingPostage;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return boolean
|
|
||||||
*/
|
|
||||||
public function getIsRemovingPostage()
|
|
||||||
{
|
|
||||||
return $this->isRemovingPostage;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param int $maxUsage
|
|
||||||
*/
|
|
||||||
public function setMaxUsage($maxUsage)
|
|
||||||
{
|
|
||||||
$this->maxUsage = $maxUsage;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return int
|
|
||||||
*/
|
|
||||||
public function getMaxUsage()
|
|
||||||
{
|
|
||||||
return $this->maxUsage;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \Thelia\Coupon\CouponRuleCollection $rules
|
|
||||||
*/
|
|
||||||
public function setRules($rules)
|
|
||||||
{
|
|
||||||
$this->rules = $rules;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return \Thelia\Coupon\CouponRuleCollection
|
|
||||||
*/
|
|
||||||
public function getRules()
|
|
||||||
{
|
|
||||||
return $this->rules;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string $shortDescription
|
|
||||||
*/
|
|
||||||
public function setShortDescription($shortDescription)
|
|
||||||
{
|
|
||||||
$this->shortDescription = $shortDescription;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function getShortDescription()
|
|
||||||
{
|
|
||||||
return $this->shortDescription;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string $title
|
|
||||||
*/
|
|
||||||
public function setTitle($title)
|
|
||||||
{
|
|
||||||
$this->title = $title;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function getTitle()
|
|
||||||
{
|
|
||||||
return $this->title;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @var string Coupon code (ex: XMAS) */
|
/** @var string Coupon code (ex: XMAS) */
|
||||||
protected $code = null;
|
protected $code = null;
|
||||||
|
|
||||||
@@ -267,4 +74,301 @@ class CouponCreateEvent extends ActionEvent
|
|||||||
/** @var bool if Coupon is available for Products already on special offers */
|
/** @var bool if Coupon is available for Products already on special offers */
|
||||||
protected $isAvailableOnSpecialOffers = false;
|
protected $isAvailableOnSpecialOffers = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return Coupon code (ex: XMAS)
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getCode()
|
||||||
|
{
|
||||||
|
return $this->code;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return Coupon title (ex: Coupon for XMAS)
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getTitle()
|
||||||
|
{
|
||||||
|
return $this->title;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return Coupon short description
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getShortDescription()
|
||||||
|
{
|
||||||
|
return $this->shortDescription;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return Coupon description
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getDescription()
|
||||||
|
{
|
||||||
|
return $this->description;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If Coupon is cumulative or prevent any accumulation
|
||||||
|
* If is cumulative you can sum Coupon effects
|
||||||
|
* If not cancel all other Coupon and take the last given
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function isCumulative()
|
||||||
|
{
|
||||||
|
return $this->isCumulative;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If Coupon is removing Checkout Postage
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function isRemovingPostage()
|
||||||
|
{
|
||||||
|
return $this->isRemovingPostage;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return effects generated by the coupon
|
||||||
|
*
|
||||||
|
* @return float Amount removed from the Total Checkout
|
||||||
|
*/
|
||||||
|
public function getAmount()
|
||||||
|
{
|
||||||
|
return $this->amount;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return condition to validate the Coupon or not
|
||||||
|
*
|
||||||
|
* @return CouponRuleCollection
|
||||||
|
*/
|
||||||
|
public function getRules()
|
||||||
|
{
|
||||||
|
return clone $this->rules;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set effects generated by the coupon
|
||||||
|
*
|
||||||
|
* @param float $amount Amount removed from the Total Checkout
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setAmount($amount)
|
||||||
|
{
|
||||||
|
$this->amount = $amount;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set Coupon Code
|
||||||
|
*
|
||||||
|
* @param string $code Coupon Code
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setCode($code)
|
||||||
|
{
|
||||||
|
$this->code = $code;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set Coupon description
|
||||||
|
*
|
||||||
|
* @param string $description Coupon description
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setDescription($description)
|
||||||
|
{
|
||||||
|
$this->description = $description;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set Coupon expiration date (date given considered as expired)
|
||||||
|
*
|
||||||
|
* @param \DateTime $expirationDate Coupon expiration date
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setExpirationDate($expirationDate)
|
||||||
|
{
|
||||||
|
$this->expirationDate = $expirationDate;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return Coupon expiration date
|
||||||
|
*
|
||||||
|
* @return \DateTime
|
||||||
|
*/
|
||||||
|
public function getExpirationDate()
|
||||||
|
{
|
||||||
|
return clone $this->expirationDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set if Coupon is available on special offers
|
||||||
|
*
|
||||||
|
* @param boolean $isAvailableOnSpecialOffers is available on special offers
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setIsAvailableOnSpecialOffers($isAvailableOnSpecialOffers)
|
||||||
|
{
|
||||||
|
$this->isAvailableOnSpecialOffers = $isAvailableOnSpecialOffers;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If Coupon is available on special offers
|
||||||
|
*
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
public function getIsAvailableOnSpecialOffers()
|
||||||
|
{
|
||||||
|
return $this->isAvailableOnSpecialOffers;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set if the Coupon is cumulative with other Coupons or not
|
||||||
|
*
|
||||||
|
* @param boolean $isCumulative is cumulative
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setIsCumulative($isCumulative)
|
||||||
|
{
|
||||||
|
$this->isCumulative = $isCumulative;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enable/Disable the Coupon
|
||||||
|
*
|
||||||
|
* @param boolean $isEnabled Enable/Disable
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setIsEnabled($isEnabled)
|
||||||
|
{
|
||||||
|
$this->isEnabled = $isEnabled;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get if Coupon is enabled or not
|
||||||
|
*
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
public function isEnabled()
|
||||||
|
{
|
||||||
|
return $this->isEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set if Coupon is removing Postage
|
||||||
|
*
|
||||||
|
* @param boolean $isRemovingPostage is removing Postage
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setIsRemovingPostage($isRemovingPostage)
|
||||||
|
{
|
||||||
|
$this->isRemovingPostage = $isRemovingPostage;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set how many time a coupon can be used (-1 : unlimited)
|
||||||
|
*
|
||||||
|
* @param int $maxUsage Coupon quantity
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setMaxUsage($maxUsage)
|
||||||
|
{
|
||||||
|
$this->maxUsage = $maxUsage;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return how many time the Coupon can be used again
|
||||||
|
* Ex : -1 unlimited
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
public function getMaxUsage()
|
||||||
|
{
|
||||||
|
return $this->maxUsage;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Replace the existing Rules by those given in parameter
|
||||||
|
* If one Rule is badly implemented, no Rule will be added
|
||||||
|
*
|
||||||
|
* @param CouponRuleCollection $rules CouponRuleInterface to add
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
* @throws \Thelia\Exception\InvalidRuleException
|
||||||
|
*/
|
||||||
|
public function setRules(CouponRuleCollection $rules)
|
||||||
|
{
|
||||||
|
$this->rules = $rules;
|
||||||
|
$this->constraintManager = new ConstraintManager(
|
||||||
|
$this->adapter,
|
||||||
|
$this->rules
|
||||||
|
);
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set Coupon short description
|
||||||
|
*
|
||||||
|
* @param string $shortDescription Coupon short description
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setShortDescription($shortDescription)
|
||||||
|
{
|
||||||
|
$this->shortDescription = $shortDescription;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set Coupon title
|
||||||
|
*
|
||||||
|
* @param string $title Coupon title
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setTitle($title)
|
||||||
|
{
|
||||||
|
$this->title = $title;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
5
templates/admin/default/coupon/create.html
Executable file
5
templates/admin/default/coupon/create.html
Executable file
@@ -0,0 +1,5 @@
|
|||||||
|
{check_auth context="admin" roles="ADMIN" permissions="admin.coupon.create" login_tpl="/admin/login"}
|
||||||
|
|
||||||
|
{$page_title={intl l='Coupon creation'}}
|
||||||
|
|
||||||
|
{include file='coupon/includes/edit.html'}
|
||||||
@@ -1,313 +0,0 @@
|
|||||||
{check_auth context="admin" roles="ADMIN" permissions="admin.coupon.view" login_tpl="/admin/login"}
|
|
||||||
|
|
||||||
{$page_title={intl l='Coupon'}}
|
|
||||||
|
|
||||||
{$thelia_page_css_file = "assets/bootstrap-editable/css/bootstrap-editable.css"}
|
|
||||||
|
|
||||||
{include file='includes/header.inc.html'}
|
|
||||||
|
|
||||||
<section id="wrapper" class="container">
|
|
||||||
|
|
||||||
<nav>
|
|
||||||
<ul class="breadcrumb">
|
|
||||||
{include file="includes/coupon_breadcrumb.html"}
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<div class="page-header">
|
|
||||||
<h1>Coupons : <small>Add a coupon</small></h1>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<form action="#" method="post">
|
|
||||||
|
|
||||||
<section class="row-fluid">
|
|
||||||
<div class="span12 general-block-decorator">
|
|
||||||
|
|
||||||
<div class="span4">
|
|
||||||
<div class="control-group">
|
|
||||||
<label for="code">Code :</label>
|
|
||||||
<input id="code" type="text" name="code" placeholder="code">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="control-group">
|
|
||||||
<label for="title">Title :</label>
|
|
||||||
<input id="title" type="text" name="title" placeholder="title">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="control-group">
|
|
||||||
<label for="enabled" class="checkbox">
|
|
||||||
<input id="enabled" type="checkbox" name="isEnabled" value="1" checked>
|
|
||||||
Is enabled ?
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="control-group">
|
|
||||||
<label for="available-on-special-offers" class="checkbox">
|
|
||||||
<input id="available-on-special-offers" type="checkbox" name="isAvailableOnSpecialOffers" value="1">
|
|
||||||
Is available on special offers ?
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="control-group">
|
|
||||||
<label for="cumulative" class="checkbox">
|
|
||||||
<input id="cumulative" type="checkbox" name="isCumulative" value="1">
|
|
||||||
Is cumulative ?
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="control-group">
|
|
||||||
<label for="renoving-postage" class="checkbox">
|
|
||||||
<input id="renoving-postage" type="checkbox" name="isRemovingPostage" value="1">
|
|
||||||
Is renoving postage ?
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="control-group">
|
|
||||||
<label for="expiration-date">Expiration date :</label>
|
|
||||||
<div class="input-append date" data-date="12/02/2012" data-date-format="dd/mm/yyyy">
|
|
||||||
<input type="text" id="expiration-date" name="expirationDate" value="12/02/2012">
|
|
||||||
<span class="add-on"><span class="icon-th"></span></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="control-group">
|
|
||||||
<label for="max-usage">Max usage :</label>
|
|
||||||
<label for="is-unlimited" class="checkbox">
|
|
||||||
<input id="is-unlimited" type="checkbox" name="isUnlimited" value="1" checked>
|
|
||||||
Is unlimited ?
|
|
||||||
</label>
|
|
||||||
<input id="max-usage" type="text" name="maxUsage" placeholder="max usage">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="span8">
|
|
||||||
<div class="well clearfix">
|
|
||||||
<div class="span6">
|
|
||||||
<div class="control-group">
|
|
||||||
<label for="effect">Effect :</label>
|
|
||||||
<select name="effect" id="effect" class="span12">
|
|
||||||
<option value="1" data-description="More description n°1 about item">Remove x percents for category Y</option>
|
|
||||||
<option value="2" data-description="More description n°2 about item">Remove x percents</option>
|
|
||||||
<option value="3" data-description="More description n°3 about item">Remove x amount</option>
|
|
||||||
</select>
|
|
||||||
<span class="help-block">More description n°1 about item</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="span6">
|
|
||||||
<div class="control-group">
|
|
||||||
<label for="amount">Amount :</label>
|
|
||||||
<input id="amount" type="text" name="amount" placeholder="amount">
|
|
||||||
</div>
|
|
||||||
<div class="control-group">
|
|
||||||
<label for="category">Category :</label>
|
|
||||||
<select name="category" id="category">
|
|
||||||
<option value="1">Category 1</option>
|
|
||||||
<option value="1">Category 2</option>
|
|
||||||
<option value="1">Category 3</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="control-group">
|
|
||||||
<label for="short-description">Short description :</label>
|
|
||||||
<textarea id="short-description" name="shortDescription" placeholder="short description" class="span12" rows="5"></textarea>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="clearfix"></div>
|
|
||||||
|
|
||||||
<div class="control-group">
|
|
||||||
<label for="long-description">Long description :</label>
|
|
||||||
<textarea id="long-description" name="longDescription" placeholder="long description" class="span12 wysiwyg" rows="10"></textarea>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<button type="submit" class="btn btn-primary">Save</button>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="row-fluid">
|
|
||||||
<div class="span12 general-block-decorator">
|
|
||||||
<table class="table table-striped">
|
|
||||||
<caption class="clearfix">
|
|
||||||
Rules
|
|
||||||
<a class="btn btn-primary pull-right" title="Add a new rule">
|
|
||||||
<span class="icon-plus-sign icon-white"></span>
|
|
||||||
</a>
|
|
||||||
</caption>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Conditions</th>
|
|
||||||
<th>Operator</th>
|
|
||||||
<th>Value</th>
|
|
||||||
<th>Actions</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>Total Amount</td>
|
|
||||||
<td><span class="label">is superior or equals to</span></td>
|
|
||||||
<td>300 €</td>
|
|
||||||
<td>
|
|
||||||
<a href="#url" class="btn btn-primary btn-medium"><span class="icon-edit icon-white"></span> Edit</a>
|
|
||||||
<a href="#url" class="btn btn-danger btn-medium" data-toggle="confirm" data-target="#delete"><span class="icon-remove icon-white"></span> Delete</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><span class="label">AND</span> NbArticleFromCategory</td>
|
|
||||||
<td><span class="label">is equals to</span></td>
|
|
||||||
<td>12 - <a href="#" target="_blank">Chaussettes rouges</a></td>
|
|
||||||
<td>
|
|
||||||
<a href="#url" class="btn btn-primary btn-medium"><span class="icon-edit icon-white"></span> Edit</a>
|
|
||||||
<a href="#url" class="btn btn-danger btn-medium" data-toggle="confirm" data-target="#delete"><span class="icon-remove icon-white"></span> Delete</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><span class="label label-info">OR</span> Date</td>
|
|
||||||
<td><span class="label">is inferior or equals to</span></td>
|
|
||||||
<td>12/02/2014</td>
|
|
||||||
<td>
|
|
||||||
<a href="#url" class="btn btn-primary btn-medium"><span class="icon-edit icon-white"></span> Edit</a>
|
|
||||||
<a href="#url" class="btn btn-danger btn-medium" data-toggle="confirm" data-target="#delete"><span class="icon-remove icon-white"></span> Delete</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="row-fluid">
|
|
||||||
<div class="span12 general-block-decorator">
|
|
||||||
|
|
||||||
<div class="control-group span2">
|
|
||||||
<label for="type">Condition type :</label>
|
|
||||||
<label class="radio">
|
|
||||||
<input type="radio" name="type" id="type" value="1" checked> And
|
|
||||||
</label>
|
|
||||||
<label class="radio">
|
|
||||||
<input type="radio" name="type" value="2"> Or
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="control-group span4">
|
|
||||||
<label for="category-rule">Rule's category :</label>
|
|
||||||
<select name="categoryRule" id="category-rule">
|
|
||||||
<option value="1" selected>Total amount</option>
|
|
||||||
<option value="2">Date</option>
|
|
||||||
<option value="3">NbArtFromCategory</option>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<label for="category-rule">Rule's category :</label>
|
|
||||||
<select name="categoryRule" id="category-rule">
|
|
||||||
<option value="1">Total amount</option>
|
|
||||||
<option value="2" selected>Date</option>
|
|
||||||
<option value="3">NbArtFromCategory</option>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<label for="category-rule">Rule's category :</label>
|
|
||||||
<select name="categoryRule" id="category-rule">
|
|
||||||
<option value="1">Total amount</option>
|
|
||||||
<option value="2">Date</option>
|
|
||||||
<option value="3" selected>NbArtFromCategory</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="control-group span6">
|
|
||||||
<label for="operator">Operator :</label>
|
|
||||||
<div class="controls">
|
|
||||||
<select name="operator" id="operator">
|
|
||||||
<option value="1">is superior to</option>
|
|
||||||
<option value="2">equals to</option>
|
|
||||||
<option value="3">is inferior to</option>
|
|
||||||
<option value="4">is inferior or equals to</option>
|
|
||||||
<option value="5">is superior or equals to</option>
|
|
||||||
</select>
|
|
||||||
<div class="input-append input-prepend">
|
|
||||||
<span class="add-on">€</span>
|
|
||||||
<input type="text" name="value" class="input-mini">
|
|
||||||
<button class="add-on btn btn-primary"><span class="icon-plus icon-white"></span></button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<label for="operator">Operator :</label>
|
|
||||||
<div class="controls">
|
|
||||||
<select name="operator" id="operator">
|
|
||||||
<option value="1">is superior to</option>
|
|
||||||
<option value="2">equals to</option>
|
|
||||||
<option value="3">is inferior to</option>
|
|
||||||
<option value="4">is inferior or equals to</option>
|
|
||||||
<option value="5">is superior or equals to</option>
|
|
||||||
</select>
|
|
||||||
<div class="input-append input-prepend date" data-date="12/02/2012" data-date-format="dd/mm/yyyy">
|
|
||||||
<span class="add-on"><span class="icon-th"></span></span>
|
|
||||||
<input type="text" name="value" class="input-mini">
|
|
||||||
<button class="add-on btn btn-primary"><span class="icon-plus icon-white"></span></button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<label for="operator">Operator :</label>
|
|
||||||
<div class="controls">
|
|
||||||
<select name="operator" id="operator">
|
|
||||||
<option value="1">is superior to</option>
|
|
||||||
<option value="2">equals to</option>
|
|
||||||
<option value="3">is inferior to</option>
|
|
||||||
<option value="4">is inferior or equals to</option>
|
|
||||||
<option value="5">is superior or equals to</option>
|
|
||||||
</select>
|
|
||||||
<input type="text" name="value" class="input-mini">
|
|
||||||
|
|
||||||
<table class="table table-bordered">
|
|
||||||
<tr>
|
|
||||||
<td id="minibrowser-breadcrumb"></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th><span class="icon-th-list"></span> Categories list</th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td id="minibrowser-categories"></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
</form>
|
|
||||||
|
|
||||||
</section> <!-- #wrapper -->
|
|
||||||
|
|
||||||
<aside id="delete" class="modal hide fade" role="dialog">
|
|
||||||
<div class="modal-header">
|
|
||||||
<h3>Confirmation</h3>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<p>Do you really want to delete this element?</p>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button class="btn btn-inverse" data-dismiss="modal">Cancel</button>
|
|
||||||
<a href="#" class="btn btn-success" data-confirm="confirm">Confirm</a>
|
|
||||||
</div>
|
|
||||||
</aside> <!-- #delete / Delete confirmation -->
|
|
||||||
|
|
||||||
{include file='includes/js.inc.html'}
|
|
||||||
|
|
||||||
{javascripts file='../assets/bootstrap-datepicker/js/bootstrap-datepicker.js'}
|
|
||||||
<script src="{$asset_url}"></script>
|
|
||||||
{/javascripts}
|
|
||||||
|
|
||||||
{javascripts file='../assets/js/main.js'}
|
|
||||||
<script src="{$asset_url}"></script>
|
|
||||||
{/javascripts}
|
|
||||||
|
|
||||||
<script>
|
|
||||||
$(function($){
|
|
||||||
miniBrowser(0, '/test_to_remove/datas_coupon_edit.json');
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
{include file='includes/footer.inc.html'}
|
|
||||||
311
templates/admin/default/coupon/includes/edit.html
Normal file
311
templates/admin/default/coupon/includes/edit.html
Normal file
@@ -0,0 +1,311 @@
|
|||||||
|
|
||||||
|
|
||||||
|
{$thelia_page_css_file = "assets/bootstrap-editable/css/bootstrap-editable.css"}
|
||||||
|
|
||||||
|
{include file='includes/header.inc.html'}
|
||||||
|
|
||||||
|
<section id="wrapper" class="container">
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<ul class="breadcrumb">
|
||||||
|
{include file="includes/coupon_breadcrumb.html"}
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<div class="page-header">
|
||||||
|
<h1>Coupons : <small>Add a coupon</small></h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<form action="#" method="post">
|
||||||
|
|
||||||
|
<section class="row-fluid">
|
||||||
|
<div class="span12 general-block-decorator">
|
||||||
|
|
||||||
|
<div class="span4">
|
||||||
|
<div class="control-group">
|
||||||
|
<label for="code">Code :</label>
|
||||||
|
<input id="code" type="text" name="code" placeholder="code">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="control-group">
|
||||||
|
<label for="title">Title :</label>
|
||||||
|
<input id="title" type="text" name="title" placeholder="title">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="control-group">
|
||||||
|
<label for="enabled" class="checkbox">
|
||||||
|
<input id="enabled" type="checkbox" name="isEnabled" value="1" checked>
|
||||||
|
Is enabled ?
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="control-group">
|
||||||
|
<label for="available-on-special-offers" class="checkbox">
|
||||||
|
<input id="available-on-special-offers" type="checkbox" name="isAvailableOnSpecialOffers" value="1">
|
||||||
|
Is available on special offers ?
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="control-group">
|
||||||
|
<label for="cumulative" class="checkbox">
|
||||||
|
<input id="cumulative" type="checkbox" name="isCumulative" value="1">
|
||||||
|
Is cumulative ?
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="control-group">
|
||||||
|
<label for="renoving-postage" class="checkbox">
|
||||||
|
<input id="renoving-postage" type="checkbox" name="isRemovingPostage" value="1">
|
||||||
|
Is renoving postage ?
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="control-group">
|
||||||
|
<label for="expiration-date">Expiration date :</label>
|
||||||
|
<div class="input-append date" data-date="12/02/2012" data-date-format="dd/mm/yyyy">
|
||||||
|
<input type="text" id="expiration-date" name="expirationDate" value="12/02/2012">
|
||||||
|
<span class="add-on"><span class="icon-th"></span></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="control-group">
|
||||||
|
<label for="max-usage">Max usage :</label>
|
||||||
|
<label for="is-unlimited" class="checkbox">
|
||||||
|
<input id="is-unlimited" type="checkbox" name="isUnlimited" value="1" checked>
|
||||||
|
Is unlimited ?
|
||||||
|
</label>
|
||||||
|
<input id="max-usage" type="text" name="maxUsage" placeholder="max usage">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="span8">
|
||||||
|
<div class="well clearfix">
|
||||||
|
<div class="span6">
|
||||||
|
<div class="control-group">
|
||||||
|
<label for="effect">Effect :</label>
|
||||||
|
<select name="effect" id="effect" class="span12">
|
||||||
|
<option value="1" data-description="More description n°1 about item">Remove x percents for category Y</option>
|
||||||
|
<option value="2" data-description="More description n°2 about item">Remove x percents</option>
|
||||||
|
<option value="3" data-description="More description n°3 about item">Remove x amount</option>
|
||||||
|
</select>
|
||||||
|
<span class="help-block">More description n°1 about item</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="span6">
|
||||||
|
<div class="control-group">
|
||||||
|
<label for="amount">Amount :</label>
|
||||||
|
<input id="amount" type="text" name="amount" placeholder="amount">
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label for="category">Category :</label>
|
||||||
|
<select name="category" id="category">
|
||||||
|
<option value="1">Category 1</option>
|
||||||
|
<option value="1">Category 2</option>
|
||||||
|
<option value="1">Category 3</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="control-group">
|
||||||
|
<label for="short-description">Short description :</label>
|
||||||
|
<textarea id="short-description" name="shortDescription" placeholder="short description" class="span12" rows="5"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="clearfix"></div>
|
||||||
|
|
||||||
|
<div class="control-group">
|
||||||
|
<label for="long-description">Long description :</label>
|
||||||
|
<textarea id="long-description" name="longDescription" placeholder="long description" class="span12 wysiwyg" rows="10"></textarea>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button type="submit" class="btn btn-primary">Save</button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="row-fluid">
|
||||||
|
<div class="span12 general-block-decorator">
|
||||||
|
<table class="table table-striped">
|
||||||
|
<caption class="clearfix">
|
||||||
|
Rules
|
||||||
|
<a class="btn btn-primary pull-right" title="Add a new rule">
|
||||||
|
<span class="icon-plus-sign icon-white"></span>
|
||||||
|
</a>
|
||||||
|
</caption>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Conditions</th>
|
||||||
|
<th>Operator</th>
|
||||||
|
<th>Value</th>
|
||||||
|
<th>Actions</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>Total Amount</td>
|
||||||
|
<td><span class="label">is superior or equals to</span></td>
|
||||||
|
<td>300 €</td>
|
||||||
|
<td>
|
||||||
|
<a href="#url" class="btn btn-primary btn-medium"><span class="icon-edit icon-white"></span> Edit</a>
|
||||||
|
<a href="#url" class="btn btn-danger btn-medium" data-toggle="confirm" data-target="#delete"><span class="icon-remove icon-white"></span> Delete</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><span class="label">AND</span> NbArticleFromCategory</td>
|
||||||
|
<td><span class="label">is equals to</span></td>
|
||||||
|
<td>12 - <a href="#" target="_blank">Chaussettes rouges</a></td>
|
||||||
|
<td>
|
||||||
|
<a href="#url" class="btn btn-primary btn-medium"><span class="icon-edit icon-white"></span> Edit</a>
|
||||||
|
<a href="#url" class="btn btn-danger btn-medium" data-toggle="confirm" data-target="#delete"><span class="icon-remove icon-white"></span> Delete</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><span class="label label-info">OR</span> Date</td>
|
||||||
|
<td><span class="label">is inferior or equals to</span></td>
|
||||||
|
<td>12/02/2014</td>
|
||||||
|
<td>
|
||||||
|
<a href="#url" class="btn btn-primary btn-medium"><span class="icon-edit icon-white"></span> Edit</a>
|
||||||
|
<a href="#url" class="btn btn-danger btn-medium" data-toggle="confirm" data-target="#delete"><span class="icon-remove icon-white"></span> Delete</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="row-fluid">
|
||||||
|
<div class="span12 general-block-decorator">
|
||||||
|
|
||||||
|
<div class="control-group span2">
|
||||||
|
<label for="type">Condition type :</label>
|
||||||
|
<label class="radio">
|
||||||
|
<input type="radio" name="type" id="type" value="1" checked> And
|
||||||
|
</label>
|
||||||
|
<label class="radio">
|
||||||
|
<input type="radio" name="type" value="2"> Or
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="control-group span4">
|
||||||
|
<label for="category-rule">Rule's category :</label>
|
||||||
|
<select name="categoryRule" id="category-rule">
|
||||||
|
<option value="1" selected>Total amount</option>
|
||||||
|
<option value="2">Date</option>
|
||||||
|
<option value="3">NbArtFromCategory</option>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<label for="category-rule">Rule's category :</label>
|
||||||
|
<select name="categoryRule" id="category-rule">
|
||||||
|
<option value="1">Total amount</option>
|
||||||
|
<option value="2" selected>Date</option>
|
||||||
|
<option value="3">NbArtFromCategory</option>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<label for="category-rule">Rule's category :</label>
|
||||||
|
<select name="categoryRule" id="category-rule">
|
||||||
|
<option value="1">Total amount</option>
|
||||||
|
<option value="2">Date</option>
|
||||||
|
<option value="3" selected>NbArtFromCategory</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="control-group span6">
|
||||||
|
<label for="operator">Operator :</label>
|
||||||
|
<div class="controls">
|
||||||
|
<select name="operator" id="operator">
|
||||||
|
<option value="1">is superior to</option>
|
||||||
|
<option value="2">equals to</option>
|
||||||
|
<option value="3">is inferior to</option>
|
||||||
|
<option value="4">is inferior or equals to</option>
|
||||||
|
<option value="5">is superior or equals to</option>
|
||||||
|
</select>
|
||||||
|
<div class="input-append input-prepend">
|
||||||
|
<span class="add-on">€</span>
|
||||||
|
<input type="text" name="value" class="input-mini">
|
||||||
|
<button class="add-on btn btn-primary"><span class="icon-plus icon-white"></span></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<label for="operator">Operator :</label>
|
||||||
|
<div class="controls">
|
||||||
|
<select name="operator" id="operator">
|
||||||
|
<option value="1">is superior to</option>
|
||||||
|
<option value="2">equals to</option>
|
||||||
|
<option value="3">is inferior to</option>
|
||||||
|
<option value="4">is inferior or equals to</option>
|
||||||
|
<option value="5">is superior or equals to</option>
|
||||||
|
</select>
|
||||||
|
<div class="input-append input-prepend date" data-date="12/02/2012" data-date-format="dd/mm/yyyy">
|
||||||
|
<span class="add-on"><span class="icon-th"></span></span>
|
||||||
|
<input type="text" name="value" class="input-mini">
|
||||||
|
<button class="add-on btn btn-primary"><span class="icon-plus icon-white"></span></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<label for="operator">Operator :</label>
|
||||||
|
<div class="controls">
|
||||||
|
<select name="operator" id="operator">
|
||||||
|
<option value="1">is superior to</option>
|
||||||
|
<option value="2">equals to</option>
|
||||||
|
<option value="3">is inferior to</option>
|
||||||
|
<option value="4">is inferior or equals to</option>
|
||||||
|
<option value="5">is superior or equals to</option>
|
||||||
|
</select>
|
||||||
|
<input type="text" name="value" class="input-mini">
|
||||||
|
|
||||||
|
<table class="table table-bordered">
|
||||||
|
<tr>
|
||||||
|
<td id="minibrowser-breadcrumb"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th><span class="icon-th-list"></span> Categories list</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td id="minibrowser-categories"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</section> <!-- #wrapper -->
|
||||||
|
|
||||||
|
<aside id="delete" class="modal hide fade" role="dialog">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h3>Confirmation</h3>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<p>Do you really want to delete this element?</p>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button class="btn btn-inverse" data-dismiss="modal">Cancel</button>
|
||||||
|
<a href="#" class="btn btn-success" data-confirm="confirm">Confirm</a>
|
||||||
|
</div>
|
||||||
|
</aside> <!-- #delete / Delete confirmation -->
|
||||||
|
|
||||||
|
{include file='includes/js.inc.html'}
|
||||||
|
|
||||||
|
{javascripts file='../../assets/bootstrap-datepicker/js/bootstrap-datepicker.js'}
|
||||||
|
<script src="{$asset_url}"></script>
|
||||||
|
{/javascripts}
|
||||||
|
|
||||||
|
{javascripts file='../../assets/js/main.js'}
|
||||||
|
<script src="{$asset_url}"></script>
|
||||||
|
{/javascripts}
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(function($){
|
||||||
|
miniBrowser(0, '/test_to_remove/datas_coupon_edit.json');
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{include file='includes/footer.inc.html'}
|
||||||
5
templates/admin/default/coupon/update.html
Executable file
5
templates/admin/default/coupon/update.html
Executable file
@@ -0,0 +1,5 @@
|
|||||||
|
{check_auth context="admin" roles="ADMIN" permissions="admin.coupon.edit" login_tpl="/admin/login"}
|
||||||
|
|
||||||
|
{$page_title={intl l='Coupon edition'}}
|
||||||
|
|
||||||
|
{include file='coupon/includes/edit.html'}
|
||||||
Reference in New Issue
Block a user