modified: local/modules/Colissimo/AdminIncludes/module-config-js.html modified: local/modules/Colissimo/AdminIncludes/module_configuration.html
153 lines
7.9 KiB
HTML
Executable File
153 lines
7.9 KiB
HTML
Executable File
<div class="row">
|
|
<!-- Errors -->
|
|
{loop name="checkrights.colissimo" type="colissimo.check.rights"}
|
|
<div class="alert alert-danger">
|
|
<p>{$ERRMES} {$ERRFILE} | {intl l="Please change the access rights"}.</p>
|
|
</div>
|
|
{/loop}
|
|
</div>
|
|
|
|
{elseloop rel="checkrights.colissimo"}
|
|
|
|
<div class="modal fade" id="freeshipping-failed" tabindex="-1" role="dialog" aria-hidden="true">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
<h3>{intl l="An error occured"}</h3>
|
|
</div>
|
|
<div class="modal-body" id="freeshipping-failed-body">
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<div class="alert alert-info">
|
|
<p>{intl l="Colissimo Module allows to send your products all around the world with La Poste."}</p>
|
|
</div>
|
|
|
|
<div class="general-block-decorator">
|
|
<!-- checkbox free shipping -->
|
|
{assign var="isColissimoFreeShipping" value=0}
|
|
{form name="colissimo.freeshipping.form"}
|
|
<form action="{url path="/admin/module/colissimo/freeshipping"}" method="post" id="freeshippingform">
|
|
{form_hidden_fields form=$form}
|
|
|
|
{form_field form=$form field="freeshipping"}
|
|
<label>
|
|
{$label}
|
|
</label>
|
|
|
|
<div class="switch-small freeshipping-activation-Colissimo" data-id="0" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok-circle'></i>" data-off-label="<i class='glyphicon glyphicon-remove-circle'></i>">
|
|
<input type="checkbox" name="{$name}" value="true" {if $data}checked{assign var="isColissimoFreeShipping" value=1}{/if} />
|
|
</div>
|
|
{/form_field}
|
|
</form>
|
|
{/form}
|
|
<div id="table-prices-colissimo" {if $isColissimoFreeShipping eq 1} style="display:none;" {/if}>
|
|
<!-- Prices editing -->
|
|
{* -- Add price slice confirmation dialog ----------------------------------- *}
|
|
{loop type="area" name="list area" backend_context=true}
|
|
{include
|
|
file = "includes/generic-create-dialog.html"
|
|
|
|
dialog_id = "price_slice_create_dialog_{$ID}"
|
|
dialog_title = {intl l="Create a price slice"}
|
|
dialog_body = "<input type=\"hidden\" name=\"operation\" value=\"add\"/>
|
|
<input type=\"hidden\" name=\"area\" value=\"{$ID}\" />
|
|
<label for=\"weight_{$ID}\">{intl l="Weight up to ... (kg)"}</label></label>
|
|
<input type=\"number\" id=\"weight_{$ID}\" name=\"weight\" value=\"1\" class=\"form-control\" pattern=\"\\d+\\.?\\d*\" required/>
|
|
<label for=\"price_{$ID}\">{intl l="Price (€)"}</label></label>
|
|
<input type=\"number\" id=\"price_{$ID}\" name=\"price\" value=\"1\" class=\"form-control\" pattern=\"\\d+\\.?\\d*\" required/>"
|
|
|
|
form_action="{url path="/admin/module/colissimo/prices"}"
|
|
|
|
dialog_ok_label = {intl l="Create"}
|
|
dialog_cancel_label = {intl l="Cancel"}
|
|
}
|
|
<div class="table-responsive">
|
|
<table class="table table-striped table-condensed table-left-aligned">
|
|
<caption class="clearfix">
|
|
{intl l="Area : "}{$NAME}
|
|
{loop type="auth" name="can_create" role="ADMIN" module="colissimo" access="CREATE"}
|
|
<a class="btn btn-default btn-primary pull-right" title="{intl l='Create a new price slice'}" href="#price_slice_create_dialog_{$ID}" data-toggle="modal">
|
|
<span class="glyphicon glyphicon-plus"></span>
|
|
</a>
|
|
{/loop}
|
|
</caption>
|
|
<thead>
|
|
<tr>
|
|
<th class="col-md-3">{intl l="Weight up to ... (kg)"}</th>
|
|
<th class="col-md-5">{intl l="Price (€)"}</th>
|
|
<th class="col-md-1">{intl l="Actions"}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{loop type="colissimo" name="colissimo" area=$ID}
|
|
{* -- EDIT price slice confirmation dialog ----------------------------------- *}
|
|
{include
|
|
file = "includes/generic-confirm-dialog.html"
|
|
|
|
dialog_id = "price_slice_edit_dialog_{$ID}_{$MAX_WEIGHT|replace:'.':'-'}"
|
|
dialog_title = {intl l="Edit a price slice"}
|
|
dialog_message = "<input type=\"hidden\" name=\"operation\" value=\"add\"/>
|
|
<input type=\"hidden\" name=\"area\" value=\"{$ID}\"/>
|
|
<input type=\"hidden\" name=\"weight\" value=\"{$MAX_WEIGHT}\"/>
|
|
<label for=\"price_edit_{$ID}_{$MAX_WEIGHT}\">{intl l='Price (€)'}</label>
|
|
<input type=\"number\" id=\"price_edit_{$ID}_{$MAX_WEIGHT}\" class=\"form-control\" name=\"price\" value=\"{$PRICE}\" pattern=\"\\d+\\.?\\d*\" required/>"
|
|
|
|
form_action="{url path="/admin/module/colissimo/prices"}"
|
|
dialog_ok_label = {intl l="Edit"}
|
|
dialog_cancel_label = {intl l="Cancel"}
|
|
}
|
|
{* -- Delete price slice confirmation dialog ----------------------------------- *}
|
|
{include
|
|
file = "includes/generic-confirm-dialog.html"
|
|
|
|
dialog_id = "price_slice_delete_dialog_{$ID}_{$MAX_WEIGHT|replace:'.':'-'}"
|
|
dialog_title = {intl l="Delete a price slice"}
|
|
dialog_message = "<input type=\"hidden\" name=\"operation\" value=\"delete\"/>
|
|
<input type=\"hidden\" name=\"area\" value=\"{$ID}\"/>
|
|
<input type=\"hidden\" name=\"weight\" value=\"{$MAX_WEIGHT}\"/>
|
|
{intl l="Do you really want to delete this slice ?"}"
|
|
|
|
form_action="{url path="/admin/module/colissimo/prices"}"
|
|
dialog_ok_label = {intl l="Delete"}
|
|
dialog_cancel_label = {intl l="Cancel"}
|
|
}
|
|
|
|
<tr>
|
|
<td>{$MAX_WEIGHT}</td>
|
|
<td>{$PRICE}</td>
|
|
<td>
|
|
<div class="btn-group">
|
|
{loop type="auth" name="can_change" role="ADMIN" module="colissimo" access="UPDATE"}
|
|
<a class="btn btn-default btn-xs" title="{intl l='Edit this price slice'}" href="#price_slice_edit_dialog_{$ID}_{$MAX_WEIGHT|replace:'.':'-'}" data-toggle="modal">
|
|
<span class="glyphicon glyphicon-edit"></span>
|
|
</a>
|
|
<a class="btn btn-default btn-xs" title="{intl l='Delete this price slice'}" href="#price_slice_delete_dialog_{$ID}_{$MAX_WEIGHT|replace:'.':'-'}" data-toggle="modal">
|
|
<span class="glyphicon glyphicon-trash"></span>
|
|
</a>
|
|
{/loop}
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{/loop}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{/loop}
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
{/elseloop}
|