Initial commit

This commit is contained in:
2020-01-27 08:56:08 +01:00
commit b7525048d6
27129 changed files with 3409855 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<dwsync>
<file name="footer_js.html" server="51.254.220.106//web/" local="131351945400000000" remote="131383879200000000" />
<file name="module-config-js.html" server="51.254.220.106//web/" local="131379695958593750" remote="131383879200000000" />
<file name="module_configuration.html" server="51.254.220.106//web/" local="131379702549218750" remote="131383879200000000" />
<file name="footer_js.html" server="37.187.178.154//web/" local="131351945400000000" remote="131378968800000000" />
<file name="module-config-js.html" server="37.187.178.154//web/" local="131351945400000000" remote="131378968800000000" />
<file name="module_configuration.html" server="37.187.178.154//web/" local="131351946000000000" remote="131378968800000000" />
</dwsync>

View File

@@ -0,0 +1,16 @@
{javascripts file='assets/js/main.js'}
<script src="{$asset_url}"></script>
{/javascripts}
{javascripts file='assets/js/bootstrap-select/bootstrap-select.js'}
<script src="{$asset_url}"></script>
{/javascripts}
<script>
$(function() {
$('a.rule-delete').click(function(ev) {
$('#rule_delete_id').val($(this).data('id'));
});
});
</script>

View File

@@ -0,0 +1,41 @@
<script>
$(document).ready(function() {
var checkboxes = [];
{loop name="js.get.orders.withdrawalinstore.export" type="order.notsent.withdrawalinstore"}
checkboxes.push("export_{$ID}");
{/loop}
//Buttons
$("#check-all-but").click( function() {
checkboxes.forEach(function(entry) {
$("#"+entry).prop('checked', true);
});
});
$("#uncheck-all-but").click( function() {
checkboxes.forEach(function(entry) {
$("#"+entry).prop('checked', false);
});
});
$("#reverse-all-but").click( function() {
checkboxes.forEach(function(entry) {
var box=$("#"+entry);
box.prop('checked', !box.is(":checked"));
});
});
// Export form button
$("button[name=export_withdrawalinstore_form]").click(function() {
var value = $("input[name='exportwithdrawalinstoreorder[new_status_id]']:checked").val();
if(value == "sent") {
checkboxes.forEach(function(entry) {
var box=$("#"+entry);
if(box.is(":checked")) {
var row= box.parents("tr"); // get first tr parent
row.hide('slow', function() {
row.remove();
});
}
});
}
});
});
</script>

View File

