Initial Commit
This commit is contained in:
@@ -0,0 +1,143 @@
|
||||
<div class="form-container" id="digressive-price">
|
||||
<div class="title title-without-tabs">
|
||||
{intl d="digressiveprice.bo.default" l="Digressive price"}
|
||||
</div>
|
||||
|
||||
{form name="digressiveprice.create"}
|
||||
{if $form_error}
|
||||
<div class="alert alert-danger">{$form_error_message}</div>
|
||||
{/if}
|
||||
{/form}
|
||||
|
||||
{form name="digressiveprice.update"}
|
||||
{if $form_error}
|
||||
<div class="alert alert-danger">{$form_error_message}</div>
|
||||
{/if}
|
||||
{/form}
|
||||
|
||||
{form name="digressiveprice.delete"}
|
||||
{if $form_error}
|
||||
<div class="alert alert-danger">{$form_error_message}</div>
|
||||
{/if}
|
||||
{/form}
|
||||
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{intl l="From" d="digressiveprice.bo.default"}</th>
|
||||
<th>{intl l="To" d="digressiveprice.bo.default"}</th>
|
||||
<th>{intl l="Discount (%)" d="digressiveprice.bo.default"}</th>
|
||||
<th class="text-center">{intl l="Add/Update" d="digressiveprice.bo.default"}</th>
|
||||
<th class="text-center">{intl l="Remove" d="digressiveprice.bo.default"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{* List existing digressive prices for this product *}
|
||||
{loop type="digressive" name="prodDigressivePrices" product_id={product attr="id"}}
|
||||
<!-- Update digressive price -->
|
||||
<tr>
|
||||
{form name="digressiveprice.update"}
|
||||
<form action="{url path='/admin/module/DigressivePrice/update'}" class="form-inline" role="form" {form_enctype form=$form} method="post">
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{form_field form=$form field="id"}
|
||||
<input type="hidden" name="{$name}" value="{$ID}">
|
||||
{/form_field}
|
||||
|
||||
<input type="hidden" name="product_id" value="{$PRODUCT_ID}">
|
||||
|
||||
{form_field form=$form field="productId"}
|
||||
<input type="hidden" name="{$name}" value="{$PRODUCT_ID}">
|
||||
{/form_field}
|
||||
|
||||
<!-- Quantities -->
|
||||
<td>
|
||||
{form_field form=$form field="quantityFrom"}
|
||||
<input name="{$name}" value="{$QUANTITY_FROM}" class="form-control" type="text" required>
|
||||
{/form_field}
|
||||
</td>
|
||||
<td>
|
||||
{form_field form=$form field="quantityTo"}
|
||||
<input name="{$name}" value="{$QUANTITY_TO}" class="form-control" type="text" required>
|
||||
{/form_field}
|
||||
</td>
|
||||
|
||||
<!-- Prices -->
|
||||
<td>
|
||||
{form_field form=$form field="discount"}
|
||||
<input name="{$name}" value="{$DISCOUNT}" class="form-control" type="text" required>
|
||||
{/form_field}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<button type="submit" class="btn btn-primary">{intl d="digressiveprice.bo.default" l="Update"}</button>
|
||||
</td>
|
||||
</form>
|
||||
{/form}
|
||||
|
||||
<!-- Remove -->
|
||||
<td class="text-center">
|
||||
{form name="digressiveprice.delete"}
|
||||
<form style="display:inline-block" action="{url path='/admin/module/DigressivePrice/delete'}" role="form" {form_enctype form=$form} method="post">
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
<input type="hidden" name="product_id" value="{$PRODUCT_ID}">
|
||||
|
||||
{form_field form=$form field="productId"}
|
||||
<input type="hidden" name="{$name}" value="{$PRODUCT_ID}">
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field="id"}
|
||||
<input type="hidden" name="{$name}" value="{$ID}">
|
||||
{/form_field}
|
||||
|
||||
<button type="submit" class="btn btn-danger" title="{intl d='digressiveprice.bo.default' l='Remove'}"><span class="glyphicon glyphicon-trash"></span></button>
|
||||
</form>
|
||||
{/form}
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
<!-- New digressive price form -->
|
||||
<tr>
|
||||
{form name="digressiveprice.create"}
|
||||
<form action="{url path='/admin/module/DigressivePrice/create'}" class="form-inline" role="form" {form_enctype form=$form} method="post">
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
<input type="hidden" name="product_id" value="{product attr='id'}">
|
||||
|
||||
{form_field form=$form field="productId"}
|
||||
<input type="hidden" name="{$name}" value="{product attr='id'}">
|
||||
{/form_field}
|
||||
|
||||
<!-- Quantities -->
|
||||
<td>
|
||||
{form_field form=$form field="quantityFrom"}
|
||||
<input name="{$name}" class="form-control" placeholder="{$label}" value="{$value}" type="text" required>
|
||||
{/form_field}
|
||||
</td>
|
||||
<td>
|
||||
{form_field form=$form field="quantityTo"}
|
||||
<input name="{$name}" class="form-control" placeholder="{$label}" value="{$value}" type="text" required>
|
||||
{/form_field}
|
||||
</td>
|
||||
|
||||
<!-- Prices -->
|
||||
<td>
|
||||
{form_field form=$form field="discount"}
|
||||
<input name="{$name}" class="form-control" placeholder="{$label}" value="{$value}" type="text" required>
|
||||
{/form_field}
|
||||
</td>
|
||||
|
||||
<!-- Submit -->
|
||||
<td class="text-center">
|
||||
<button type="submit" class="btn btn-primary">{intl d="digressiveprice.bo.default" l="Add"}</button>
|
||||
</td>
|
||||
<td> </td>
|
||||
</form>
|
||||
{/form}
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
Reference in New Issue
Block a user