Merge pull request #210 from mespeche/master
Structure uniformization for Coupon
This commit is contained in:
@@ -13,11 +13,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{$lang_code}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>{block name="page-title"}Default Page Title{/block} - {intl l='Thelia Back Office'}</title>
|
||||
|
||||
{images file='assets/img/favicon.ico'}<link rel="shortcut icon" href="{$asset_url}" />{/images}
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
|
||||
{block name="meta"}{/block}
|
||||
|
||||
|
||||
@@ -6,132 +6,141 @@
|
||||
{block name="page-title"}{intl l='Coupons'}{/block}
|
||||
|
||||
{block name="main-content"}
|
||||
<section id="wrapper" class="container">
|
||||
<div class="coupons">
|
||||
|
||||
<nav>
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="{url path='admin/home'}">{intl l='Home'}</a></li>
|
||||
<li><a href="{url path='admin/coupon'}">{intl l='Coupon'}</a></li>
|
||||
<li>{intl l='Browse'}</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
<div class="page-header">
|
||||
<h1>{intl l='Coupons : '}<small>{intl l='List'}</small></h1>
|
||||
<a href="{$urlCreateCoupon}" class="btn btn-default btn-primary btn-medium">
|
||||
<span class="glyphicon glyphicon-add"></span> {intl l='Create a new coupon'}
|
||||
</a>
|
||||
</div>
|
||||
<nav>
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="{url path='admin/home'}">{intl l='Home'}</a></li>
|
||||
<li><a href="{url path='admin/coupon'}">{intl l='Coupon'}</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
<section class="row">
|
||||
<div class="col-md-12 general-block-decorator">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped tablesorter">
|
||||
<caption>
|
||||
{intl l='Enabled coupons'}
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{block name="coupon-label-code"}{intl l='Code'}{/block}</th>
|
||||
<th>{block name="coupon-label-title"}{intl l='Title'}{/block}</th>
|
||||
<th>{block name="coupon-label-expiration-date"}{intl l='Days before expiration'}{/block}</th>
|
||||
<th>{block name="coupon-label-usage-left"}{intl l='Usage left'}{/block}</th>
|
||||
<th class="sorter-false filter-false">{block name="coupon-label-action"}{/block}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{loop type="coupon" name="list_coupon" is_enabled="1" backend_context="true"}
|
||||
<tr>
|
||||
<td>{block name="coupon-code"}<a href="{$urlReadCoupon|replace:'0':$ID}">{$CODE}</a>{/block}</td>
|
||||
<td>{block name="coupon-title"}{$TITLE}{/block}</td>
|
||||
<td>{block name="coupon-expiration-date"}{$DAY_LEFT_BEFORE_EXPIRATION}{/block}</td>
|
||||
<td>
|
||||
{block name="coupon-usage-left"}
|
||||
{if $USAGE_LEFT == -1}
|
||||
<span class="label label-success">
|
||||
{intl l="Unlimited"}
|
||||
</span>
|
||||
{elseif $USAGE_LEFT}
|
||||
<span class="label label-success">
|
||||
{$USAGE_LEFT}
|
||||
</span>
|
||||
{else}
|
||||
<span class="label label-warning">
|
||||
0
|
||||
</span>
|
||||
{/if}
|
||||
{/block}
|
||||
</td>
|
||||
<td>
|
||||
{block name="coupon-action"}
|
||||
<a href="{$urlEditCoupon|replace:'0':$ID}" class="btn btn-default btn-primary btn-medium">
|
||||
<span class="glyphicon glyphicon-edit"></span> {intl l='Edit'}
|
||||
</a>
|
||||
{/block}
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="general-block-decorator">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-condensed" id="folder_list">
|
||||
<caption>
|
||||
{intl l='Enabled coupons'}
|
||||
|
||||
<section class="row">
|
||||
<div class="col-md-12 general-block-decorator">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped tablesorter">
|
||||
<caption>
|
||||
{intl l='Disabled coupons'}
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{block name="coupon-label-code"}{intl l='Code'}{/block}</th>
|
||||
<th>{block name="coupon-label-title"}{intl l='Title'}{/block}</th>
|
||||
<th>{block name="coupon-label-expiration-date"}{intl l='Expiration date'}{/block}</th>
|
||||
<th>{block name="coupon-label-usage-left"}{intl l='Usage left'}{/block}</th>
|
||||
<th class="sorter-false filter-false">{block name="coupon-label-action"}{/block}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{loop type="coupon" name="list_coupon" is_enabled="0" backend_context="true"}
|
||||
<tr>
|
||||
<td>{block name="coupon-code"}<a href="{$urlReadCoupon|replace:'couponId':$ID}">{$CODE}</a>{/block}</td>
|
||||
<td>{block name="coupon-title"}{$TITLE}{/block}</td>
|
||||
<td>{block name="coupon-expiration-date"}{$EXPIRATION_DATE}{/block}</td>
|
||||
<td>
|
||||
{block name="coupon-usage-left"}
|
||||
{if $USAGE_LEFT == -1}
|
||||
<span class="label label-success">
|
||||
{intl l="Unlimited"}
|
||||
</span>
|
||||
{elseif $USAGE_LEFT}
|
||||
<span class="label label-success">
|
||||
{$USAGE_LEFT}
|
||||
</span>
|
||||
{else}
|
||||
<span class="label label-warning">
|
||||
0
|
||||
</span>
|
||||
{/if}
|
||||
{/block}
|
||||
</td>
|
||||
<td>
|
||||
{block name="coupon-action"}
|
||||
<a href="{$urlEditCoupon|replace:'couponId':$ID}" class="btn btn-default btn-primary btn-medium">
|
||||
<span class="glyphicon glyphicon-edit"></span> {intl l='Edit'}
|
||||
{module_include location='coupon_list_caption'}
|
||||
|
||||
{loop type="auth" name="can_create" role="ADMIN" resource="admin.coupon" access="CREATE"}
|
||||
<a class="btn btn-default btn-primary action-btn" title="{intl l='Create a new coupon'}" href="{$urlCreateCoupon}">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||
</a>
|
||||
{/block}
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{/loop}
|
||||
</caption>
|
||||
|
||||
</section> <!-- #wrapper -->
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{block name="coupon-label-code"}{intl l='Code'}{/block}</th>
|
||||
<th>{block name="coupon-label-title"}{intl l='Title'}{/block}</th>
|
||||
<th>{block name="coupon-label-expiration-date"}{intl l='Days before expiration'}{/block}</th>
|
||||
<th>{block name="coupon-label-usage-left"}{intl l='Usage left'}{/block}</th>
|
||||
<th class="sorter-false filter-false">{block name="coupon-label-action"}{/block}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{loop type="coupon" name="list_coupon" is_enabled="1" backend_context="true"}
|
||||
<tr>
|
||||
<td>{block name="coupon-code"}<a href="{$urlReadCoupon|replace:'0':$ID}">{$CODE}</a>{/block}</td>
|
||||
<td>{block name="coupon-title"}{$TITLE}{/block}</td>
|
||||
<td>{block name="coupon-expiration-date"}{$DAY_LEFT_BEFORE_EXPIRATION}{/block}</td>
|
||||
<td>
|
||||
{block name="coupon-usage-left"}
|
||||
{if $USAGE_LEFT == -1}
|
||||
<span class="label label-success">
|
||||
{intl l="Unlimited"}
|
||||
</span>
|
||||
{elseif $USAGE_LEFT}
|
||||
<span class="label label-success">
|
||||
{$USAGE_LEFT}
|
||||
</span>
|
||||
{else}
|
||||
<span class="label label-warning">
|
||||
0
|
||||
</span>
|
||||
{/if}
|
||||
{/block}
|
||||
</td>
|
||||
<td>
|
||||
{block name="coupon-action"}
|
||||
<a href="{$urlEditCoupon|replace:'0':$ID}" class="btn btn-default btn-primary btn-medium">
|
||||
<span class="glyphicon glyphicon-edit"></span> {intl l='Edit'}
|
||||
</a>
|
||||
{/block}
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="general-block-decorator">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-condensed" id="folder_list">
|
||||
<caption>
|
||||
{intl l='Disabled coupons'}
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{block name="coupon-label-code"}{intl l='Code'}{/block}</th>
|
||||
<th>{block name="coupon-label-title"}{intl l='Title'}{/block}</th>
|
||||
<th>{block name="coupon-label-expiration-date"}{intl l='Expiration date'}{/block}</th>
|
||||
<th>{block name="coupon-label-usage-left"}{intl l='Usage left'}{/block}</th>
|
||||
<th class="sorter-false filter-false">{block name="coupon-label-action"}{/block}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{loop type="coupon" name="list_coupon" is_enabled="0" backend_context="true"}
|
||||
<tr>
|
||||
<td>{block name="coupon-code"}<a href="{$urlReadCoupon|replace:'0':$ID}">{$CODE}</a>{/block}</td>
|
||||
<td>{block name="coupon-title"}{$TITLE}{/block}</td>
|
||||
<td>{block name="coupon-expiration-date"}{$EXPIRATION_DATE}{/block}</td>
|
||||
<td>
|
||||
{block name="coupon-usage-left"}
|
||||
{if $USAGE_LEFT == -1}
|
||||
<span class="label label-success">
|
||||
{intl l="Unlimited"}
|
||||
</span>
|
||||
{elseif $USAGE_LEFT}
|
||||
<span class="label label-success">
|
||||
{$USAGE_LEFT}
|
||||
</span>
|
||||
{else}
|
||||
<span class="label label-warning">
|
||||
0
|
||||
</span>
|
||||
{/if}
|
||||
{/block}
|
||||
</td>
|
||||
<td>
|
||||
{block name="coupon-action"}
|
||||
<a href="{$urlEditCoupon|replace:'couponId':$ID}" class="btn btn-default btn-primary btn-medium">
|
||||
<span class="glyphicon glyphicon-edit"></span> {intl l='Edit'}
|
||||
</a>
|
||||
{/block}
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div> <!-- #wrapper -->
|
||||
|
||||
</div>
|
||||
|
||||
{/block}
|
||||
|
||||
|
||||
@@ -6,7 +6,10 @@
|
||||
{block name="page-title"}{intl l='Coupon'}{/block}
|
||||
|
||||
{block name="main-content"}
|
||||
<section id="wrapper" class="container">
|
||||
<div class="coupons">
|
||||
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
{loop type="coupon" name="read_coupon" id={$couponId} backend_context="true"}
|
||||
<nav>
|
||||
<ul class="breadcrumb">
|
||||
@@ -16,22 +19,18 @@
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="page-header">
|
||||
<h1>{intl l='Coupon : '}<small>{$CODE}</small></h1>
|
||||
</div>
|
||||
|
||||
<section class="row">
|
||||
<div class="col-md-12 general-block-decorator">
|
||||
|
||||
{if !$IS_ENABLED}
|
||||
<div class="alert alert-info">
|
||||
<span class="glyphicon glyphicon-question-sign"></span>
|
||||
{intl l='This coupon is disabled, you can enable at the bottom of this form.'}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="general-block-decorator">
|
||||
<div class="table-responsive">
|
||||
|
||||
{if !$IS_ENABLED}
|
||||
<div class="alert alert-info">
|
||||
<span class="glyphicon glyphicon-question-sign"></span>
|
||||
{intl l='This coupon is disabled, you can enable at the bottom of this form.'}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
@@ -142,8 +141,8 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<a href="{$urlEditCoupon}" class="btn btn-default btn-primary btn-medium">
|
||||
<span class="icon-edit icon-white"></span> {intl l='Edit'}
|
||||
<a href="{$urlEditCoupon}" class="btn btn-default btn-primary btn-medium pull-right">
|
||||
<span class="glyphicon glyphicon-edit"></span> {intl l='Edit'}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -151,11 +150,13 @@
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
{/loop}
|
||||
</section> <!-- #wrapper -->
|
||||
</div> <!-- #wrapper -->
|
||||
</div>
|
||||
|
||||
{include file='includes/confirmation-modal.html' id="enable" message="{intl l='Do you really want to enable this element ?'}"}
|
||||
{include file='includes/confirmation-modal.html' id="enable" message="{intl l='Do you really want to enable this element ?'}"}
|
||||
|
||||
{/block}
|
||||
|
||||
|
||||
@@ -6,25 +6,22 @@
|
||||
{block name="page-title"}{intl l='Update coupon'}{/block}
|
||||
|
||||
{block name="main-content"}
|
||||
<section id="wrapper" class="container">
|
||||
<div class="coupon edit-coupon">
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
<nav>
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="{url path='admin/home'}">{intl l='Home'}</a></li>
|
||||
<li><a href="{url path='admin/coupon'}">{intl l='Coupon'}</a></li>
|
||||
<li>{intl l='Update'} {$couponCode}</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<nav>
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="{url path='admin/home'}">{intl l='Home'}</a></li>
|
||||
<li><a href="{url path='admin/coupon'}">{intl l='Coupon'}</a></li>
|
||||
<li>{intl l="Editing %title" title="$couponCode"}</li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
<div class="page-header">
|
||||
<h1>{intl l='Coupons : '}<small>{intl l='Update'} {$couponCode}</small></h1>
|
||||
</div>
|
||||
|
||||
{form name="thelia.admin.coupon.creation"}
|
||||
{include file='coupon/form.html' formAction={url path={$formAction}} form=$form noConditions=false}
|
||||
{/form}
|
||||
|
||||
</section> <!-- #wrapper -->
|
||||
{form name="thelia.admin.coupon.creation"}
|
||||
{include file='coupon/form.html' formAction={url path={$formAction}} form=$form noConditions=false}
|
||||
{/form}
|
||||
</div> <!-- #wrapper -->
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block name="javascript-initialization"}
|
||||
|
||||
@@ -1,175 +1,185 @@
|
||||
{$thelia_page_css_file = "assets/bootstrap-editable/css/bootstrap-editable.css"}
|
||||
{include file='includes/notifications.html' message=$general_error}
|
||||
|
||||
<section class="row">
|
||||
<form action="{$formAction}" {form_enctype form=$form} method="POST" >
|
||||
|
||||
<div class="col-md-12 general-block-decorator">
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{form_field form=$form field='locale'}
|
||||
<input type="hidden" name="{$name}" value="{if $value}{$value}{else}{$edit_language_locale}{/if}" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='success_url'}
|
||||
<input type="hidden" name="{$name}" value="{url path='/admin/coupon/update/{id}'}" />
|
||||
{/form_field}
|
||||
|
||||
<div class="span4">
|
||||
<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">
|
||||
{form_field form=$form field='code'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label class="control-label" for="code">{intl l='Code :'}</label>
|
||||
<input id="code" class="form-control" type="text" name="{$name}" value="{$value}" placeholder="{intl l='code'}">
|
||||
{if $error}{$message}{/if}
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='title'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="title" class="control-label" >{intl l='Title :'}</label>
|
||||
<input id="title" class="form-control" type="text" name="{$name}" value="{$value}" placeholder="{intl l='title'}">
|
||||
{if $error}{$message}{/if}
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='isEnabled'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="is-enabled" class="checkbox control-label">
|
||||
<input id="is-enabled" type="checkbox" name="{$name}" {if $value}value="1" checked{/if} />
|
||||
{if $error}{$message}{/if}
|
||||
{intl l='Is enabled'}
|
||||
</label>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='isAvailableOnSpecialOffers'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="is-available-on-special-offers" class="checkbox control-label">
|
||||
<input id="is-available-on-special-offers" type="checkbox" name="{$name}" {if $value}value="1" checked{/if} />
|
||||
{if $error}{$message}{/if}
|
||||
{intl l='Is available on special offers'}
|
||||
</label>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='isCumulative'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="is-cumulative" class="checkbox control-label">
|
||||
<input id="is-cumulative" type="checkbox" name="{$name}" {if $value}value="1" checked{/if} />
|
||||
{if $error}{$message}{/if}
|
||||
{intl l='Is cumulative'}
|
||||
</label>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='isRemovingPostage'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="is-removing-postage" class="checkbox control-label">
|
||||
<input id="is-removing-postage" type="checkbox" name="{$name}" {if $value}value="1" checked{/if} />
|
||||
{if $error}{$message}{/if}
|
||||
{intl l='Is removing postage'}
|
||||
</label>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='expirationDate'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="expiration-date" class="control-label">{intl l='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="{$name}" class="form-control datepicker" data-date-format="yyyy-mm-dd" value="{if $defaultDate}{$defaultDate}{else}{$value}{/if}" placeholder="{intl l='yyyy-mm-dd'}">
|
||||
{if $error}{$message}{/if}
|
||||
<span class="add-on"><span class="icon-th"></span></span>
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='maxUsage'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
|
||||
<label for="is-unlimited" class="checkbox control-label">
|
||||
<input id="is-unlimited" type="checkbox" name="is-unlimited" >
|
||||
{intl l='Is unlimited'}
|
||||
</label>
|
||||
<label id="max-usage-label" for="max-usage" class="control-label">{intl l='Max usage :'}</label>
|
||||
<input id="max-usage" type="text" class="form-control" name="{$name}" value="{if !$value}-1{else}{$value}{/if}" placeholder="{intl l='max usage'}">
|
||||
{if $error}{$message}{/if}
|
||||
</div>
|
||||
{/form_field}
|
||||
<div class="row">
|
||||
<div class="col-md-12 general-block-decorator">
|
||||
<div class="row">
|
||||
<div class="col-md-7 title">
|
||||
{intl l='Edit %title' title=$couponCode}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-8">
|
||||
<div id="coupon-type" class="well clearfix">
|
||||
<div class="col-md-6">
|
||||
{form_field form=$form field='type'}
|
||||
<div class="form-container">
|
||||
|
||||
<form action="{$formAction}" {form_enctype form=$form} method="POST" >
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{form_field form=$form field='locale'}
|
||||
<input type="hidden" name="{$name}" value="{if $value}{$value}{else}{$edit_language_locale}{/if}" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='success_url'}
|
||||
<input type="hidden" name="{$name}" value="{url path='/admin/coupon/update/{id}'}" />
|
||||
{/form_field}
|
||||
|
||||
{if !$noConditions}
|
||||
{include
|
||||
file = "includes/inner-form-toolbar.html"
|
||||
hide_submit_buttons = false
|
||||
|
||||
page_url = "{url path="{$formAction}"}"
|
||||
}
|
||||
{/if}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
{form_field form=$form field='code'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="type" class="control-label">{intl l='Type :'}</label>
|
||||
<select name="{$name}" id="type" class="col-md-12 form-control">
|
||||
<option value="-1" data-description="" data-inputName="">{intl l='Please select a coupon type'}</option>
|
||||
{foreach from=$availableCoupons item=availableCoupon}
|
||||
<option value="{$availableCoupon.serviceId}" data-description="{$availableCoupon.toolTip}" data-inputName="{$availableCoupon.inputName}" {if $value == $availableCoupon.serviceId}selected{/if}>
|
||||
{$availableCoupon.name}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
<label class="control-label" for="code">{intl l='Code :'}</label>
|
||||
<input id="code" class="form-control" type="text" name="{$name}" value="{$value}" placeholder="{intl l='code'}">
|
||||
{if $error}{$message}{/if}
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='title'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="title" class="control-label" >{intl l='Title :'}</label>
|
||||
<input id="title" class="form-control" type="text" name="{$name}" value="{$value}" placeholder="{intl l='title'}">
|
||||
{if $error}{$message}{/if}
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='isEnabled'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="is-enabled" class="checkbox control-label">
|
||||
<input id="is-enabled" type="checkbox" name="{$name}" {if $value}value="1" checked{/if} />
|
||||
{if $error}{$message}{/if}
|
||||
{intl l='Is enabled'}
|
||||
</label>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='isAvailableOnSpecialOffers'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="is-available-on-special-offers" class="checkbox control-label">
|
||||
<input id="is-available-on-special-offers" type="checkbox" name="{$name}" {if $value}value="1" checked{/if} />
|
||||
{if $error}{$message}{/if}
|
||||
{intl l='Is available on special offers'}
|
||||
</label>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='isCumulative'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="is-cumulative" class="checkbox control-label">
|
||||
<input id="is-cumulative" type="checkbox" name="{$name}" {if $value}value="1" checked{/if} />
|
||||
{if $error}{$message}{/if}
|
||||
{intl l='Is cumulative'}
|
||||
</label>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='isRemovingPostage'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="is-removing-postage" class="checkbox control-label">
|
||||
<input id="is-removing-postage" type="checkbox" name="{$name}" {if $value}value="1" checked{/if} />
|
||||
{if $error}{$message}{/if}
|
||||
{intl l='Is removing postage'}
|
||||
</label>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='expirationDate'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="expiration-date" class="control-label">{intl l='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="{$name}" class="form-control datepicker" data-date-format="yyyy-mm-dd" value="{if $defaultDate}{$defaultDate}{else}{$value}{/if}" placeholder="{intl l='yyyy-mm-dd'}">
|
||||
{if $error}{$message}{/if}
|
||||
<span class="add-on"><span class="icon-th"></span></span>
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='maxUsage'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
|
||||
<label for="is-unlimited" class="checkbox control-label">
|
||||
<input id="is-unlimited" type="checkbox" name="is-unlimited" >
|
||||
{intl l='Is unlimited'}
|
||||
</label>
|
||||
<label id="max-usage-label" for="max-usage" class="control-label">{intl l='Max usage :'}</label>
|
||||
<input id="max-usage" type="text" class="form-control" name="{$name}" value="{if !$value}-1{else}{$value}{/if}" placeholder="{intl l='max usage'}">
|
||||
{if $error}{$message}{/if}
|
||||
<span class="help-block typeToolTip">{$availableCoupons.0.toolTip}</span>
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 inputs">
|
||||
{form_field form=$form field='amount'}
|
||||
{$couponInputsHtml nofilter}
|
||||
<div class="col-md-8">
|
||||
<div id="coupon-type" class="well clearfix">
|
||||
<div class="col-md-6">
|
||||
{form_field form=$form field='type'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="type" class="control-label">{intl l='Type :'}</label>
|
||||
<select name="{$name}" id="type" class="col-md-12 form-control">
|
||||
<option value="-1" data-description="" data-inputName="">{intl l='Please select a coupon type'}</option>
|
||||
{foreach from=$availableCoupons item=availableCoupon}
|
||||
<option value="{$availableCoupon.serviceId}" data-description="{$availableCoupon.toolTip}" data-inputName="{$availableCoupon.inputName}" {if $value == $availableCoupon.serviceId}selected{/if}>
|
||||
{$availableCoupon.name}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
{if $error}{$message}{/if}
|
||||
<span class="help-block typeToolTip">{$availableCoupons.0.toolTip}</span>
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 inputs">
|
||||
{form_field form=$form field='amount'}
|
||||
{$couponInputsHtml nofilter}
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{form_field form=$form field='shortDescription'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="short-description" class="control-label">{intl l='Short description :'}</label>
|
||||
<textarea id="short-description" name="{$name}" class="form-control" placeholder="{intl l='short description'}" class="span12" rows="5">{$value nofilter}</textarea>
|
||||
{if $error}{$message}{/if}
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{form_field form=$form field='shortDescription'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="short-description" class="control-label">{intl l='Short description :'}</label>
|
||||
<textarea id="short-description" name="{$name}" class="form-control" placeholder="{intl l='short description'}" class="span12" rows="5">{$value nofilter}</textarea>
|
||||
{if $error}{$message}{/if}
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<div class="col-md-12">
|
||||
<div class="clearfix"></div>
|
||||
|
||||
{form_field form=$form field='description'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="description" class="control-label">{intl l='Long description :'}</label>
|
||||
<textarea id="description" name="{$name}" placeholder="{intl l='long description'}" class="form-control wysiwyg" rows="10">{$value nofilter}</textarea>
|
||||
{if $error}{$message}{/if}
|
||||
<div class="col-md-12">
|
||||
{form_field form=$form field='description'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="description" class="control-label">{intl l='Long description :'}</label>
|
||||
<textarea id="description" name="{$name}" placeholder="{intl l='long description'}" class="form-control wysiwyg" rows="10">{$value nofilter}</textarea>
|
||||
{if $error}{$message}{/if}
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{if $noConditions}
|
||||
<button id="save-coupon-btn" type="submit" class="btn btn-default btn-primary">{intl l='Save your modifications'}</button>
|
||||
{/if}
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{if $noConditions}
|
||||
<button id="save-coupon-btn" type="submit" class="btn btn-default btn-primary">{intl l='Save your modifications'}</button>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{if $noConditions}
|
||||
{include file='includes/notifications.html' message={intl l='Please save your Coupon in oder to affect it some conditions'}}
|
||||
{else}
|
||||
<section class="row">
|
||||
<div class="col-md-12 general-block-decorator">
|
||||
<table class="table table-striped">
|
||||
<div class="row">
|
||||
<div class="col-md-12 general-block-decorator">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-condensed" id="folder_list">
|
||||
<caption class="clearfix">
|
||||
{intl l='Conditions'}
|
||||
</caption>
|
||||
@@ -184,39 +194,37 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="row">
|
||||
<form id="condition-form" action="{$urlAjaxSaveConditions}" {form_enctype form=$form} method="POST" >
|
||||
<div class="col-md-12 general-block-decorator clearfix">
|
||||
<a id="condition-save-btn" title="{intl l='Save this condition'}" class="btn btn-default btn-primary pull-right" data-toggle="confirm" data-script="">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span> {intl l='Save this condition'}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="condition-add-organizer" class="form-group col-md-2">
|
||||
{*<label for="type">{intl l='Condition type :'}</label>*}
|
||||
{*<label class="radio">*}
|
||||
{*<input type="radio" name="type" class="form-control" id="type" value="1" checked> {intl l='And'}*}
|
||||
{*</label>*}
|
||||
{*<label class="radio">*}
|
||||
{*<input type="radio" name="type" class="form-control" value="2"> {intl l='Or'}*}
|
||||
{*</label>*}
|
||||
<div class="row">
|
||||
<div class="col-md-12 general-block-decorator">
|
||||
|
||||
<div class="form-container">
|
||||
<form id="condition-form" action="{$urlAjaxSaveConditions}" {form_enctype form=$form} method="POST" >
|
||||
<div class="well clearfix">
|
||||
<a id="condition-save-btn" title="{intl l='Save this condition'}" class="btn btn-default btn-primary pull-right" data-toggle="confirm" data-script="">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span> {intl l='Save this condition'}
|
||||
</a>
|
||||
|
||||
<div id="condition-add-type" class="form-group col-md-4">
|
||||
<label for="categoryCondition">{intl l='Condition\'s category :'}</label>
|
||||
<select name="categoryCondition" id="category-condition" class="form-control">
|
||||
<option value="-1" data-description="">{intl l='Please select a condition category'}</option>
|
||||
{foreach from=$availableConditions item=availableCondition}
|
||||
<option value="{$availableCondition.serviceId}" data-description="{$availableCondition.toolTip}">{$availableCondition.name}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
<span class="help-block typeToolTip"></span>
|
||||
</div>
|
||||
|
||||
<div id="condition-add-operators-values" class="form-group col-md-6"></div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div id="condition-add-type" class="form-group col-md-4">
|
||||
<label for="categoryCondition">{intl l='Condition\'s category :'}</label>
|
||||
<select name="categoryCondition" id="category-condition" class="form-control">
|
||||
<option value="-1" data-description="">{intl l='Please select a condition category'}</option>
|
||||
{foreach from=$availableConditions item=availableCondition}
|
||||
<option value="{$availableCondition.serviceId}" data-description="{$availableCondition.toolTip}">{$availableCondition.name}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
<span class="help-block typeToolTip"></span>
|
||||
</div>
|
||||
|
||||
<div id="condition-add-operators-values" class="form-group col-md-6"></div>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user