@@ -0,0 +1,226 @@
{assign var="tab" value="export"}
{if isset($smarty.get.current_tab)}
{assign var="tab" value=$smarty.get.current_tab}
{/if}
<div class="row">
<div class="col-md-12">
<div class="general-block-decorator">
<div class="row">
<div class="col-md-12">
<ul id="tabbed-menu" class="nav nav-tabs">
<li class="{if $tab eq "export"}active{/if}"><a data-toggle="tab" href="#export">{intl l="Export" d='WithdrawalInStore.ai'}</a> </li>
<li class="{if $tab eq "rule"}active{/if}"><a data-toggle="tab" href="#rule">{intl l="Configure WithdrawalInStore rule" d='WithdrawalInStore.ai'}</a></li>
</ul>
<div class="tab-content">
<div id="export" class="tab-pane {if $tab eq "export"}active{/if} form-container">
<div class="panel panel-default">
<div class="panel-heading clearfix">
{intl l="operations" d='WithdrawalInStore.ai'}
</div>
<div class="panel-body">
<button id="check-all-but" title="{intl l="Check all" d='WithdrawalInStore.ai'}" class="form-submit-button btn btn-sm btn-default">{intl l="Check all" d='WithdrawalInStore.ai'}</button>
<button id="uncheck-all-but" title="{intl l="Uncheck all" d='WithdrawalInStore.ai'}" class="form-submit-button btn btn-sm btn-default">{intl l="Uncheck all" d='WithdrawalInStore.ai'}</button>
<button id="reverse-all-but" title="{intl l="Reverse selection" d='WithdrawalInStore.ai'}" class="form-submit-button btn btn-sm btn-default">{intl l="Reverse selection" d='WithdrawalInStore.ai'}</button>
</div>
</div>
{form name="WithdrawalInStore.export.inet"}
<form action="{url path='/admin/module/WithdrawalInStore/export'}" method="post">
{form_hidden_fields form=$form}
<div class="panel panel-default">
<div class="panel-heading clearfix">
{intl l="Change orders status after export" d='WithdrawalInStore.ai'}
</div>
<div class="panel-body">
{form_field form=$form field="new_status_id"}
<table>
<tr>
<td>
<label for="nochange">{intl l="Do not change" d='WithdrawalInStore.ai'}</label>&nbsp;
</td>
<td>
<input type="radio" id="nochange" name="{$name}" value="nochange" {if $data eq "nochange"}checked{/if} />
</td>
</tr>
<tr>
<td>
<label for="processing">{intl l="Processing" d='WithdrawalInStore.ai'}</label>&nbsp;
</td>
<td>
<input type="radio" id="processing" name="{$name}" value="processing" {if $data eq "processing"}checked{/if} />
</td>
</tr>
<tr>
<td>
<label for="sent">{intl l="Sent" d='WithdrawalInStore.ai'}*</label>&nbsp;
</td>
<td>
<input type="radio" id="sent" name="{$name}" value="sent" {if $data eq "sent"}checked{/if} />
</td>
</tr>
</table>
{/form_field}
<span class="p">{intl l="*If you choose this option, the exported orders would not be available on this page anymore" d='WithdrawalInStore.ai'}</span>
</div>
</div>
<table class="table table-striped table-condensed">
<thead>
<th class="object-title">
{intl l="REF" d='WithdrawalInStore.ai'}
</th>
<th class="object-title">
{intl l="Date" d='WithdrawalInStore.ai'}
</th>
<th class="object-title">
{intl l="Total taxed amount" d='WithdrawalInStore.ai'}
</th>
<th class="object-title">
{intl l="Export" d='WithdrawalInStore.ai'}
</th>
</thead>
<tbody>
{loop name="order.notsent.withdrawalinstore" type="order.notsent.withdrawalinstore"}
{form_field form=$form field="order_"|cat:$ID}
<tr>
<td>
<label for="{$label_attr.for}">
{$label}
</label>
</td>
<td>
{$CREATE_DATE|date_format}
</td>
<td>
{$TOTAL_TAXED_AMOUNT} {loop name="list.withdrawalinstore.getcurrency" type="currency" id=$CURRENCY}{$SYMBOL}{/loop}
</td>
<td>
<input type="checkbox" name="{$name}" id="{$label_attr.for}" value="true" class="form-control"/>
</td>
</tr>
{/form_field}
{/loop}
</tbody>
</table>
<button type="submit" name="export_withdrawalinstore_form" value="stay" class="form-submit-button btn btn-sm btn-default" title="{intl l='Export' d='WithdrawalInStore.ai'}">{intl l='Export' d='WithdrawalInStore.ai'}</button>
</form>
{/form}
</div>
<div id="rule" class="tab-pane {if $tab eq "rule"}active{/if} form-container">
<div class="panel panel-default">
<div class="panel-heading">
{intl l="Configure WithdrawalInStore rule" d='WithdrawalInStore.ai'}
</div>
<div class="panel-body">
<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="WithdrawalInStore" 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="WITHDRAWAL_IN_STORE"}
<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="WithdrawalInStore" access="UPDATE"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this rule'}" href="{url path="/admin/module/WithdrawalInStore/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>
</div>
</div>
</div>
</div>
</div>
</div>
{* -- Add rule confirmation dialog ----------------------------------- *}
{form name="WithdrawalInStore.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/WithdrawalInStore'}" />
{/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>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='amount'}">
<div class="help-block"></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/WithdrawalInStore/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/WithdrawalInStore/delete'}
form_content = {$smarty.capture.rule_delete_dialog nofilter}
}