Files
domokits/local/modules/FreeShipping/AdminIncludes/module_configuration.html
2019-11-21 12:25:31 +01:00

112 lines
4.6 KiB
HTML

<div class="row">
<div class="col-md-12">
<div class="general-block-decorator">
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l="Free carriage rules"}
{loop type="auth" name="can_create" role="ADMIN" module="freeShipping" access="CREATE"}
<a class="btn btn-default btn-primary pull-right" title="{intl l='Create a new rule'}" href="#rule_create_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus"></span>
</a>
{/loop}
</caption>
<thead>
<tr>
<th>{intl l="Area"}</th>
<th>{intl l="Amount up to ... (€)"}</th>
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
{loop name="rules" type="free_shipping"}
<tr>
<td><a href="{url path="/admin/configuration/shipping_configuration/update/$AREA_ID"}">{$AREA_NAME}</a></td>
<td>{$AMOUNT}</td>
<td class="actions">
<div class="btn-group">
{loop type="auth" name="can_change" role="ADMIN" module="freeShipping" access="UPDATE"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this rule'}" href="{url path="/admin/module/FreeShipping/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
<a class="btn btn-default btn-xs rule-delete" title="{intl l='Delete this rule'}" href="#rule_delete_dialog" data-toggle="modal" data-id="{$ID}"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
{/loop}
</tbody>
</table>
</div>
</div>
</div>
</div>
{* -- Add rule confirmation dialog ----------------------------------- *}
{form name="freeShipping.admin.rule.creation"}
{capture "rule_creation_dialog"}
{form_hidden_fields form=$form}
{form_field form=$form field='success_url'}
<input type="hidden" name="{$name}" value="{url path='/admin/module/FreeShipping'}" />
{/form_field}
{form_field form=$form field='area'}
<div class="form-group {if $error}has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label} : </label>
<select name="{$name}" id="{$label_attr.for}" data-toggle="selectpicker">
{loop name="area" type="area"}
<option value="{$ID}">{$NAME}</option>
{/loop}
</select>
</div>
{/form_field}
{form_field form=$form field='amount'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='amount'}">
<div class="help-block">{intl l='Enter the amount from which the rule will apply'}</div>
</div>
{/form_field}
{/capture}
{include
file = "includes/generic-create-dialog.html"
dialog_id = "rule_create_dialog"
dialog_title = {intl l="Create a new rule"}
dialog_body = {$smarty.capture.rule_creation_dialog nofilter}
dialog_ok_label = {intl l="Create"}
dialog_cancel_label = {intl l="Cancel"}
form_action = {url path='/admin/module/FreeShipping/create'}
form_enctype = {form_enctype form=$form}
form_error_message = $form_error_message
}
{/form}
{* -- Delete rule confirmation dialog ----------------------------------- *}
{capture "rule_delete_dialog"}
<input type="hidden" name="rule_id" id="rule_delete_id" value="" />
{/capture}
{include
file = "includes/generic-confirm-dialog.html"
dialog_id = "rule_delete_dialog"
dialog_title = {intl l="Delete this rule"}
dialog_message = {intl l="Do you really want to delete this rule ?"}
form_action = {token_url path='/admin/module/FreeShipping/delete'}
form_content = {$smarty.capture.rule_delete_dialog nofilter}
}