first commit
This commit is contained in:
32
modules/inpostshipping/views/css/admin/index.php
Normal file
32
modules/inpostshipping/views/css/admin/index.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*/
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../');
|
||||
exit;
|
||||
83
modules/inpostshipping/views/css/admin/loader.css
Normal file
83
modules/inpostshipping/views/css/admin/loader.css
Normal file
@@ -0,0 +1,83 @@
|
||||
/**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*/
|
||||
.inpost-loader-animation {
|
||||
--block-size: 18vmin;
|
||||
--loader-size-half: calc(var(--loader-size) / 2);
|
||||
--loader-size-half-neg: calc(var(--loader-size-half) * -1);
|
||||
--dot-size: 10px;
|
||||
--dot-size-half: calc(var(--dot-size) / 2);
|
||||
--dot-size-half-neg: calc(var(--dot-size-half) * -1);
|
||||
--loader-size: calc(var(--block-size) / 3);
|
||||
--anim-duration: 1.2s;
|
||||
aspect-ratio: 1 / 1;
|
||||
border: 1px solid rgba(0, 175, 240, 0.5);
|
||||
border-radius: 50%;
|
||||
animation: inpost-loader-animation calc(var(--anim-duration) * 3) linear infinite;
|
||||
|
||||
position: relative;
|
||||
width: var(--loader-size);
|
||||
display: grid;
|
||||
place-items: center;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.inpost-loader-animation::before,
|
||||
.inpost-loader-animation::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: var(--dot-size);
|
||||
aspect-ratio: 1 / 1;
|
||||
background: #00aff0;
|
||||
border-radius: 50%;
|
||||
top: var(--dot-size-half-neg);
|
||||
left: calc(50% - var(--dot-size-half));
|
||||
animation: inpost-loader-animation var(--anim-duration) cubic-bezier(0.27, 0.08, 0.26, 0.7) infinite;
|
||||
transform-origin: center calc(var(--loader-size-half) + var(--dot-size-half) - 1px);
|
||||
}
|
||||
|
||||
.inpost-loader-animation::after {
|
||||
animation-delay: calc(var(--anim-duration) / 3 * -1);
|
||||
}
|
||||
|
||||
@keyframes inpost-loader-animation {
|
||||
100% {
|
||||
transform: rotate(1turn);
|
||||
}
|
||||
}
|
||||
|
||||
.inpost-loader{
|
||||
display: none;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 1051;
|
||||
background-color: rgba(255, 255, 255, .8);
|
||||
}
|
||||
|
||||
.inpost-loader.active{
|
||||
display: flex;
|
||||
}
|
||||
73
modules/inpostshipping/views/css/admin/nav-tabs.css
Normal file
73
modules/inpostshipping/views/css/admin/nav-tabs.css
Normal file
@@ -0,0 +1,73 @@
|
||||
/**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*/
|
||||
#content.bootstrap {
|
||||
padding-top: 160px;
|
||||
}
|
||||
|
||||
.bootstrap .page-head {
|
||||
height: 140px;
|
||||
}
|
||||
|
||||
.page-head-tabs {
|
||||
padding-left: 210px;
|
||||
background-color: #fff;
|
||||
clear: left
|
||||
}
|
||||
|
||||
.page-sidebar-closed .page-head-tabs {
|
||||
padding-left: 50px;
|
||||
}
|
||||
|
||||
.page-title {
|
||||
margin-bottom: 1.375rem !important;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.page-head-tabs {
|
||||
padding-left: 50px;
|
||||
}
|
||||
}
|
||||
|
||||
.bootstrap .page-head .page-head-tabs ul {
|
||||
border-bottom: 1px solid #dfdfdf;
|
||||
border-top: 1px solid #dfdfdf;
|
||||
font-weight: 400
|
||||
}
|
||||
.bootstrap .page-head .page-head-tabs li {
|
||||
display: inline-block
|
||||
}
|
||||
|
||||
.bootstrap .page-head .page-head-tabs li a {
|
||||
box-sizing: border-box;
|
||||
color: #6c868e;
|
||||
font-size: .875rem;
|
||||
line-height: 1.5;
|
||||
padding: .9375rem 1.25rem;
|
||||
vertical-align: middle
|
||||
}
|
||||
|
||||
.bootstrap .page-head .page-head-tabs li a.current {
|
||||
background-color: #f4f9fb;
|
||||
border-bottom: 3px solid #3ed2f0;
|
||||
color: #363a41
|
||||
}
|
||||
40
modules/inpostshipping/views/css/admin/orders.css
Normal file
40
modules/inpostshipping/views/css/admin/orders.css
Normal file
@@ -0,0 +1,40 @@
|
||||
#widget-modal {
|
||||
max-width: 80%;
|
||||
}
|
||||
|
||||
/* fix easypack.css styles */
|
||||
#widget-modal__map:not(.mobile) {
|
||||
overflow: unset !important;
|
||||
}
|
||||
|
||||
#easypack-search {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@media (min-width:768px) {
|
||||
.d-md-block {
|
||||
display: block !important;
|
||||
}
|
||||
}
|
||||
|
||||
#new-dispatch-point-data {
|
||||
border: 1px solid #c7d6db;
|
||||
border-radius: 5px;
|
||||
padding-top: 0.5rem;
|
||||
padding-left: 0.5rem;
|
||||
padding-right: 0.5rem;
|
||||
}
|
||||
|
||||
@media print{
|
||||
.d-md-block.d-print-none {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.js-inpost-show-map{
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.js-inpost-locker-address{
|
||||
margin-top: 1rem;
|
||||
}
|
||||
26
modules/inpostshipping/views/css/admin/table-fix.css
Normal file
26
modules/inpostshipping/views/css/admin/table-fix.css
Normal file
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*/
|
||||
.bootstrap .panel {
|
||||
width: unset;
|
||||
min-width: 100%;
|
||||
}
|
||||
129
modules/inpostshipping/views/css/front.css
Normal file
129
modules/inpostshipping/views/css/front.css
Normal file
@@ -0,0 +1,129 @@
|
||||
/**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*/
|
||||
.inpost-shipping-container{
|
||||
padding-top: 15px;
|
||||
padding-bottom: 15px;
|
||||
margin-bottom: 15px;
|
||||
background-color: #f6f6f6;
|
||||
}
|
||||
|
||||
.inpost-shipping-button{
|
||||
color: #3c3c3c;
|
||||
font-weight: 600;
|
||||
background-color: #ffcd00;
|
||||
border-color: #ffcd00;
|
||||
}
|
||||
|
||||
.inpost-shipping-button:hover,
|
||||
.inpost-shipping-button:focus,
|
||||
.inpost-shipping-button.focus{
|
||||
color: #3c3c3c;
|
||||
background-color: #ff7615;
|
||||
border-color: #ff7615;
|
||||
}
|
||||
|
||||
.widget-modal{
|
||||
max-width: 80%;
|
||||
}
|
||||
|
||||
.inpost-shipping-backdrop{
|
||||
background-color: rgba(0, 0, 0, .3);
|
||||
}
|
||||
|
||||
.inpost-shipping-machine-info.hidden{
|
||||
display: none;
|
||||
}
|
||||
|
||||
.inpost-shipping-machine-info{
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.inpost-shipping-machine-name{
|
||||
margin-bottom: 0;
|
||||
color: #3c3c3c;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.inpost-shipping-machine-address{
|
||||
color: #3c3c3c;
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.box .inpost-shipping-machine-address{
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.inpost-shipping-subheader{
|
||||
margin-bottom: 0;
|
||||
color: #3c3c3c;
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.inpost-shipping-label{
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.easypack-widget .map-list-row{
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.inpost-shipping-customer{
|
||||
margin-bottom: 0;
|
||||
color: #3c3c3c;
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.inpost-shipping-machine-customer-info{
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
@media (min-width: 576px){
|
||||
.inpost-shipping-machine-customer-info{
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.inpost-shipping-machine-customer-info.hidden{
|
||||
display: none;
|
||||
}
|
||||
|
||||
.inpost-shipping-customer-change-wrapper{
|
||||
margin-bottom: 0;
|
||||
text-align: right;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.inpost-shipping-customer-change{
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.inpost-shipping-customer-change-form{
|
||||
padding-top: 20px;
|
||||
display: none;
|
||||
}
|
||||
32
modules/inpostshipping/views/css/index.php
Normal file
32
modules/inpostshipping/views/css/index.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*/
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../');
|
||||
exit;
|
||||
32
modules/inpostshipping/views/img/index.php
Normal file
32
modules/inpostshipping/views/img/index.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*/
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../');
|
||||
exit;
|
||||
BIN
modules/inpostshipping/views/img/logo.png
Normal file
BIN
modules/inpostshipping/views/img/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.1 KiB |
BIN
modules/inpostshipping/views/img/logo_locker.png
Normal file
BIN
modules/inpostshipping/views/img/logo_locker.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.5 KiB |
BIN
modules/inpostshipping/views/img/logo_weekend.png
Normal file
BIN
modules/inpostshipping/views/img/logo_weekend.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.5 KiB |
32
modules/inpostshipping/views/index.php
Normal file
32
modules/inpostshipping/views/index.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*/
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../');
|
||||
exit;
|
||||
45
modules/inpostshipping/views/js/admin/common.js
Normal file
45
modules/inpostshipping/views/js/admin/common.js
Normal file
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*/
|
||||
$(document).ready(function() {
|
||||
$(document).on('click', '.js-createDispatchOrder', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
const link = $(this);
|
||||
const form = $('#inpost-dispatch-order-form');
|
||||
|
||||
form.find('input[name="id_shipment"]').val(link.data('id-shipment'));
|
||||
openDispatchOrderModal(link.attr('href'));
|
||||
});
|
||||
|
||||
$(document).on('click', '.js-printLabel', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
openPrintLabelModal($(this).attr('href'));
|
||||
});
|
||||
|
||||
$(document).on('click', '.js-printReturnLabel', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
openPrintLabelModal($(this).attr('href'), false);
|
||||
});
|
||||
});
|
||||
38
modules/inpostshipping/views/js/admin/dispatch-orders.js
Normal file
38
modules/inpostshipping/views/js/admin/dispatch-orders.js
Normal file
@@ -0,0 +1,38 @@
|
||||
/**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*/
|
||||
$(document).ready(function () {
|
||||
$(document).on('click', '.js-print', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
inPostShippingXhr({
|
||||
type: 'GET',
|
||||
url: $(this).attr('href'),
|
||||
callbackBlob: blobFileDownload,
|
||||
callbackJson: function (response) {
|
||||
if ('errors' in response) {
|
||||
displayAjaxErrors(response.errors);
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
28
modules/inpostshipping/views/js/admin/dispatch-points.js
Normal file
28
modules/inpostshipping/views/js/admin/dispatch-points.js
Normal file
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*/
|
||||
$(document).ready(function () {
|
||||
const headTabs = $('#head_tabs_inpost');
|
||||
|
||||
$('#head_tabs').html(headTabs.html());
|
||||
headTabs.remove();
|
||||
});
|
||||
32
modules/inpostshipping/views/js/admin/index.php
Normal file
32
modules/inpostshipping/views/js/admin/index.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*/
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../');
|
||||
exit;
|
||||
318
modules/inpostshipping/views/js/admin/order-details.js
Normal file
318
modules/inpostshipping/views/js/admin/order-details.js
Normal file
@@ -0,0 +1,318 @@
|
||||
/**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*/
|
||||
$(document).ready(function () {
|
||||
$('#inpost-create-shipment-modal').on('shown.bs.modal', function() {
|
||||
$(document).off('focusin.modal');
|
||||
});
|
||||
|
||||
$(document).on('click', '.js-submit-shipment-form', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
const button = $(this);
|
||||
const form = $('#inpost-shipment-form');
|
||||
const formData = new FormData(form.get(0));
|
||||
formData.append('ajax', '1');
|
||||
|
||||
inPostShippingXhr({
|
||||
type: 'POST',
|
||||
url: form.attr('action'),
|
||||
data: formData,
|
||||
callbackJson: function (response) {
|
||||
if (response.status === true) {
|
||||
window.location.reload();
|
||||
} else {
|
||||
const errorsWrapper = $('#inpost-shipment-form-errors');
|
||||
const errors = response.errors.join('</li><li>');
|
||||
|
||||
errorsWrapper.html(`<article class="alert alert-danger"><ul><li>${errors}</li></ul></article>`);
|
||||
scrollElementIntoView(errorsWrapper);
|
||||
|
||||
if ('shipmentId' in response) {
|
||||
form.find('.form-wrapper').remove();
|
||||
button.remove();
|
||||
$('#inpost-create-shipment-modal').on('hidden.bs.modal', function () {
|
||||
window.location.reload();
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click', '.js-submit-dispatch-order-form', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
submitDispatchOrderForm();
|
||||
});
|
||||
|
||||
$(document).on('click', '.js-printDispatchOrder', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
inPostShippingXhr({
|
||||
url: $(this).attr('href'),
|
||||
callbackBlob: blobFileDownload,
|
||||
callbackJson: function (response) {
|
||||
if ('errors' in response) {
|
||||
showErrorMessage(response.errors.join('<br/>'));
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click', '.js-submit-print-label-form', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
submitPrintLabelForm(function (response) {
|
||||
if ('errors' in response) {
|
||||
showErrorMessage(response.errors.join('<br/>'));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
let id_shipment = null;
|
||||
$(document).on('click', '.js-view-inpost-shipment-details', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
const dataId = $(this).data('id-shipment');
|
||||
|
||||
if (id_shipment !== dataId) {
|
||||
$.ajax({
|
||||
url: $(this).attr('href'),
|
||||
dataType: 'json',
|
||||
success: function (response) {
|
||||
if (response.status === true) {
|
||||
id_shipment = dataId;
|
||||
const contentWrapper = $('#inpost-shipment-details-content-wrapper');
|
||||
contentWrapper.html(response.content);
|
||||
if (shopIs177) {
|
||||
contentWrapper.find('[data-toggle="pstooltip"]').pstooltip();
|
||||
}
|
||||
$('#inpost-shipment-details-modal').modal('show');
|
||||
} else {
|
||||
showErrorMessage(response.errors.join('<br/>'));
|
||||
}
|
||||
},
|
||||
});
|
||||
} else {
|
||||
$('#inpost-shipment-details-modal').modal('show');
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.js-inpost-new-dispatch-order', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
const url = new URL($(this).attr('href'));
|
||||
url.searchParams.set('back', window.location.href);
|
||||
|
||||
window.location.href = url.toString();
|
||||
});
|
||||
|
||||
$(document).on('click', '.js-inpost-clear-point', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
const input = $($(this).data('target'));
|
||||
input.data('point', '');
|
||||
input.val('');
|
||||
});
|
||||
|
||||
$(document).on('change', '#service', changeShippingService);
|
||||
$(document).on('change', '#sending_method', changeSendingMethod);
|
||||
$(document).on('change', 'input[name="use_template"]', toggleTemplate);
|
||||
$(document).on('change', 'input[name="cod"]', toggleCashOnDelivery);
|
||||
$(document).on('change', 'input[name="insurance"]', toggleInsurance);
|
||||
|
||||
changeShippingService();
|
||||
toggleCashOnDelivery();
|
||||
|
||||
const map = new InPostShippingModalMap();
|
||||
|
||||
function openMap(selector, payment = false, weekendDelivery = false, callback = null) {
|
||||
map.openMap({
|
||||
payment: payment,
|
||||
weekendDelivery: weekendDelivery,
|
||||
pointName: selector.data('point'),
|
||||
type: selector.data('type'),
|
||||
function: selector.data('function'),
|
||||
callback: callback,
|
||||
});
|
||||
}
|
||||
|
||||
$(document).on('click', '.js-inpost-show-map-input', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
const input = $($(this).data('target-input'));
|
||||
|
||||
let payment, weekendDelivery = false;
|
||||
if (input.data('payment')) {
|
||||
payment = $('#cod_on').is(':checked');
|
||||
weekendDelivery = $('#weekend_delivery_on').is(':checked');
|
||||
}
|
||||
|
||||
openMap(input, payment, weekendDelivery, function (point) {
|
||||
input.data('point', point.name);
|
||||
input.val(point.name);
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click', '.js-inpost-show-map', function () {
|
||||
openMap($(this));
|
||||
});
|
||||
|
||||
const lockerAddress = $('.js-inpost-locker-address');
|
||||
|
||||
if (lockerAddress.length > 0) {
|
||||
const target = shopIs177 ? '#addressShipping' : '#addressShipping .col-sm-6:not(.hidden-print)';
|
||||
|
||||
lockerAddress.appendTo(target).show();
|
||||
}
|
||||
});
|
||||
|
||||
function toggleTemplate() {
|
||||
if ($('input[name="use_template"]:checked').val() === '1') {
|
||||
$('#template').closest('.form-group').show();
|
||||
$('#js-inpost-package-dimensions').hide();
|
||||
} else {
|
||||
$('#template').closest('.form-group').hide();
|
||||
$('#js-inpost-package-dimensions').show();
|
||||
}
|
||||
}
|
||||
|
||||
function toggleCashOnDelivery() {
|
||||
if ($('input[name="cod"]:checked').val() === '1') {
|
||||
$('input[name="cod_amount"]').closest('.form-group').show();
|
||||
} else {
|
||||
$('input[name="cod_amount"]').closest('.form-group').hide();
|
||||
}
|
||||
|
||||
updateInsuranceDisplay();
|
||||
}
|
||||
|
||||
function toggleInsurance() {
|
||||
if ($('input[name="insurance"]:checked').val() === '1') {
|
||||
$('input[name="insurance_amount"]').closest('.form-group').show();
|
||||
} else {
|
||||
$('input[name="insurance_amount"]').closest('.form-group').hide();
|
||||
}
|
||||
}
|
||||
|
||||
function updateInsuranceDisplay() {
|
||||
if ($('#service').val() !== inPostLockerStandard && $('#cod_on').is(':checked')) {
|
||||
$('#insurance_on').prop('checked', true).trigger('change');
|
||||
$('input[name="insurance"]').closest('.form-group').hide();
|
||||
$('label[for="insurance_amount"]').addClass('required');
|
||||
} else {
|
||||
$('input[name="insurance"]').closest('.form-group').show();
|
||||
$('label[for="insurance_amount"]').removeClass('required');
|
||||
}
|
||||
}
|
||||
|
||||
function changeShippingService() {
|
||||
const service = $('#service').val();
|
||||
|
||||
if (service === inPostLockerStandard) {
|
||||
$('#inpost-locker-content-wrapper').show();
|
||||
} else {
|
||||
$('#inpost-locker-content-wrapper').hide();
|
||||
}
|
||||
|
||||
if (inPostLockerServices.indexOf(service) !== -1) {
|
||||
$('#js-inpost-dimension-template-content-wrapper').show();
|
||||
} else {
|
||||
$('#js-inpost-dimension-template-content-wrapper').hide();
|
||||
$('#template_off').prop('checked', true);
|
||||
toggleTemplate();
|
||||
}
|
||||
|
||||
updateSendingMethodOptions();
|
||||
updateInsuranceDisplay();
|
||||
}
|
||||
|
||||
function updateSendingMethodOptions() {
|
||||
const selectedService = $('#service option:selected');
|
||||
const availableSendingMethods = selectedService.data('sending-methods');
|
||||
|
||||
$('#sending_method option').each(function () {
|
||||
const disable = availableSendingMethods.indexOf($(this).val()) === -1;
|
||||
$(this)
|
||||
.prop('disabled', disable)
|
||||
.prop('hidden', disable);
|
||||
});
|
||||
|
||||
if ($('#sending_method option:selected').is(':disabled')) {
|
||||
const defaultSendingMethod = selectedService.data('default-sending-method');
|
||||
if (defaultSendingMethod) {
|
||||
$(`#sending_method option[value="${defaultSendingMethod}"]`).prop('selected', true);
|
||||
} else {
|
||||
$('#sending_method option:not(:disabled):first').prop('selected', true);
|
||||
}
|
||||
}
|
||||
|
||||
changeSendingMethod();
|
||||
}
|
||||
|
||||
function updateTemplateOptions() {
|
||||
const unavailableTemplates = $('#sending_method option:selected').data('unavailable-templates') || [];
|
||||
const selectedService = $('#service option:selected');
|
||||
let availableTemplates = selectedService.data('templates') || [];
|
||||
if (unavailableTemplates.length) {
|
||||
availableTemplates = availableTemplates.filter(function (template) {
|
||||
return unavailableTemplates.indexOf(template) === -1
|
||||
});
|
||||
}
|
||||
|
||||
$('#template option').each(function () {
|
||||
const disable = availableTemplates.indexOf($(this).val()) === -1;
|
||||
$(this)
|
||||
.prop('disabled', disable)
|
||||
.prop('hidden', disable);
|
||||
});
|
||||
|
||||
if ($('#template option:selected').is(':disabled')) {
|
||||
const defaultTemplate = selectedService.data('default-template');
|
||||
if (defaultTemplate && unavailableTemplates.indexOf(defaultTemplate) === -1) {
|
||||
$(`#template option[value="${defaultTemplate}"]`).prop('selected', true);
|
||||
} else {
|
||||
$('#template option:not(:disabled):first').prop('selected', true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function changeSendingMethod() {
|
||||
const popGroup = $('#dropoff_pop').closest('.form-group');
|
||||
const lockerGroup = $('#dropoff_locker').closest('.form-group');
|
||||
const sendingMethod = $('#sending_method').val();
|
||||
|
||||
popGroup.hide();
|
||||
lockerGroup.hide();
|
||||
|
||||
if (sendingMethod === 'parcel_locker') {
|
||||
lockerGroup.show();
|
||||
} else if (
|
||||
sendingMethod === 'pop' &&
|
||||
inPostLockerServices.indexOf($('#service').val()) !== -1
|
||||
) {
|
||||
popGroup.show();
|
||||
}
|
||||
|
||||
updateTemplateOptions();
|
||||
}
|
||||
131
modules/inpostshipping/views/js/admin/order-list.js
Normal file
131
modules/inpostshipping/views/js/admin/order-list.js
Normal file
@@ -0,0 +1,131 @@
|
||||
/**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*/
|
||||
$(document).ready(function () {
|
||||
$(document).on('click', '.js-inpost-bulk-create-shipments', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
submitBulkCreateShipments(function (response) {
|
||||
if ('redirect' in response) {
|
||||
window.location.href = response.redirect;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click', '.js-inpost-bulk-create-print-shipments', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
openPrintLabelModal($(this).data('action'));
|
||||
});
|
||||
|
||||
$(document).on('click', '.js-submit-print-label-form', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
submitBulkCreateShipments(function (response) {
|
||||
if ('shipmentIds' in response) {
|
||||
const formData = new FormData();
|
||||
$(response.shipmentIds).each(function (idx, value) {
|
||||
formData.append('inpost_shipmentBox[]', value);
|
||||
});
|
||||
|
||||
submitPrintLabelForm(function (response) {
|
||||
if ('errors' in response) {
|
||||
displayAjaxErrors(response.errors);
|
||||
}
|
||||
}, formData);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click', '.js-inpost-bulk-create-dispatch-orders', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
openDispatchOrderModal($(this).data('action'));
|
||||
});
|
||||
|
||||
$(document).on('click', '.js-submit-dispatch-order-form', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
submitDispatchOrderForm(getOrderBoxData());
|
||||
});
|
||||
|
||||
$(document).on('click', '.js-inpost-bulk-print-dispatch-orders', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
inPostShippingXhr({
|
||||
type: 'POST',
|
||||
url: $(this).data('action'),
|
||||
data: getOrderBoxData(),
|
||||
callbackBlob: blobFileDownload,
|
||||
callbackJson: function (response) {
|
||||
if ('errors' in response) {
|
||||
displayAjaxErrors(response.errors);
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click', '.js-inpost-bulk-refresh-shipment-status', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
inPostShippingXhr({
|
||||
type: 'POST',
|
||||
url: $(this).data('action'),
|
||||
data: getOrderBoxData(),
|
||||
callbackJson: function (response) {
|
||||
if ('errors' in response) {
|
||||
displayAjaxErrors(response.errors);
|
||||
} else {
|
||||
displayAjaxSuccess(response.message);
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
function submitBulkCreateShipments(callback) {
|
||||
inPostShippingXhr({
|
||||
type: 'POST',
|
||||
url: $('.js-inpost-bulk-create-shipments').data('action'),
|
||||
data: getOrderBoxData(),
|
||||
callbackJson: function (response) {
|
||||
if ('errors' in response) {
|
||||
displayAjaxErrors(response.errors);
|
||||
}
|
||||
|
||||
callback(response);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function getOrderBoxData() {
|
||||
const formData = new FormData();
|
||||
const boxes = shopIs177
|
||||
? $('.js-bulk-action-checkbox:checked')
|
||||
: $('#form-order input[name="orderBox[]"]:checked');
|
||||
|
||||
boxes.each(function () {
|
||||
formData.append('orderIds[]', $(this).val());
|
||||
});
|
||||
|
||||
return formData;
|
||||
}
|
||||
137
modules/inpostshipping/views/js/admin/shipments.js
Normal file
137
modules/inpostshipping/views/js/admin/shipments.js
Normal file
@@ -0,0 +1,137 @@
|
||||
/**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*/
|
||||
$(document).ready(function () {
|
||||
$('.bulk-actions a').each(function () {
|
||||
const that = $(this);
|
||||
|
||||
const actionRegex = /sendBulkAction\(.*, ['"]submit(.*)inpost_shipment['"]\)/;
|
||||
const matches = actionRegex.exec(that.attr('onclick'));
|
||||
if (matches != null && matches[1]) {
|
||||
that.removeAttr('onclick');
|
||||
that.addClass('js-bulk-' + matches[1].replace('Bulk', ''));
|
||||
that.attr('data-action', matches[1]);
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.js-bulk-printLabels', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
openPrintLabelModal(
|
||||
getBulkActionUrl($(this).data('action'))
|
||||
);
|
||||
});
|
||||
|
||||
$(document).on('click', '.js-bulk-printReturnLabels', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
openPrintLabelModal(
|
||||
getBulkActionUrl($(this).data('action')),
|
||||
false
|
||||
);
|
||||
});
|
||||
|
||||
$(document).on('click', '.js-bulk-printDispatchOrders', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
inPostShippingXhr({
|
||||
type: 'POST',
|
||||
url: getBulkActionUrl($(this).data('action')),
|
||||
data: getShipmentBoxData(),
|
||||
callbackBlob: blobFileDownload,
|
||||
callbackJson: function (response) {
|
||||
if ('errors' in response) {
|
||||
displayAjaxErrors(response.errors);
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click', '.js-bulk-createDispatchOrders', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
openDispatchOrderModal(
|
||||
getBulkActionUrl($(this).data('action'))
|
||||
);
|
||||
});
|
||||
|
||||
$(document).on('click', '.js-submit-dispatch-order-form', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
const formData = $('#inpost-dispatch-order-form').attr('action').indexOf('Bulk') !== -1
|
||||
? getShipmentBoxData()
|
||||
: null;
|
||||
|
||||
submitDispatchOrderForm(formData);
|
||||
});
|
||||
|
||||
$(document).on('click', '.js-printDispatchOrder', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
inPostShippingXhr({
|
||||
type: 'GET',
|
||||
url: $(this).attr('href'),
|
||||
callbackBlob: blobFileDownload,
|
||||
callbackJson: function (response) {
|
||||
if ('errors' in response) {
|
||||
displayAjaxErrors(response.errors);
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click', '.js-submit-print-label-form', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
const formData = $('#inpost-print-shipment-label-form').attr('action').indexOf('Bulk') !== -1
|
||||
? getShipmentBoxData()
|
||||
: null;
|
||||
|
||||
submitPrintLabelForm(function (response) {
|
||||
if ('errors' in response) {
|
||||
displayAjaxErrors(response.errors);
|
||||
$('#inpost-print-shipment-label-modal').modal('hide');
|
||||
}
|
||||
}, formData);
|
||||
});
|
||||
});
|
||||
|
||||
function getBulkActionUrl(action) {
|
||||
const url = new URL(controllerUrl);
|
||||
|
||||
url.searchParams.set('action', action);
|
||||
url.searchParams.set('ajax', '1');
|
||||
|
||||
return url.toString();
|
||||
}
|
||||
|
||||
function getShipmentBoxData()
|
||||
{
|
||||
const formData = new FormData();
|
||||
|
||||
$('#form-inpost_shipment input[name="inpost_shipmentBox[]"]:checked').each(function () {
|
||||
const input = $(this);
|
||||
formData.append(input.attr('name'), input.val());
|
||||
});
|
||||
|
||||
return formData;
|
||||
}
|
||||
189
modules/inpostshipping/views/js/admin/tools.js
Normal file
189
modules/inpostshipping/views/js/admin/tools.js
Normal file
@@ -0,0 +1,189 @@
|
||||
/**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*/
|
||||
function inPostShippingXhr(config) {
|
||||
const options = {
|
||||
type: config.type || 'POST',
|
||||
url: config.url || window.location.href,
|
||||
data: config.data || null,
|
||||
}
|
||||
|
||||
const loader = $('.inpost-loader');
|
||||
loader.addClass('active');
|
||||
|
||||
const xhr = new XMLHttpRequest();
|
||||
xhr.onreadystatechange = function () {
|
||||
if (xhr.readyState === XMLHttpRequest.HEADERS_RECEIVED) {
|
||||
const contentType = xhr.getResponseHeader('Content-type');
|
||||
if (contentType === 'application/json') {
|
||||
xhr.responseType = 'json';
|
||||
} else if (contentType === 'text/html') {
|
||||
xhr.responseType = 'text';
|
||||
} else {
|
||||
xhr.responseType = 'blob';
|
||||
}
|
||||
} else if (xhr.readyState === XMLHttpRequest.DONE) {
|
||||
loader.removeClass('active');
|
||||
|
||||
if (xhr.status === 200) {
|
||||
if (xhr.responseType === 'json') {
|
||||
if (typeof config.callbackJson === 'function') {
|
||||
config.callbackJson(xhr.response, xhr);
|
||||
}
|
||||
} else if (xhr.responseType === 'text') {
|
||||
if (typeof config.callbackHtml === 'function') {
|
||||
config.callbackHtml(xhr.response, xhr);
|
||||
}
|
||||
} else if (typeof config.callbackBlob === 'function') {
|
||||
config.callbackBlob(xhr.response, xhr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
xhr.open(options.type, options.url, true);
|
||||
xhr.send(options.data);
|
||||
}
|
||||
|
||||
function blobFileDownload(data, xhr) {
|
||||
let filename = '';
|
||||
const disposition = xhr.getResponseHeader('Content-Disposition');
|
||||
if (disposition && disposition.indexOf('attachment') !== -1) {
|
||||
const filenameRegex = /filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/;
|
||||
const matches = filenameRegex.exec(disposition);
|
||||
if (matches != null && matches[1]) {
|
||||
filename = matches[1].replace(/['"]/g, '');
|
||||
}
|
||||
}
|
||||
|
||||
const blob = new Blob([data], {
|
||||
type: xhr.getResponseHeader('Content-type'),
|
||||
});
|
||||
|
||||
const url = window.URL.createObjectURL(blob);
|
||||
const a = document.createElement('a');
|
||||
a.style.display = 'none';
|
||||
a.href = url;
|
||||
a.download = filename;
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
window.URL.revokeObjectURL(url);
|
||||
a.remove();
|
||||
}
|
||||
|
||||
function displayAjaxErrors(errors) {
|
||||
const ajaxBox = $('#ajaxBox');
|
||||
|
||||
errors = errors.join('</li><li>');
|
||||
ajaxBox
|
||||
.html(`<div class="alert alert-danger"><button type="button" class="close" data-dismiss="alert">×</button><ul><li>${errors}</li></ul></div>`)
|
||||
.show();
|
||||
|
||||
scrollElementIntoView(ajaxBox);
|
||||
}
|
||||
|
||||
function displayAjaxSuccess(message) {
|
||||
const ajaxBox = $('#ajaxBox');
|
||||
|
||||
ajaxBox
|
||||
.html(`<div class="alert alert-success"><button type="button" class="close" data-dismiss="alert">×</button>${message}</div>`)
|
||||
.show();
|
||||
|
||||
scrollElementIntoView(ajaxBox);
|
||||
}
|
||||
|
||||
function scrollElementIntoView(selector) {
|
||||
selector.get(0).scrollIntoView({
|
||||
block: 'end',
|
||||
behavior: 'smooth',
|
||||
});
|
||||
}
|
||||
|
||||
function openPrintLabelModal(action, showType = true) {
|
||||
const form = $('#inpost-print-shipment-label-form');
|
||||
|
||||
form.attr('action', action);
|
||||
if (showType) {
|
||||
form.find('input[name="label_type"]').closest('.form-group').show();
|
||||
} else {
|
||||
form.find('input[name="label_type"]').closest('.form-group').hide();
|
||||
}
|
||||
|
||||
$('#inpost-print-shipment-label-modal').modal('show');
|
||||
}
|
||||
|
||||
function submitPrintLabelForm(callbackJson, formData = null) {
|
||||
const form = $('#inpost-print-shipment-label-form');
|
||||
|
||||
if (formData) {
|
||||
form.find('input:checked').each(function () {
|
||||
const input = $(this);
|
||||
formData.append(input.attr('name'), input.val());
|
||||
});
|
||||
} else {
|
||||
formData = new FormData(form.get(0));
|
||||
}
|
||||
|
||||
inPostShippingXhr({
|
||||
url: form.attr('action'),
|
||||
data: formData,
|
||||
callbackBlob: function(data, xhr) {
|
||||
blobFileDownload(data, xhr);
|
||||
$('#inpost-print-shipment-label-modal').modal('hide');
|
||||
},
|
||||
callbackJson: callbackJson,
|
||||
});
|
||||
}
|
||||
|
||||
function openDispatchOrderModal(action) {
|
||||
const form = $('#inpost-dispatch-order-form');
|
||||
form.attr('action', action);
|
||||
|
||||
$('#inpost-create-dispatch-order-modal').modal('show');
|
||||
}
|
||||
|
||||
function submitDispatchOrderForm(formData = null) {
|
||||
const form = $('#inpost-dispatch-order-form');
|
||||
|
||||
if (formData) {
|
||||
formData.append('id_dispatch_point', $('#id_dispatch_point').val());
|
||||
} else {
|
||||
formData = new FormData(form.get(0));
|
||||
}
|
||||
|
||||
formData.append('ajax', '1');
|
||||
|
||||
inPostShippingXhr({
|
||||
url: form.attr('action'),
|
||||
data: formData,
|
||||
callbackJson: function (response) {
|
||||
if ('errors' in response) {
|
||||
const errors = response.errors.join('</li><li>');
|
||||
$('#inpost-dispatch-order-form-errors').html(`<article class="alert alert-danger"><ul><li>${errors}</li></ul></article>`);
|
||||
} else if ('redirect' in response) {
|
||||
window.location.href = response.redirect;
|
||||
} else {
|
||||
window.location.reload();
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
68
modules/inpostshipping/views/js/app.js
Normal file
68
modules/inpostshipping/views/js/app.js
Normal file
File diff suppressed because one or more lines are too long
218
modules/inpostshipping/views/js/checkout16.js
Normal file
218
modules/inpostshipping/views/js/checkout16.js
Normal file
@@ -0,0 +1,218 @@
|
||||
/**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*/
|
||||
$(function () {
|
||||
const inpostChooseMachineButtonSelector = '.js-inpost-shipping-choose-machine';
|
||||
const inpostCustomerChangeButtonSelector = '.js-inpost-shipping-customer-change';
|
||||
const inpostCustomerSaveButtonSelector = '.js-inpost-shipping-customer-form-save-button';
|
||||
const inpostInputSelector = '.js-inpost-shipping-input';
|
||||
const $carrierAreaFormSubmitButton = 'button[name=processCarrier]';
|
||||
const map = new InPostShippingModalMap();
|
||||
|
||||
$(document).on('click', inpostChooseMachineButtonSelector, function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
const $that = $(this);
|
||||
const payment = parseInt($that.attr('data-inpost-shipping-payment'));
|
||||
const weekendDelivery = parseInt($that.attr('data-inpost-shipping-weekend-delivery'));
|
||||
|
||||
const input = $(inpostInputSelector);
|
||||
|
||||
map.openMap({
|
||||
payment: payment,
|
||||
weekendDelivery: weekendDelivery,
|
||||
pointName: input.val(),
|
||||
callback: function (point) {
|
||||
const $machineInfo = $('.js-inpost-shipping-machine-info');
|
||||
const $customerInfo = $('.js-inpost-shipping-machine-customer-info');
|
||||
const $machineName = $('.js-inpost-shipping-machine-name');
|
||||
const $machineAddress = $('.js-inpost-shipping-machine-address');
|
||||
const $inpostChooseMachineButton = $('.js-inpost-shipping-choose-machine');
|
||||
const inpostChooseMachineButtonSelectorText = $inpostChooseMachineButton.attr('data-inpost-shipping-existing-text');
|
||||
|
||||
$machineName.html(point.name);
|
||||
$machineAddress.html(`${point.address.line1}, ${point.address.line2}`);
|
||||
$machineInfo.removeClass('hidden');
|
||||
$customerInfo.removeClass('hidden');
|
||||
$inpostChooseMachineButton.html(inpostChooseMachineButtonSelectorText);
|
||||
|
||||
input.val(point.name).trigger('change');
|
||||
}
|
||||
});
|
||||
|
||||
$('.widget-modal').parent('div').addClass('inpost-shipping-backdrop');
|
||||
});
|
||||
|
||||
$(document).on('click', inpostCustomerChangeButtonSelector, function () {
|
||||
const $inpostCustomerChangeForm = $('.inpost-shipping-customer-change-form');
|
||||
|
||||
$inpostCustomerChangeForm.slideToggle(300);
|
||||
});
|
||||
|
||||
$(document).on('click', inpostCustomerSaveButtonSelector, function () {
|
||||
const $inpostErrorsWrapper = $('.js-inpost-shipping-errors');
|
||||
const $inpostCustomerEmailInfo = $('.js-inpost-shipping-customer-info-email');
|
||||
const $inpostCustomerPhoneInfo = $('.js-inpost-shipping-customer-info-phone');
|
||||
const $inpostCustomerEmail = $('.js-inpost-shipping-email').val();
|
||||
const $inpostCustomerPhone = $('.js-inpost-shipping-phone').val();
|
||||
const $inpostCustomerChangeForm = $('.inpost-shipping-customer-change-form');
|
||||
const $inpostCustomerInputs = $inpostCustomerChangeForm.find('input.form-control');
|
||||
const formData = new FormData();
|
||||
|
||||
$.each($inpostCustomerInputs, function (index, element) {
|
||||
formData.append(element.name, element.value);
|
||||
});
|
||||
formData.append('action', 'updateReceiverDetails');
|
||||
|
||||
$.ajax({
|
||||
method: 'post',
|
||||
url: inPostAjaxController,
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
dataType: 'json',
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
$inpostErrorsWrapper.html('');
|
||||
$inpostCustomerEmailInfo.html($inpostCustomerEmail);
|
||||
$inpostCustomerPhoneInfo.html($inpostCustomerPhone);
|
||||
$inpostCustomerChangeForm.slideUp(300);
|
||||
} else {
|
||||
const errors = getInPostErrors(response, ['phone', 'email']);
|
||||
|
||||
$inpostErrorsWrapper.html(`<article class="alert alert-danger"><ul>${errors}</ul></article>`);
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('change', inpostInputSelector, function () {
|
||||
const $that = $(this);
|
||||
const $inpostErrorsWrapper = $('.js-inpost-shipping-errors');
|
||||
const formData = new FormData();
|
||||
formData.append($that.attr('name'), $that.val());
|
||||
formData.append('action', 'updateTargetLocker');
|
||||
|
||||
$.ajax({
|
||||
method: 'post',
|
||||
url: inPostAjaxController,
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
dataType: 'json',
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
$inpostErrorsWrapper.html('');
|
||||
} else {
|
||||
const errors = getInPostErrors(response);
|
||||
$inpostErrorsWrapper.html(`<article class="alert alert-danger"><ul>${errors}</ul></article>`);
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click', $carrierAreaFormSubmitButton, function () {
|
||||
const $inpostInput = $(inpostInputSelector);
|
||||
|
||||
if ($inpostInput.length && !$inpostInput.val().length) {
|
||||
const errorText = $inpostInput.attr('data-error-text')
|
||||
|
||||
if (!!$.prototype.fancybox)
|
||||
$.fancybox.open([
|
||||
{
|
||||
type: 'inline',
|
||||
autoScale: true,
|
||||
minHeight: 30,
|
||||
content: `<p class="fancybox-error">${errorText}</p>`
|
||||
}],
|
||||
{
|
||||
padding: 0
|
||||
});
|
||||
else {
|
||||
alert(errorText);
|
||||
}
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
const $paymentLinkSelector = '#opc_payment_methods-content a';
|
||||
$(document).on('click', $paymentLinkSelector, function (e) {
|
||||
const $inpostCustomerChangeForm = $('.js-inpost-shipping-container');
|
||||
if ($inpostCustomerChangeForm.length) {
|
||||
e.preventDefault();
|
||||
|
||||
const $that = $(this);
|
||||
const $inpostCustomerInputs = $inpostCustomerChangeForm.find('input.form-control');
|
||||
const formData = new FormData();
|
||||
|
||||
$.each($inpostCustomerInputs, function (index, element) {
|
||||
formData.append(element.name, element.value);
|
||||
});
|
||||
formData.append('action', 'updateChoice');
|
||||
|
||||
$.ajax({
|
||||
method: 'post',
|
||||
url: inPostAjaxController,
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
dataType: 'json',
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
window.location.href = $that.attr('href');
|
||||
} else {
|
||||
const errors = getInPostErrors(response);
|
||||
|
||||
if (!!$.prototype.fancybox)
|
||||
$.fancybox.open([
|
||||
{
|
||||
type: 'inline',
|
||||
autoScale: true,
|
||||
minHeight: 30,
|
||||
minWidth: 280,
|
||||
content: `<article class="alert alert-danger" style="margin-bottom: 0"><ul>${errors}</ul></article>`
|
||||
}],
|
||||
{
|
||||
padding: 0
|
||||
});
|
||||
else {
|
||||
alert(errors);
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
function getInPostErrors(response, types = ['phone', 'email', 'locker']) {
|
||||
let errors = '';
|
||||
$(types).each(function (idx, value) {
|
||||
if (value in response.errors) {
|
||||
errors += `<li>${response.errors[value]}</li>`;
|
||||
}
|
||||
});
|
||||
|
||||
return errors;
|
||||
}
|
||||
});
|
||||
152
modules/inpostshipping/views/js/checkout17.js
Normal file
152
modules/inpostshipping/views/js/checkout17.js
Normal file
@@ -0,0 +1,152 @@
|
||||
/**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*/
|
||||
$(function () {
|
||||
const inpostChooseMachineButtonSelector = '.js-inpost-shipping-choose-machine';
|
||||
const inpostCustomerChangeButtonSelector = '.js-inpost-shipping-customer-change';
|
||||
const inpostCustomerSaveButtonSelector = '.js-inpost-shipping-customer-form-save-button';
|
||||
const inpostCustomerEmailSelector = '.js-inpost-shipping-email';
|
||||
const inpostCustomerPhoneSelector = '.js-inpost-shipping-phone';
|
||||
const inpostCustomerInfoEmail = $('.js-inpost-shipping-customer-info-email');
|
||||
const inpostCustomerInfoPhone = $('.js-inpost-shipping-customer-info-phone');
|
||||
const map = new InPostShippingModalMap();
|
||||
|
||||
$(document).on('click', inpostChooseMachineButtonSelector, function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
const $that = $(this);
|
||||
const $paczkomatInput = $that.parents('.carrier-extra-content').find('.js-inpost-shipping-input');
|
||||
const payment = parseInt($that.attr('data-inpost-shipping-payment'));
|
||||
const weekendDelivery = parseInt($that.attr('data-inpost-shipping-weekend-delivery'));
|
||||
|
||||
map.openMap({
|
||||
payment: payment,
|
||||
weekendDelivery: weekendDelivery,
|
||||
pointName: $paczkomatInput.val(),
|
||||
callback: function (point) {
|
||||
const $choosedMethod = $paczkomatInput.parents('.carrier-extra-content');
|
||||
const $machineInfo = $choosedMethod.find('.js-inpost-shipping-machine-info');
|
||||
const $customerInfo = $choosedMethod.find('.js-inpost-shipping-machine-customer-info');
|
||||
const $machineName = $choosedMethod.find('.js-inpost-shipping-machine-name');
|
||||
const $machineAddress = $choosedMethod.find('.js-inpost-shipping-machine-address');
|
||||
const $inpostChooseMachineButton = $choosedMethod.find('.js-inpost-shipping-choose-machine');
|
||||
const $errorsContainer = $choosedMethod.find('.js-inpost-shipping-locker-errors');
|
||||
const inpostChooseMachineButtonSelectorText = $inpostChooseMachineButton.attr('data-inpost-shipping-existing-text');
|
||||
|
||||
const formData = new FormData();
|
||||
formData.append($paczkomatInput.attr('name'), point.name);
|
||||
formData.append('action', 'updateTargetLocker');
|
||||
|
||||
$.ajax({
|
||||
method: 'post',
|
||||
url: inPostAjaxController,
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
dataType: 'json',
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
$errorsContainer.html('');
|
||||
$machineName.html(point.name);
|
||||
$machineAddress.html(`${point.address.line1}, ${point.address.line2}`);
|
||||
$machineInfo.removeClass('hidden');
|
||||
$customerInfo.removeClass('hidden');
|
||||
$inpostChooseMachineButton.html(inpostChooseMachineButtonSelectorText);
|
||||
|
||||
$paczkomatInput.val(point.name);
|
||||
} else if ('locker' in response.errors) {
|
||||
$errorsContainer.html(`<li class="alert alert-danger">${response.errors.locker}</li>`);
|
||||
} else {
|
||||
alert(response.errors[0]);
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$('.widget-modal').parent('div').addClass('inpost-shipping-backdrop');
|
||||
});
|
||||
|
||||
$(document).on('click', inpostCustomerChangeButtonSelector, function () {
|
||||
const $that = $(this);
|
||||
const $inpostCustomerChangeForm = $that.parents('.carrier-extra-content').find('.inpost-shipping-customer-change-form');
|
||||
|
||||
$inpostCustomerChangeForm.slideToggle(300);
|
||||
})
|
||||
|
||||
$(document).on('click', inpostCustomerSaveButtonSelector, function () {
|
||||
const $that = $(this);
|
||||
const $inpostCustomerChangeForm = $that.parents('.carrier-extra-content').find('.inpost-shipping-customer-change-form');
|
||||
const $emailField = $inpostCustomerChangeForm.find(inpostCustomerEmailSelector);
|
||||
const $emailGroup = $emailField.closest('.form-group');
|
||||
const $emailErrorsContainer = $emailGroup.find('.help-block ul');
|
||||
const $phoneField = $inpostCustomerChangeForm.find(inpostCustomerPhoneSelector);
|
||||
const $phoneGroup = $phoneField.closest('.form-group');
|
||||
const $phoneErrorsContainer = $phoneGroup.find('.help-block ul');
|
||||
|
||||
const formData = new FormData();
|
||||
formData.append($emailField.attr('name'), $emailField.val());
|
||||
formData.append($phoneField.attr('name'), $phoneField.val());
|
||||
formData.append('action', 'updateReceiverDetails');
|
||||
|
||||
$.ajax({
|
||||
method: 'post',
|
||||
url: inPostAjaxController,
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
dataType: 'json',
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
$emailGroup.removeClass('has-errors');
|
||||
$emailErrorsContainer.html('');
|
||||
$phoneGroup.removeClass('has-errors');
|
||||
$phoneErrorsContainer.html('');
|
||||
$inpostCustomerChangeForm.slideUp(300);
|
||||
} else {
|
||||
if ('email' in response.errors) {
|
||||
$emailGroup.addClass('has-errors');
|
||||
$emailErrorsContainer.html(`<li class="alert alert-danger">${response.errors.email}</li>`);
|
||||
}
|
||||
if ('phone' in response.errors) {
|
||||
$phoneGroup.addClass('has-errors');
|
||||
$phoneErrorsContainer.html(`<li class="alert alert-danger">${response.errors.phone}</li>`);
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('input', inpostCustomerEmailSelector, function () {
|
||||
let val = $(this).val();
|
||||
|
||||
$(inpostCustomerEmailSelector).val(val);
|
||||
inpostCustomerInfoEmail.html(val);
|
||||
});
|
||||
|
||||
$(document).on('input', inpostCustomerPhoneSelector, function () {
|
||||
let val = $(this).val();
|
||||
|
||||
$(inpostCustomerPhoneSelector).val($(this).val());
|
||||
inpostCustomerInfoPhone.html(val);
|
||||
});
|
||||
});
|
||||
32
modules/inpostshipping/views/js/index.php
Normal file
32
modules/inpostshipping/views/js/index.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*/
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../');
|
||||
exit;
|
||||
92
modules/inpostshipping/views/js/map.js
Normal file
92
modules/inpostshipping/views/js/map.js
Normal file
@@ -0,0 +1,92 @@
|
||||
/**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*/
|
||||
class InPostShippingModalMap {
|
||||
constructor() {
|
||||
this.type = null;
|
||||
this.function = null;
|
||||
}
|
||||
|
||||
openMap(config) {
|
||||
const options = {
|
||||
payment: config.payment || false,
|
||||
weekendDelivery: config.weekendDelivery || false,
|
||||
pointName: config.pointName || '',
|
||||
type: 'parcel_locker_only' === config.type || 'pop' === config.type ? config.type : 'parcel_locker',
|
||||
function: 'parcel_send' === config.function ? 'parcel_send' : 'parcel_collect',
|
||||
};
|
||||
|
||||
if (options.payment || options.weekendDelivery) {
|
||||
options.type = 'parcel_locker_only';
|
||||
}
|
||||
|
||||
if (options.type !== this.type || options.function !== this.function) {
|
||||
this.type = options.type;
|
||||
this.function = options.function;
|
||||
|
||||
const widget = $('#widget-modal');
|
||||
if (widget.length) {
|
||||
widget.remove();
|
||||
}
|
||||
|
||||
const widgetConfig = {
|
||||
map: {
|
||||
initialTypes: [options.type],
|
||||
},
|
||||
points: {
|
||||
types: [options.type],
|
||||
functions: ['parcel', options.function],
|
||||
},
|
||||
display: {
|
||||
showTypesFilters: false,
|
||||
showSearchBar: true,
|
||||
},
|
||||
};
|
||||
|
||||
// if showOnlyWithPayment is set, only points that allow credit card payments are shown on the map
|
||||
/*
|
||||
if (options.payment) {
|
||||
widgetConfig.paymentFilter = {
|
||||
showOnlyWithPayment: true,
|
||||
};
|
||||
}
|
||||
*/
|
||||
|
||||
easyPack.init(widgetConfig);
|
||||
}
|
||||
|
||||
const modal = easyPack.modalMap(function (point, modal) {
|
||||
modal.closeModal();
|
||||
|
||||
if (typeof config.callback === 'function') {
|
||||
config.callback(point);
|
||||
}
|
||||
}, {});
|
||||
|
||||
const widget = $('#widget-modal');
|
||||
widget.css('max-height', '90%');
|
||||
|
||||
if ('' !== options.pointName) {
|
||||
modal.searchLockerPoint(options.pointName);
|
||||
}
|
||||
}
|
||||
}
|
||||
57
modules/inpostshipping/views/js/modules/supercheckout.js
Normal file
57
modules/inpostshipping/views/js/modules/supercheckout.js
Normal file
@@ -0,0 +1,57 @@
|
||||
/**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*/
|
||||
$(() => {
|
||||
if ('function' === typeof addSupercheckoutOrderValidator) {
|
||||
addSupercheckoutOrderValidator(() => {
|
||||
const $contentWrapper = $('.js-inpost-shipping-container:visible');
|
||||
|
||||
if ($contentWrapper.length > 0) {
|
||||
const formData = new FormData();
|
||||
|
||||
formData.append('action', 'updateChoice');
|
||||
$contentWrapper.find(':input').each((index, element) => {
|
||||
const $input = $(element);
|
||||
formData.append($input.attr('name'), $input.val());
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
async: false,
|
||||
method: 'post',
|
||||
url: inPostAjaxController,
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
dataType: 'json'
|
||||
}).then((response) => {
|
||||
if (false === response.success) {
|
||||
const errors = $.map(response.errors, (error) => `<li>${error}</li>`).join('');
|
||||
|
||||
throw {
|
||||
message: `<ul>${errors}</ul>`
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,23 @@
|
||||
{**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*}
|
||||
<div id="app"></div>
|
||||
32
modules/inpostshipping/views/templates/admin/index.php
Normal file
32
modules/inpostshipping/views/templates/admin/index.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*/
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../');
|
||||
exit;
|
||||
29
modules/inpostshipping/views/templates/admin/list-action.tpl
Normal file
29
modules/inpostshipping/views/templates/admin/list-action.tpl
Normal file
@@ -0,0 +1,29 @@
|
||||
{**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*}
|
||||
<a class="{$class|escape:'html':'UTF-8'}"
|
||||
href="{$href|escape:'html':'UTF-8'}"
|
||||
title="{$action|escape:'html':'UTF-8'}"
|
||||
data-id-shipment="{$id|intval}"
|
||||
>
|
||||
<i class="icon-{$icon|escape:'html':'UTF-8'}"></i> {$action|escape:'html':'UTF-8'}
|
||||
</a>
|
||||
33
modules/inpostshipping/views/templates/admin/nav-tabs.tpl
Normal file
33
modules/inpostshipping/views/templates/admin/nav-tabs.tpl
Normal file
@@ -0,0 +1,33 @@
|
||||
{**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*}
|
||||
<div class="page-head-tabs" id="head_tabs_inpost">
|
||||
<ul class="nav">
|
||||
{foreach $navTabs as $tab}
|
||||
<li class="nav-item">
|
||||
<a href="{$tab.href|escape:'html':'UTF-8'}" class="nav-link tab{if $tab.current} active current{/if}">
|
||||
{$tab.name|escape:'html':'UTF-8'}
|
||||
</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
@@ -0,0 +1,29 @@
|
||||
{**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*}
|
||||
{extends 'page_header_toolbar.tpl'}
|
||||
|
||||
{block 'toolbarBox' append}
|
||||
{if isset($navTabs) && $navTabs}
|
||||
{$navTabs}
|
||||
{/if}
|
||||
{/block}
|
||||
@@ -0,0 +1,64 @@
|
||||
{**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*}
|
||||
<div id="inpost-product-template" class="panel product-tab">
|
||||
<h3>{l s='Default InPost shipment dimension template' mod='inpostshipping'}</h3>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3" for="inpost-dimension-template">
|
||||
<span class="label-tooltip"
|
||||
data-toggle="tooltip"
|
||||
title="{l s='Templates for parcel locker shipments will be automatically filled based on the largest template selected for the ordered products' mod='inpostshipping'}"
|
||||
>
|
||||
{l s='Dimension template' mod='inpostshipping'}
|
||||
</span>
|
||||
</label>
|
||||
|
||||
<div class="col-lg-5">
|
||||
<select id="inpost-dimension-template" name="inpost_dimension_template">
|
||||
<option value=""{if !$selectedTemplate} selected="selected"{/if}>---</option>
|
||||
{foreach $templateChoices as $choice}
|
||||
<option value="{$choice.value|escape:'html':'UTF-8'}"
|
||||
{if $selectedTemplate === $choice.value}selected="selected"{/if}
|
||||
>
|
||||
{$choice.text|escape:'html':'UTF-8'}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel-footer">
|
||||
<a href="{$link->getAdminLink('AdminProducts')|escape:'html':'UTF-8'}" class="btn btn-default">
|
||||
<i class="process-icon-cancel"></i>
|
||||
{l s='Cancel'}
|
||||
</a>
|
||||
<button type="submit" name="submitAddproduct" class="btn btn-default pull-right">
|
||||
<i class="process-icon-save"></i>
|
||||
{l s='Save'}
|
||||
</button>
|
||||
<button type="submit" name="submitAddproductAndStay" class="btn btn-default pull-right">
|
||||
<i class="process-icon-save"></i>
|
||||
{l s='Save and stay'}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,135 @@
|
||||
{**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*}
|
||||
<div class="inpost-shipping-container col-sm-12 js-inpost-shipping-container">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="js-inpost-shipping-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
{if $lockerService}
|
||||
<div class="col-sm-6 col-md-7">
|
||||
<div class="inpost-shipping-machine-info js-inpost-shipping-machine-info {if !isset($locker) || !$locker}hidden{/if}">
|
||||
<p class="inpost-shipping-machine-name">
|
||||
{l s='Parcel Locker' mod='inpostshipping'}
|
||||
<span class="js-inpost-shipping-machine-name">
|
||||
{if isset($locker.name)}{$locker.name|escape:'html':'UTF-8'}{/if}
|
||||
</span>
|
||||
</p>
|
||||
<p class="inpost-shipping-machine-address js-inpost-shipping-machine-address">
|
||||
{if isset($locker.address.line1) && isset($locker.address.line2)}
|
||||
{$locker.address.line1|escape:'html':'UTF-8'}, {$locker.address.line2|escape:'html':'UTF-8'}
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-0">
|
||||
<span
|
||||
class="btn inpost-shipping-button js-inpost-shipping-choose-machine"
|
||||
data-inpost-shipping-payment="{$cashOnDelivery|intval}"
|
||||
data-inpost-shipping-weekend-delivery="{$weekendDelivery|intval}"
|
||||
data-inpost-shipping-existing-text="{l s='Change the selected Parcel Locker' mod='inpostshipping'}"
|
||||
>
|
||||
{if isset($locker) && $locker}
|
||||
{l s='Change the selected Parcel Locker' mod='inpostshipping'}
|
||||
{else}
|
||||
{l s='Select a Parcel Locker' mod='inpostshipping'}
|
||||
{/if}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="form-group d-none">
|
||||
<input type="text"
|
||||
name="inpost_locker[{$id_carrier|intval}]"
|
||||
value="{if isset($locker)}{$locker.name|escape:'html':'UTF-8'}{/if}"
|
||||
class="js-inpost-shipping-input form-control"
|
||||
data-error-text="{l s='Please select a Parcel Locker' mod='inpostshipping'}"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="col-sm-6 col-md-5{if !$lockerService} col-md-offset-7 col-sm-offset-6{/if}">
|
||||
<div class="inpost-shipping-machine-customer-info js-inpost-shipping-machine-customer-info">
|
||||
<p class="inpost-shipping-subheader">
|
||||
{l s='Your data' mod='inpostshipping'}:
|
||||
</p>
|
||||
<p class="inpost-shipping-customer">
|
||||
<span class="inpost-shipping-label">{l s='Email' mod='inpostshipping'}:</span>
|
||||
<span class="js-inpost-shipping-customer-info-email">{$email|escape:'html':'UTF-8'}</span>
|
||||
</p>
|
||||
<p class="inpost-shipping-customer">
|
||||
<span class="inpost-shipping-label">{l s='Phone' mod='inpostshipping'}:</span>
|
||||
<span class="js-inpost-shipping-customer-info-phone">{$phone|escape:'html':'UTF-8'}</span>
|
||||
</p>
|
||||
<p class="inpost-shipping-customer-change-wrapper">
|
||||
<a class="inpost-shipping-customer-change js-inpost-shipping-customer-change">
|
||||
{l s='change' mod='inpostshipping'}
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="inpost-shipping-customer-change-form" {if isset($errors.email) || isset($errors.phone) || empty($phone)}style="display: block"{/if}>
|
||||
<div class="form-group {if isset($errors.email)}has-error{/if}">
|
||||
<input type="text"
|
||||
id="inpost_email_{$id_carrier|intval}"
|
||||
name="inpost_email"
|
||||
value="{$email|escape:'html':'UTF-8'}"
|
||||
class="form-control js-inpost-shipping-email"
|
||||
>
|
||||
{if isset($errors.email)}
|
||||
<div class="help-block">
|
||||
<ul>
|
||||
<li class="alert alert-danger">{$errors.email|escape:'html':'UTF-8'}</li>
|
||||
</ul>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<div class="form-group {if isset($errors.phone)}has-error{/if}">
|
||||
<input type="text"
|
||||
id="inpost_phone_{$id_carrier|intval}"
|
||||
name="inpost_phone"
|
||||
value="{$phone|escape:'html':'UTF-8'}"
|
||||
class="form-control js-inpost-shipping-phone"
|
||||
>
|
||||
{if isset($errors.phone)}
|
||||
<div class="help-block">
|
||||
<ul>
|
||||
<li class="alert alert-danger">{$errors.phone|escape:'html':'UTF-8'}</li>
|
||||
</ul>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="form-group mb-0">
|
||||
<span class="btn btn-primary js-inpost-shipping-customer-form-save-button">
|
||||
{l s='Save' mod='inpostshipping'}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
32
modules/inpostshipping/views/templates/hook/16/index.php
Normal file
32
modules/inpostshipping/views/templates/hook/16/index.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*/
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../');
|
||||
exit;
|
||||
@@ -0,0 +1,34 @@
|
||||
{**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*}
|
||||
<div class="box box-small clearfix">
|
||||
<a class="button btn btn-default button-medium pull-right" href="{$returnFormUrl|escape:'html':'UTF-8'}" target="_blank">
|
||||
<span>
|
||||
{l s='Return order' mod='inpostshipping'}
|
||||
<i class="icon-chevron-right right"></i>
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<p class="dark">
|
||||
{l s='Szybkie Zwroty info text' mod='inpostshipping'}
|
||||
</p>
|
||||
</div>
|
||||
@@ -0,0 +1,125 @@
|
||||
{**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*}
|
||||
<div class="tab tab-pane" id="inpostshipping">
|
||||
<div class="card card-details mb-0">
|
||||
<div class="card-header d-none d-print-block">
|
||||
{l s='InPost Shipments' mod='inpostshipping'} (<span class="count">{$inPostShipments|count}</span>)
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-horizontal">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{l s='Service' mod='inpostshipping'}</th>
|
||||
<th>{l s='Shipment number' mod='inpostshipping'}</th>
|
||||
<th>{l s='State' mod='inpostshipping'}</th>
|
||||
<th class="text-right">{l s='Price' mod='inpostshipping'}</th>
|
||||
<th>{l s='Created at' mod='inpostshipping'}</th>
|
||||
<th class="text-right product_actions d-print-none">
|
||||
{l s='Actions' mod='inpostshipping'}
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $inPostShipments as $shipment}
|
||||
<tr>
|
||||
<td>
|
||||
{$shipment.service|escape:'html':'UTF-8'}
|
||||
</td>
|
||||
<td>
|
||||
{$shipment.tracking_number|escape:'html':'UTF-8'}
|
||||
</td>
|
||||
<td>
|
||||
{if $shipment.status.description}
|
||||
<span class="text-primary cursor-pointer" data-toggle="pstooltip" data-boundary="window" data-original-title="{$shipment.status.description|escape:'html':'UTF-8'}">
|
||||
{$shipment.status.title|escape:'html':'UTF-8'}
|
||||
</span>
|
||||
{else}
|
||||
{$shipment.status.title|escape:'html':'UTF-8'}
|
||||
{/if}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{if $shipment.price}{$shipment.price|escape:'html':'UTF-8'}{else}--{/if}
|
||||
</td>
|
||||
<td>
|
||||
{$shipment.date_add|escape:'html':'UTF-8'}
|
||||
</td>
|
||||
<td class="d-print-none action-type">
|
||||
<div class="btn-group-action text-right">
|
||||
<div class="btn-group">
|
||||
<a href="{$shipment.viewUrl|escape:'html':'UTF-8'}"
|
||||
class="btn tooltip-link js-view-inpost-shipment-details"
|
||||
data-toggle="pstooltip"
|
||||
data-original-title="{l s='Details' mod='inpostshipping'}"
|
||||
data-id-shipment="{$shipment.id|intval}"
|
||||
>
|
||||
<i class="material-icons">zoom_in</i>
|
||||
</a>
|
||||
<button class="btn btn-link dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"></button>
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
{foreach from=$shipment.actions key=key item=action name=actions}
|
||||
<a class="btn tooltip-link js-{$key|escape:'html':'UTF-8'} dropdown-item"
|
||||
href="{$action.url|escape:'html':'UTF-8'}"
|
||||
data-id-shipment="{$shipment.id|intval}"
|
||||
>
|
||||
<i class="material-icons">
|
||||
{if $action.icon === 'truck'}
|
||||
local_shipping
|
||||
{else}
|
||||
{$action.icon|escape:'html':'UTF-8'}
|
||||
{/if}
|
||||
</i>
|
||||
{$action.text|escape:'html':'UTF-8'}
|
||||
</a>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="row no-gutters d-print-none">
|
||||
<div class="col-sm-12 text-right">
|
||||
<a class="btn btn-secondary" href="{$inPostShipmentsListUrl|escape:'html':'UTF-8'}">
|
||||
{l s='Go to shipments list' mod='inpostshipping'}
|
||||
</a>
|
||||
<button class="btn btn-primary" data-toggle="modal" data-target="#inpost-create-shipment-modal">
|
||||
{l s='New shipment' mod='inpostshipping'}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{if isset($inPostLockerAddress)}
|
||||
<div class="js-inpost-locker-address" style="display: none">
|
||||
{$inPostLockerAddress}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -0,0 +1,28 @@
|
||||
{**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*}
|
||||
<li class="nav-item d-print-none">
|
||||
<a class="nav-link" data-toggle="tab" id="inpostshipping-nav" href="#inpostshipping">
|
||||
<i class="material-icons">local_shipping</i>
|
||||
{l s='InPost Shipments' mod='inpostshipping'} (<span class="count">{$inPostShipments|count}</span>)
|
||||
</a>
|
||||
</li>
|
||||
32
modules/inpostshipping/views/templates/hook/177/index.php
Normal file
32
modules/inpostshipping/views/templates/hook/177/index.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*/
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../');
|
||||
exit;
|
||||
@@ -0,0 +1,60 @@
|
||||
{**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*}
|
||||
<form id="inpost-dispatch-order-form"
|
||||
class="defaultForm form-horizontal"
|
||||
enctype="multipart/form-data"
|
||||
action="{$dispatchOrderAction|escape:'html':'UTF-8'}"
|
||||
autocomplete="off"
|
||||
>
|
||||
<div class="panel-body">
|
||||
<div id="inpost-dispatch-order-form-errors"></div>
|
||||
|
||||
<div class="form-wrapper">
|
||||
<input type="hidden" name="id_shipment" value="">
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="form-group">
|
||||
<label for="id_dispatch_point" class="form-control-label">
|
||||
{l s='Dispatch point' mod='inpostshipping'}
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<select name="id_dispatch_point" id="id_dispatch_point" class="custom-select">
|
||||
{foreach $dispatchPointChoices as $choice}
|
||||
<option value="{$choice.value|intval}"{if $choice.value == $defaultDispatchPoint} selected="selected"{/if}>
|
||||
{$choice.text|escape:'html':'UTF-8'}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
<a class="btn btn-primary fixed-width-md js-inpost-new-dispatch-order"
|
||||
href="{$newDispatchPointUrl|escape:'html':'UTF-8'}"
|
||||
>
|
||||
{l s='Add new' mod='inpostshipping'}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -0,0 +1,412 @@
|
||||
{**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*}
|
||||
<form id="inpost-shipment-form"
|
||||
class="defaultForm form-horizontal"
|
||||
enctype="multipart/form-data"
|
||||
action="{$shipmentAction|escape:'html':'UTF-8'}"
|
||||
autocomplete="off"
|
||||
>
|
||||
<div class="panel-body">
|
||||
<div id="inpost-shipment-form-errors"></div>
|
||||
|
||||
<div class="form-wrapper">
|
||||
<input type="hidden" name="id_order" value="{$id_order|intval}">
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="form-group">
|
||||
<label for="customer_email" class="form-control-label">
|
||||
{l s='Receiver email' mod='inpostshipping'}
|
||||
</label>
|
||||
<input
|
||||
class="form-control" type="text" name="email" id="customer_email"
|
||||
value="{$customerEmail|escape:'html':'UTF-8'}"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="form-group">
|
||||
<label for="customer_phone" class="form-control-label">
|
||||
{l s='Receiver phone' mod='inpostshipping'}
|
||||
</label>
|
||||
<input class="form-control" type="text" name="phone" id="customer_phone" value="{$customerPhone|escape:'html':'UTF-8'}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="form-group">
|
||||
<label for="service" class="form-control-label">
|
||||
{l s='Shipping service' mod='inpostshipping'}
|
||||
</label>
|
||||
<select name="service" id="service" class="custom-select">
|
||||
{foreach $serviceChoices as $choice}
|
||||
<option value="{$choice.value|escape:'html':'UTF-8'}"
|
||||
{if $choice.disabled}disabled="disabled"{/if}
|
||||
{if $choice.value == $selectedService}selected="selected"{/if}
|
||||
{if isset($defaultTemplates[$choice.value])}
|
||||
data-default-template="{$defaultTemplates[$choice.value]|escape:'html':'UTF-8'}"
|
||||
{/if}
|
||||
{if $choice.availableTemplates}
|
||||
data-templates='["{implode('","', $choice.availableTemplates)|escape:'html':'UTF-8'}"]'
|
||||
{/if}
|
||||
{if isset($defaultSendingMethods[$choice.value])}
|
||||
data-default-sending-method="{$defaultSendingMethods[$choice.value]|escape:'html':'UTF-8'}"
|
||||
{/if}
|
||||
data-sending-methods='["{implode('","', $choice.availableSendingMethods)|escape:'html':'UTF-8'}"]'
|
||||
>
|
||||
{$choice.text|escape:'html':'UTF-8'}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="form-group">
|
||||
<label for="sending_method" class="form-control-label">
|
||||
{l s='Sending method' mod='inpostshipping'}
|
||||
</label>
|
||||
<select name="sending_method" id="sending_method" class="custom-select">
|
||||
{foreach $sendingMethodChoices as $choice}
|
||||
<option value="{$choice.value|escape:'html':'UTF-8'}"
|
||||
{if $choice.value == $defaultSendingMethod}selected="selected"{/if}
|
||||
{if $choice.unavailableTemplates}
|
||||
data-unavailable-templates='["{implode('","', $choice.unavailableTemplates)|escape:'html':'UTF-8'}"]'
|
||||
{/if}
|
||||
>
|
||||
{$choice.text|escape:'html':'UTF-8'}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="form-group">
|
||||
<label for="dropoff_pop" class="form-control-label">
|
||||
{l s='Sending point' mod='inpostshipping'}
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<input type="text"
|
||||
name="dropoff_pop"
|
||||
id="dropoff_pop"
|
||||
value="{if $defaultPop}{$defaultPop.name|escape:'html':'UTF-8'}{/if}"
|
||||
class="form-control"
|
||||
data-type="pop"
|
||||
data-function="parcel_send"
|
||||
data-point="{if $defaultPop}{$defaultPop.name|escape:'html':'UTF-8'}{/if}"
|
||||
>
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-outline-secondary js-inpost-show-map-input" data-target-input="#dropoff_pop">
|
||||
{l s='Open map' mod='inpostshipping'}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="form-group">
|
||||
<label for="dropoff_locker" class="form-control-label">
|
||||
{l s='Sending point' mod='inpostshipping'}
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<input type="text"
|
||||
name="dropoff_locker"
|
||||
id="dropoff_locker"
|
||||
value="{if $defaultLocker}{$defaultLocker.name|escape:'html':'UTF-8'}{/if}"
|
||||
class="form-control"
|
||||
data-type="parcel_locker"
|
||||
data-function="parcel_send"
|
||||
data-point="{if $defaultLocker}{$defaultLocker.name|escape:'html':'UTF-8'}{/if}"
|
||||
>
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-outline-secondary js-inpost-show-map-input" data-target-input="#dropoff_locker">
|
||||
{l s='Open map' mod='inpostshipping'}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="inpost-locker-content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="form-group">
|
||||
<label for="sending_locker" class="form-control-label required">
|
||||
{l s='Target point' mod='inpostshipping'}
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<input type="text"
|
||||
name="target_point"
|
||||
id="target_point"
|
||||
value="{if $selectedPoint}{$selectedPoint|escape:'html':'UTF-8'}{/if}"
|
||||
class="form-control"
|
||||
data-payment="1"
|
||||
data-type="parcel_locker"
|
||||
data-function="parcel_collect"
|
||||
data-point="{if $selectedPoint}{$selectedPoint|escape:'html':'UTF-8'}{/if}"
|
||||
>
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-outline-secondary js-inpost-show-map-input" data-target-input="#target_point">
|
||||
{l s='Open map' mod='inpostshipping'}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="form-group">
|
||||
<label class="form-control-label">
|
||||
{l s='Weekend delivery' mod='inpostshipping'}
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<span class="ps-switch">
|
||||
<input type="radio"
|
||||
name="weekend_delivery"
|
||||
id="weekend_delivery_off"
|
||||
value="0"
|
||||
{if !$weekendDelivery}checked="checked"{/if}
|
||||
>
|
||||
<label for="weekend_delivery_off">{l s='No' mod='inpostshipping'}</label>
|
||||
<input type="radio"
|
||||
name="weekend_delivery"
|
||||
id="weekend_delivery_on"
|
||||
value="1"
|
||||
{if $weekendDelivery}checked="checked"{/if}
|
||||
>
|
||||
<label for="weekend_delivery_on">{l s='Yes' mod='inpostshipping'}</label>
|
||||
<a class="slide-button btn"></a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="form-group">
|
||||
<label for="reference" class="form-control-label">
|
||||
{l s='Reference' mod='inpostshipping'}
|
||||
</label>
|
||||
<input
|
||||
class="form-control" type="text" name="reference" id="reference"
|
||||
value="{$shipmentReference|escape:'html':'UTF-8'}"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="js-inpost-dimension-template-content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="form-group">
|
||||
<label class="form-control-label">
|
||||
{l s='Use a predefined dimension template' mod='inpostshipping'}
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<span class="ps-switch">
|
||||
<input type="radio" name="use_template" id="template_off" value="0"{if !$useTemplate} checked="checked"{/if}>
|
||||
<label for="template_off">{l s='No' mod='inpostshipping'}</label>
|
||||
<input type="radio" name="use_template" id="template_on" value="1"{if $useTemplate} checked="checked"{/if}>
|
||||
<label for="template_on">{l s='Yes' mod='inpostshipping'}</label>
|
||||
<a class="slide-button btn"></a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="form-group"{if !$useTemplate} style="display: none"{/if}>
|
||||
<label for="template" class="form-control-label">
|
||||
{l s='Dimension template' mod='inpostshipping'}
|
||||
</label>
|
||||
<select name="template" id="template" class="custom-select">
|
||||
{foreach $dimensionTemplateChoices as $choice}
|
||||
<option value="{$choice.value|escape:'html':'UTF-8'}"{if $choice.value == $template} selected="selected"{/if}>
|
||||
{$choice.text|escape:'html':'UTF-8'}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="js-inpost-package-dimensions"{if $useTemplate} style="display: none"{/if}>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="form-group">
|
||||
<label for="length" class="form-control-label required">
|
||||
{l s='Length' mod='inpostshipping'}
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text">mm</div>
|
||||
</div>
|
||||
<input type="text" name="dimensions[length]" id="length" value="{$length|floatval}" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="form-group">
|
||||
<label for="width" class="form-control-label required">
|
||||
{l s='Width' mod='inpostshipping'}
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text">mm</div>
|
||||
</div>
|
||||
<input type="text" name="dimensions[width]" id="width" value="{$width|floatval}" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="form-group">
|
||||
<label for="height" class="form-control-label required">
|
||||
{l s='Height' mod='inpostshipping'}
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text">mm</div>
|
||||
</div>
|
||||
<input type="text" name="dimensions[height]" id="height" value="{$height|floatval}" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="form-group">
|
||||
<label for="weight" class="form-control-label required">
|
||||
{l s='Weight' mod='inpostshipping'}
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text">kg</div>
|
||||
</div>
|
||||
<input type="text" name="weight" id="weight" value="{$weight|floatval}" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="form-group">
|
||||
<label class="form-control-label">
|
||||
{l s='Cash on delivery' mod='inpostshipping'}
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<span class="ps-switch">
|
||||
<input type="radio" name="cod" id="cod_off" value="0"{if !$cashOnDelivery} checked="checked"{/if}>
|
||||
<label for="cod_off">{l s='No' mod='inpostshipping'}</label>
|
||||
<input type="radio" name="cod" id="cod_on" value="1" {if $cashOnDelivery} checked="checked"{/if}>
|
||||
<label for="cod_on">{l s='Yes' mod='inpostshipping'}</label>
|
||||
<a class="slide-button btn"></a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="form-group">
|
||||
<label for="cod_amount" class="form-control-label">
|
||||
{l s='Cash on delivery amount' mod='inpostshipping'}
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text">{$currencySign|escape:'html':'UTF-8'}</div>
|
||||
</div>
|
||||
<input type="text" name="cod_amount" id="cod_amount" value="{$orderTotal|floatval}" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="form-group">
|
||||
<label class="form-control-label">
|
||||
{l s='Insurance' mod='inpostshipping'}
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<span class="ps-switch">
|
||||
<input type="radio" name="insurance" id="insurance_off" value="0" checked="checked">
|
||||
<label for="insurance_off">{l s='No' mod='inpostshipping'}</label>
|
||||
<input type="radio" name="insurance" id="insurance_on" value="1">
|
||||
<label for="insurance_on">{l s='Yes' mod='inpostshipping'}</label>
|
||||
<a class="slide-button btn"></a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="form-group" style="display: none">
|
||||
<label for="insurance_amount" class="form-control-label">
|
||||
{l s='Insurance amount' mod='inpostshipping'}
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text">{$currencySign|escape:'html':'UTF-8'}</div>
|
||||
</div>
|
||||
<input type="text" name="insurance_amount" id="insurance_amount" value="{$orderTotal|floatval}" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*/
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../');
|
||||
exit;
|
||||
@@ -0,0 +1,55 @@
|
||||
{**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*}
|
||||
<div class="modal fade" id="{$modal_id|escape:'html':'UTF-8'}" tabindex="-1">
|
||||
<div class="modal-dialog {if isset($modal_class)}{$modal_class|escape:'html':'UTF-8'}{/if}">
|
||||
<div class="modal-content">
|
||||
{if isset($modal_title)}
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">{$modal_title|escape:'html':'UTF-8'}</h4>
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="modal-body">
|
||||
{$modal_content}
|
||||
</div>
|
||||
|
||||
{if isset($modal_actions)}
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal">{l s='Close' d='Admin.Actions'}</button>
|
||||
{foreach $modal_actions as $action}
|
||||
{if $action.type == 'link'}
|
||||
<a href="{$action.href|escape:'html':'UTF-8'}" class="btn {$action.class|escape:'html':'UTF-8'}">
|
||||
{$action.label|escape:'html':'UTF-8'}
|
||||
</a>
|
||||
{elseif $action.type == 'button'}
|
||||
<button type="button" value="{$action.value|escape:'html':'UTF-8'}" class="btn {$action.class|escape:'html':'UTF-8'}">
|
||||
{$action.label|escape:'html':'UTF-8'}
|
||||
</button>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,75 @@
|
||||
{**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*}
|
||||
<form id="inpost-print-shipment-label-form"
|
||||
class="defaultForm form-horizontal"
|
||||
enctype="multipart/form-data"
|
||||
action=""
|
||||
>
|
||||
<div class="panel-body">
|
||||
<div class="form-wrapper">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="form-group">
|
||||
<label class="form-control-label">
|
||||
{l s='Label format' mod='inpostshipping'}
|
||||
</label>
|
||||
{foreach $labelFormatChoices as $choice}
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio"
|
||||
name="label_format"
|
||||
id="label_format_{$choice.value|escape:'html':'UTF-8'}"
|
||||
value="{$choice.value|escape:'html':'UTF-8'}"
|
||||
{if $choice.value === $defaultLabelFormat}checked="checked"{/if}
|
||||
>
|
||||
{$choice.text|escape:'html':'UTF-8'}
|
||||
</label>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
<div class="form-group">
|
||||
<label class="form-control-label">
|
||||
{l s='Label type' mod='inpostshipping'}
|
||||
</label>
|
||||
{foreach $labelTypeChoices as $choice}
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio"
|
||||
name="label_type"
|
||||
id="label_type_{$choice.value|escape:'html':'UTF-8'}"
|
||||
value="{$choice.value|escape:'html':'UTF-8'}"
|
||||
{if $choice.value === $defaultLabelType}checked="checked"{/if}
|
||||
>
|
||||
{$choice.text|escape:'html':'UTF-8'}
|
||||
</label>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -0,0 +1,182 @@
|
||||
{**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*}
|
||||
<div class="panel-body">
|
||||
<div class="form-horizontal">
|
||||
<div class="form-group row">
|
||||
<label class="form-control-label font-weight-bold">{l s='Reference' mod='inpostshipping'}</label>
|
||||
<div class="col-sm">
|
||||
<div class="form-control border-0">{$shipment.reference|escape:'html':'UTF-8'}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="form-control-label font-weight-bold">{l s='Shipment number' mod='inpostshipping'}</label>
|
||||
<div class="col-sm">
|
||||
<div class="form-control border-0">{$shipment.tracking_number|escape:'html':'UTF-8'}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="form-control-label font-weight-bold">{l s='Created at' mod='inpostshipping'}</label>
|
||||
<div class="col-sm">
|
||||
<div class="form-control border-0">{$shipment.date_add|escape:'html':'UTF-8'}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="form-control-label font-weight-bold">{l s='State' mod='inpostshipping'}</label>
|
||||
<div class="col-sm">
|
||||
<div class="form-control border-0">
|
||||
{if $shipment.status.description}
|
||||
<span class="text-primary cursor-pointer"
|
||||
data-toggle="pstooltip"
|
||||
data-original-title="{$shipment.status.description|escape:'html':'UTF-8'}"
|
||||
>
|
||||
{$shipment.status.title|escape:'html':'UTF-8'}
|
||||
</span>
|
||||
{else}
|
||||
{$shipment.status.title|escape:'html':'UTF-8'}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="form-control-label font-weight-bold">{l s='Sending method' mod='inpostshipping'}</label>
|
||||
<div class="col-sm">
|
||||
<div class="form-control border-0">
|
||||
{$shipment.sending_method|escape:'html':'UTF-8'}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{if $shipment.sending_point}
|
||||
<div class="form-group row">
|
||||
<label class="form-control-label font-weight-bold">{l s='Sending point' mod='inpostshipping'}</label>
|
||||
<div class="col-sm">
|
||||
<div class="form-control border-0">
|
||||
<span class="js-inpost-show-map text-primary cursor-pointer"
|
||||
id="inpost-map-{$shipment.sending_point|escape:'html':'UTF-8'}"
|
||||
data-type="{$shipment.point_type|escape:'html':'UTF-8'}"
|
||||
data-function="parcel_send"
|
||||
data-point="{$shipment.sending_point|escape:'html':'UTF-8'}"
|
||||
data-toggle="pstooltip"
|
||||
data-original-title="{l s='Show on map' mod='inpostshipping'}"
|
||||
>
|
||||
{$shipment.sending_point|escape:'html':'UTF-8'}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="form-control-label font-weight-bold">{l s='InPost Service' mod='inpostshipping'}</label>
|
||||
<div class="col-sm">
|
||||
<div class="form-control border-0">
|
||||
{$shipment.service|escape:'html':'UTF-8'}
|
||||
{if $shipment.weekend_delivery}
|
||||
- {l s='Weekend delivery' mod='inpostshipping'}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="form-control-label font-weight-bold">{l s='Receiver email' mod='inpostshipping'}</label>
|
||||
<div class="col-sm">
|
||||
<div class="form-control border-0">{$shipment.email|escape:'html':'UTF-8'}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="form-control-label font-weight-bold">{l s='Receiver phone' mod='inpostshipping'}</label>
|
||||
<div class="col-sm">
|
||||
<div class="form-control border-0">{$shipment.phone|escape:'html':'UTF-8'}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{if $shipment.target_point}
|
||||
<div class="form-group row">
|
||||
<label class="form-control-label font-weight-bold">{l s='Target point' mod='inpostshipping'}</label>
|
||||
<div class="col-sm">
|
||||
<div class="form-control border-0">
|
||||
<span class="js-inpost-show-map text-primary cursor-pointer"
|
||||
id="inpost-map-{$shipment.target_point|escape:'html':'UTF-8'}"
|
||||
data-type="parcel_locker"
|
||||
data-function="parcel_collect"
|
||||
data-point="{$shipment.target_point|escape:'html':'UTF-8'}"
|
||||
data-toggle="pstooltip"
|
||||
data-original-title="{l s='Show on map' mod='inpostshipping'}"
|
||||
>
|
||||
{$shipment.target_point|escape:'html':'UTF-8'}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $shipment.template}
|
||||
<div class="form-group row">
|
||||
<label class="form-control-label font-weight-bold">{l s='Dimension template' mod='inpostshipping'}</label>
|
||||
<div class="col-sm">
|
||||
<div class="form-control border-0">{$shipment.template|escape:'html':'UTF-8'}</div>
|
||||
</div>
|
||||
</div>
|
||||
{else}
|
||||
<div class="form-group row">
|
||||
<label class="form-control-label font-weight-bold">{l s='Dimensions' mod='inpostshipping'}</label>
|
||||
<div class="col-sm">
|
||||
<div class="form-control border-0">
|
||||
{$shipment.dimensions.length|floatval} x {$shipment.dimensions.width|floatval} x {$shipment.dimensions.height|floatval} mm
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="form-control-label font-weight-bold">{l s='Weight' mod='inpostshipping'}</label>
|
||||
<div class="col-sm">
|
||||
<div class="form-control border-0">{$shipment.dimensions.weight|floatval} kg</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $shipment.cod_amount}
|
||||
<div class="form-group row">
|
||||
<label class="form-control-label font-weight-bold">{l s='Cash on delivery amount' mod='inpostshipping'}</label>
|
||||
<div class="col-sm">
|
||||
<div class="form-control border-0">{$shipment.cod_amount|escape:'html':'UTF-8'}</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $shipment.insurance_amount}
|
||||
<div class="form-group row">
|
||||
<label class="form-control-label font-weight-bold">{l s='Insurance amount' mod='inpostshipping'}</label>
|
||||
<div class="col-sm">
|
||||
<div class="form-control border-0">{$shipment.insurance_amount|escape:'html':'UTF-8'}</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,124 @@
|
||||
{**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*}
|
||||
<div class="tab-pane" id="inpostshipping">
|
||||
<h4 class="visible-print">{l s='InPost Shipments' mod='inpostshipping'}</h4>
|
||||
<div class="form-horizontal">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<span class="title_box">{l s='Service' mod='inpostshipping'}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span class="title_box">{l s='Shipment number' mod='inpostshipping'}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span class="title_box">{l s='State' mod='inpostshipping'}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span class="title_box">{l s='Price' mod='inpostshipping'}</span>
|
||||
</th>
|
||||
<th>
|
||||
<span class="title_box">{l s='Created at' mod='inpostshipping'}</span>
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $inPostShipments as $shipment}
|
||||
<tr>
|
||||
<td>
|
||||
{$shipment.service|escape:'html':'UTF-8'}
|
||||
</td>
|
||||
<td>
|
||||
{$shipment.tracking_number|escape:'html':'UTF-8'}
|
||||
</td>
|
||||
<td>
|
||||
{if $shipment.status.description}
|
||||
<a data-toggle="tooltip" title="{$shipment.status.description|escape:'html':'UTF-8'}">
|
||||
{$shipment.status.title|escape:'html':'UTF-8'}
|
||||
</a>
|
||||
{else}
|
||||
{$shipment.status.title|escape:'html':'UTF-8'}
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
{if $shipment.price}{$shipment.price|escape:'html':'UTF-8'}{else}--{/if}
|
||||
</td>
|
||||
<td>
|
||||
{$shipment.date_add|escape:'html':'UTF-8'}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<div class="btn-group-action">
|
||||
<div class="btn-group pull-right">
|
||||
<a href="{$shipment.viewUrl|escape:'html':'UTF-8'}"
|
||||
class="btn btn-default js-view-inpost-shipment-details"
|
||||
data-id-shipment="{$shipment.id|intval}"
|
||||
>
|
||||
<i class="icon-eye"></i>
|
||||
{l s='Details' mod='inpostshipping'}
|
||||
</a>
|
||||
|
||||
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="icon-caret-down"></i>
|
||||
</button>
|
||||
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
{foreach from=$shipment.actions key=key item=action name=actions}
|
||||
<li>
|
||||
<a href="{$action.url|escape:'html':'UTF-8'}"
|
||||
class="js-{$key|escape:'html':'UTF-8'}"
|
||||
data-id-shipment="{$shipment.id|intval}"
|
||||
>
|
||||
<i class="icon-{$action.icon|escape:'html':'UTF-8'}"></i>
|
||||
{$action.text|escape:'html':'UTF-8'}
|
||||
</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="row">
|
||||
<a class="btn btn-default" href="{$inPostShipmentsListUrl|escape:'html':'UTF-8'}">
|
||||
{l s='Go to shipments list' mod='inpostshipping'}
|
||||
</a>
|
||||
<button class="btn btn-primary" data-toggle="modal" data-target="#inpost-create-shipment-modal">
|
||||
{l s='New shipment' mod='inpostshipping'}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{if isset($inPostLockerAddress)}
|
||||
<div class="js-inpost-locker-address" style="display: none">
|
||||
{$inPostLockerAddress}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -0,0 +1,28 @@
|
||||
{**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*}
|
||||
<li>
|
||||
<a id="inpostshipping-nav" href="#inpostshipping">
|
||||
<i class="icon-truck"></i>
|
||||
{l s='InPost Shipments' mod='inpostshipping'} <span class="badge">{$inPostShipments|count}</span>
|
||||
</a>
|
||||
</li>
|
||||
@@ -0,0 +1,46 @@
|
||||
{**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*}
|
||||
<div class="panel col-lg-12">
|
||||
<div class="panel-heading">
|
||||
<i class="icon-truck"></i>
|
||||
{$moduleDisplayName|escape:'html':'UTF-8'}
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="btn-group dropup">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
{l s='For the selected orders' mod='inpostshipping'}
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
{foreach $bulkActions as $bulkAction}
|
||||
<li>
|
||||
<a href="#" class="{$bulkAction.class|escape:'html':'UTF-8'}" data-action="{$bulkAction.action|escape:'html':'UTF-8'}">
|
||||
<i class="icon-{$bulkAction.icon|escape:'html':'UTF-8'}"></i>
|
||||
{$bulkAction.label|escape:'html':'UTF-8'}
|
||||
</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,52 @@
|
||||
{**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*}
|
||||
<div class="col-md-12">
|
||||
<h2>
|
||||
{l s='Default InPost shipment dimension template' mod='inpostshipping'}
|
||||
<span class="help-box"
|
||||
data-toggle="popover"
|
||||
data-content="{l s='Templates for parcel locker shipments will be automatically filled based on the largest template selected for the ordered products' mod='inpostshipping'}"
|
||||
></span>
|
||||
</h2>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<fieldset class="form-group">
|
||||
<label for="inpost-dimension-template">
|
||||
{l s='Dimension template' mod='inpostshipping'}
|
||||
</label>
|
||||
|
||||
<select id="inpost-dimension-template"
|
||||
name="inpost_dimension_template"
|
||||
class="custom-select"
|
||||
>
|
||||
<option value=""{if !$selectedTemplate} selected="selected"{/if}>---</option>
|
||||
{foreach $templateChoices as $choice}
|
||||
<option value="{$choice.value|escape:'html':'UTF-8'}"
|
||||
{if $selectedTemplate === $choice.value}selected="selected"{/if}
|
||||
>
|
||||
{$choice.text|escape:'html':'UTF-8'}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</fieldset>
|
||||
</div>
|
||||
@@ -0,0 +1,137 @@
|
||||
{**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*}
|
||||
<div class="inpost-shipping-container col-sm-12 js-inpost-shipping-container">
|
||||
<div class="row">
|
||||
{if $lockerService}
|
||||
<div class="col-sm-12">
|
||||
<ul class="js-inpost-shipping-locker-errors">
|
||||
{if isset($errors.locker)}
|
||||
<li class="alert alert-danger">{$errors.locker|escape:'html':'UTF-8'}</li>
|
||||
{/if}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6 col-md-7">
|
||||
<div class="inpost-shipping-machine-info js-inpost-shipping-machine-info {if !isset($locker) || !$locker}hidden{/if}">
|
||||
<p class="inpost-shipping-machine-name">
|
||||
{l s='Parcel Locker' mod='inpostshipping'}
|
||||
<span class="js-inpost-shipping-machine-name">
|
||||
{if isset($locker.name)}{$locker.name|escape:'html':'UTF-8'}{/if}
|
||||
</span>
|
||||
</p>
|
||||
<p class="inpost-shipping-machine-address js-inpost-shipping-machine-address">
|
||||
{if isset($locker.address.line1) && isset($locker.address.line2)}
|
||||
{$locker.address.line1|escape:'html':'UTF-8'}, {$locker.address.line2|escape:'html':'UTF-8'}
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-0">
|
||||
<span class="btn inpost-shipping-button js-inpost-shipping-choose-machine"
|
||||
data-inpost-shipping-payment="{$cashOnDelivery|intval}"
|
||||
data-inpost-shipping-weekend-delivery="{$weekendDelivery|intval}"
|
||||
data-inpost-shipping-existing-text="{l s='Change the selected Parcel Locker' mod='inpostshipping'}"
|
||||
>
|
||||
{if isset($locker) && $locker}
|
||||
{l s='Change the selected Parcel Locker' mod='inpostshipping'}
|
||||
{else}
|
||||
{l s='Select a Parcel Locker' mod='inpostshipping'}
|
||||
{/if}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="form-group d-none">
|
||||
<input type="text"
|
||||
name="inpost_locker[{$id_carrier|intval}]"
|
||||
value="{if isset($locker)}{$locker.name|escape:'html':'UTF-8'}{/if}"
|
||||
class="js-inpost-shipping-input form-control"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="col-sm-6 col-md-5{if !$lockerService} offset-md-7 offset-sm-6{/if}">
|
||||
<div class="inpost-shipping-machine-customer-info js-inpost-shipping-machine-customer-info">
|
||||
<p class="inpost-shipping-subheader">
|
||||
{l s='Your data' mod='inpostshipping'}:
|
||||
</p>
|
||||
<p class="inpost-shipping-customer">
|
||||
<span class="inpost-shipping-label">{l s='Email' mod='inpostshipping'}:</span>
|
||||
<span class="js-inpost-shipping-customer-info-email">{$email|escape:'html':'UTF-8'}</span>
|
||||
</p>
|
||||
<p class="inpost-shipping-customer">
|
||||
<span class="inpost-shipping-label">{l s='Phone' mod='inpostshipping'}:</span>
|
||||
<span class="js-inpost-shipping-customer-info-phone">{$phone|escape:'html':'UTF-8'}</span>
|
||||
</p>
|
||||
<p class="inpost-shipping-customer-change-wrapper">
|
||||
<a class="inpost-shipping-customer-change js-inpost-shipping-customer-change">
|
||||
{l s='change' mod='inpostshipping'}
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12">
|
||||
<div class="inpost-shipping-customer-change-form"
|
||||
{if isset($errors.email) || isset($errors.phone) || empty($phone)}style="display: block"{/if}
|
||||
>
|
||||
<div class="form-group {if isset($errors.email)}has-error{/if}">
|
||||
<input type="text"
|
||||
id="inpost_email_{$id_carrier|intval}"
|
||||
name="inpost_email"
|
||||
value="{$email|escape:'html':'UTF-8'}"
|
||||
class="form-control js-inpost-shipping-email"
|
||||
>
|
||||
<div class="help-block">
|
||||
<ul>
|
||||
{if isset($errors.email)}
|
||||
<li class="alert alert-danger">{$errors.email|escape:'html':'UTF-8'}</li>
|
||||
{/if}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group {if isset($errors.phone)}has-error{/if}">
|
||||
<input type="text"
|
||||
id="inpost_phone_{$id_carrier|intval}"
|
||||
name="inpost_phone"
|
||||
value="{$phone|escape:'html':'UTF-8'}"
|
||||
class="form-control js-inpost-shipping-phone"
|
||||
>
|
||||
<div class="help-block">
|
||||
<ul>
|
||||
{if isset($errors.phone)}
|
||||
<li class="alert alert-danger">{$errors.phone|escape:'html':'UTF-8'}</li>
|
||||
{/if}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-0">
|
||||
<span class="btn btn-primary js-inpost-shipping-customer-form-save-button">
|
||||
{l s='Save' mod='inpostshipping'}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
32
modules/inpostshipping/views/templates/hook/index.php
Normal file
32
modules/inpostshipping/views/templates/hook/index.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*/
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../');
|
||||
exit;
|
||||
25
modules/inpostshipping/views/templates/hook/loader.tpl
Normal file
25
modules/inpostshipping/views/templates/hook/loader.tpl
Normal file
@@ -0,0 +1,25 @@
|
||||
{**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*}
|
||||
<div class="inpost-loader">
|
||||
<i class="inpost-loader-animation"></i>
|
||||
</div>
|
||||
@@ -0,0 +1,59 @@
|
||||
{**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*}
|
||||
<form id="inpost-dispatch-order-form"
|
||||
class="defaultForm form-horizontal"
|
||||
enctype="multipart/form-data"
|
||||
action="{$dispatchOrderAction|escape:'html':'UTF-8'}"
|
||||
autocomplete="off"
|
||||
>
|
||||
<div class="panel-body">
|
||||
<div id="inpost-dispatch-order-form-errors"></div>
|
||||
|
||||
<div class="form-wrapper">
|
||||
<input type="hidden" name="id_shipment" value="">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="id_dispatch_point" class="control-label col-lg-3">
|
||||
{l s='Dispatch point' mod='inpostshipping'}
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
<select name="id_dispatch_point" id="id_dispatch_point">
|
||||
{foreach $dispatchPointChoices as $choice}
|
||||
<option value="{$choice.value|intval}"{if $choice.value == $defaultDispatchPoint} selected="selected"{/if}>
|
||||
{$choice.text|escape:'html':'UTF-8'}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
|
||||
<div class="row-margin-top">
|
||||
<a class="btn btn-primary fixed-width-md js-inpost-new-dispatch-order"
|
||||
href="{$newDispatchPointUrl|escape:'html':'UTF-8'}"
|
||||
>
|
||||
{l s='Add new' mod='inpostshipping'}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -0,0 +1,339 @@
|
||||
{**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*}
|
||||
<form id="inpost-shipment-form"
|
||||
class="defaultForm form-horizontal"
|
||||
enctype="multipart/form-data"
|
||||
action="{$shipmentAction|escape:'html':'UTF-8'}"
|
||||
autocomplete="off"
|
||||
>
|
||||
<div class="panel-body">
|
||||
<div id="inpost-shipment-form-errors"></div>
|
||||
|
||||
<div class="form-wrapper">
|
||||
<input type="hidden" name="id_order" value="{$id_order|intval}">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="customer_email" class="control-label col-lg-3">
|
||||
{l s='Receiver email' mod='inpostshipping'}
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
<input type="text" name="email" id="customer_email" value="{$customerEmail|escape:'html':'UTF-8'}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label for="customer_phone" class="control-label col-lg-3">
|
||||
{l s='Receiver phone' mod='inpostshipping'}
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
<input type="text" name="phone" id="customer_phone" value="{$customerPhone|escape:'html':'UTF-8'}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="service" class="control-label col-lg-3">
|
||||
{l s='Shipping service' mod='inpostshipping'}
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
<select name="service" id="service">
|
||||
{foreach $serviceChoices as $choice}
|
||||
<option value="{$choice.value|escape:'html':'UTF-8'}"
|
||||
{if $choice.disabled}disabled="disabled"{/if}
|
||||
{if $choice.value == $selectedService}selected="selected"{/if}
|
||||
{if isset($defaultTemplates[$choice.value])}
|
||||
data-default-template="{$defaultTemplates[$choice.value]|escape:'html':'UTF-8'}"
|
||||
{/if}
|
||||
{if $choice.availableTemplates}
|
||||
data-templates='["{implode('","', $choice.availableTemplates)|escape:'html':'UTF-8'}"]'
|
||||
{/if}
|
||||
{if isset($defaultSendingMethods[$choice.value])}
|
||||
data-default-sending-method="{$defaultSendingMethods[$choice.value]|escape:'html':'UTF-8'}"
|
||||
{/if}
|
||||
data-sending-methods='["{implode('","', $choice.availableSendingMethods)|escape:'html':'UTF-8'}"]'
|
||||
>
|
||||
{$choice.text|escape:'html':'UTF-8'}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="sending_method" class="control-label col-lg-3">
|
||||
{l s='Sending method' mod='inpostshipping'}
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
<select name="sending_method" id="sending_method">
|
||||
{foreach $sendingMethodChoices as $choice}
|
||||
<option value="{$choice.value|escape:'html':'UTF-8'}"
|
||||
{if $choice.value == $defaultSendingMethod}selected="selected"{/if}
|
||||
{if $choice.unavailableTemplates}
|
||||
data-unavailable-templates='["{implode('","', $choice.unavailableTemplates)|escape:'html':'UTF-8'}"]'
|
||||
{/if}
|
||||
>
|
||||
{$choice.text|escape:'html':'UTF-8'}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="dropoff_pop" class="control-label col-lg-3">
|
||||
{l s='Sending point' mod='inpostshipping'}
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="input-group">
|
||||
<input type="text"
|
||||
name="dropoff_pop"
|
||||
id="dropoff_pop"
|
||||
value="{if $defaultPop}{$defaultPop.name|escape:'html':'UTF-8'}{/if}"
|
||||
data-type="pop"
|
||||
data-function="parcel_send"
|
||||
data-point="{if $defaultPop}{$defaultPop.name|escape:'html':'UTF-8'}{/if}"
|
||||
>
|
||||
<span class="input-group-addon btn btn-default js-inpost-show-map-input" data-target-input="#dropoff_pop">
|
||||
{l s='Open map' mod='inpostshipping'}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="dropoff_locker" class="control-label col-lg-3">
|
||||
{l s='Sending point' mod='inpostshipping'}
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="input-group">
|
||||
<input type="text"
|
||||
name="dropoff_locker"
|
||||
id="dropoff_locker"
|
||||
value="{if $defaultLocker}{$defaultLocker.name|escape:'html':'UTF-8'}{/if}"
|
||||
data-type="parcel_locker"
|
||||
data-function="parcel_send"
|
||||
data-point="{if $defaultLocker}{$defaultLocker.name|escape:'html':'UTF-8'}{/if}"
|
||||
>
|
||||
<span class="input-group-addon btn btn-default js-inpost-show-map-input" data-target-input="#dropoff_locker">
|
||||
{l s='Open map' mod='inpostshipping'}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="inpost-locker-content-wrapper">
|
||||
<div class="form-group">
|
||||
<label for="target_point" class="control-label col-lg-3 required">
|
||||
{l s='Target point' mod='inpostshipping'}
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="input-group">
|
||||
<input type="text"
|
||||
name="target_point"
|
||||
id="target_point"
|
||||
value="{if $selectedPoint}{$selectedPoint|escape:'html':'UTF-8'}{/if}"
|
||||
data-payment="1"
|
||||
data-type="parcel_locker"
|
||||
data-function="parcel_collect"
|
||||
data-point="{if $selectedPoint}{$selectedPoint|escape:'html':'UTF-8'}{/if}"
|
||||
>
|
||||
<span class="input-group-addon btn btn-default js-inpost-show-map-input" data-target-input="#target_point">
|
||||
{l s='Open map' mod='inpostshipping'}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3">
|
||||
{l s='Weekend delivery' mod='inpostshipping'}
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
<span class="switch prestashop-switch fixed-width-lg">
|
||||
<input type="radio"
|
||||
name="weekend_delivery"
|
||||
id="weekend_delivery_on"
|
||||
value="1"
|
||||
{if $weekendDelivery}checked="checked"{/if}
|
||||
>
|
||||
<label for="weekend_delivery_on">{l s='Yes' mod='inpostshipping'}</label>
|
||||
<input type="radio"
|
||||
name="weekend_delivery"
|
||||
id="weekend_delivery_off"
|
||||
value="0"
|
||||
{if !$weekendDelivery}checked="checked"{/if}
|
||||
>
|
||||
<label for="weekend_delivery_off">{l s='No' mod='inpostshipping'}</label>
|
||||
<a class="slide-button btn"></a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="reference" class="control-label col-lg-3">
|
||||
{l s='Reference' mod='inpostshipping'}
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
<input type="text" name="reference" id="reference" value="{$shipmentReference|escape:'html':'UTF-8'}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="js-inpost-dimension-template-content-wrapper">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3">
|
||||
{l s='Use a predefined dimension template' mod='inpostshipping'}
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
<span class="switch prestashop-switch fixed-width-lg">
|
||||
<input type="radio" name="use_template" id="template_on" value="1"{if $useTemplate} checked="checked"{/if}>
|
||||
<label for="template_on">{l s='Yes' mod='inpostshipping'}</label>
|
||||
<input type="radio" name="use_template" id="template_off" value="0"{if !$useTemplate} checked="checked"{/if}>
|
||||
<label for="template_off">{l s='No' mod='inpostshipping'}</label>
|
||||
<a class="slide-button btn"></a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group"{if !$useTemplate} style="display: none"{/if}>
|
||||
<label for="template" class="control-label col-lg-3">
|
||||
{l s='Dimension template' mod='inpostshipping'}
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
<select name="template" id="template">
|
||||
{foreach $dimensionTemplateChoices as $choice}
|
||||
<option value="{$choice.value|escape:'html':'UTF-8'}"{if $choice.value == $template} selected="selected"{/if}>
|
||||
{$choice.text|escape:'html':'UTF-8'}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="js-inpost-package-dimensions"{if $useTemplate} style="display: none"{/if}>
|
||||
<div class="form-group">
|
||||
<label for="length" class="control-label col-lg-3 required">
|
||||
{l s='Length' mod='inpostshipping'}
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="input-group">
|
||||
<input type="text" name="dimensions[length]" id="length" value="{$length|floatval}" class="text-right">
|
||||
<span class="input-group-addon fixed-width-xs">mm</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="width" class="control-label col-lg-3 required">
|
||||
{l s='Width' mod='inpostshipping'}
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="input-group">
|
||||
<input type="text" name="dimensions[width]" id="width" value="{$width|floatval}" class="text-right">
|
||||
<span class="input-group-addon fixed-width-xs">mm</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="height" class="control-label col-lg-3 required">
|
||||
{l s='Height' mod='inpostshipping'}
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="input-group">
|
||||
<input type="text" name="dimensions[height]" id="height" value="{$height|floatval}" class="text-right">
|
||||
<span class="input-group-addon fixed-width-xs">mm</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="weight" class="control-label col-lg-3 required">
|
||||
{l s='Weight' mod='inpostshipping'}
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="input-group">
|
||||
<input type="text" name="weight" id="weight" value="{$weight|floatval}" class="text-right">
|
||||
<span class="input-group-addon fixed-width-xs">kg</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3">
|
||||
{l s='Cash on delivery' mod='inpostshipping'}
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
<span class="switch prestashop-switch fixed-width-lg">
|
||||
<input type="radio" name="cod" id="cod_on" value="1" {if $cashOnDelivery} checked="checked"{/if}>
|
||||
<label for="cod_on">{l s='Yes' mod='inpostshipping'}</label>
|
||||
<input type="radio" name="cod" id="cod_off" value="0"{if !$cashOnDelivery} checked="checked"{/if}>
|
||||
<label for="cod_off">{l s='No' mod='inpostshipping'}</label>
|
||||
<a class="slide-button btn"></a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="cod_amount" class="control-label col-lg-3">
|
||||
{l s='Cash on delivery amount' mod='inpostshipping'}
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="input-group">
|
||||
<input type="text" name="cod_amount" id="cod_amount" value="{$orderTotal|floatval}" class="text-right">
|
||||
<span class="input-group-addon fixed-width-xs">{$currencySign|escape:'html':'UTF-8'}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3">
|
||||
{l s='Insurance' mod='inpostshipping'}
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
<span class="switch prestashop-switch fixed-width-lg">
|
||||
<input type="radio" name="insurance" id="insurance_on" value="1">
|
||||
<label for="insurance_on">{l s='Yes' mod='inpostshipping'}</label>
|
||||
<input type="radio" name="insurance" id="insurance_off" value="0" checked="checked">
|
||||
<label for="insurance_off">{l s='No' mod='inpostshipping'}</label>
|
||||
<a class="slide-button btn"></a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" style="display: none">
|
||||
<label for="insurance_amount" class="control-label col-lg-3">
|
||||
{l s='Insurance amount' mod='inpostshipping'}
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="input-group">
|
||||
<input type="text" name="insurance_amount" id="insurance_amount" value="{$orderTotal|floatval}" class="text-right">
|
||||
<span class="input-group-addon fixed-width-xs">{$currencySign|escape:'html':'UTF-8'}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
32
modules/inpostshipping/views/templates/hook/modal/index.php
Normal file
32
modules/inpostshipping/views/templates/hook/modal/index.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*/
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../');
|
||||
exit;
|
||||
@@ -0,0 +1,73 @@
|
||||
{**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*}
|
||||
<form id="inpost-print-shipment-label-form"
|
||||
class="defaultForm form-horizontal"
|
||||
enctype="multipart/form-data"
|
||||
action=""
|
||||
>
|
||||
<div class="panel-body">
|
||||
<div class="form-wrapper">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3">
|
||||
{l s='Label format' mod='inpostshipping'}
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
{foreach $labelFormatChoices as $choice}
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio"
|
||||
name="label_format"
|
||||
id="label_format_{$choice.value|escape:'html':'UTF-8'}"
|
||||
value="{$choice.value|escape:'html':'UTF-8'}"
|
||||
{if $choice.value === $defaultLabelFormat}checked="checked"{/if}
|
||||
>
|
||||
{$choice.text|escape:'html':'UTF-8'}
|
||||
</label>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3">
|
||||
{l s='Label type' mod='inpostshipping'}
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
{foreach $labelTypeChoices as $choice}
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio"
|
||||
name="label_type"
|
||||
id="label_type_{$choice.value|escape:'html':'UTF-8'}"
|
||||
value="{$choice.value|escape:'html':'UTF-8'}"
|
||||
{if $choice.value === $defaultLabelType}checked="checked"{/if}
|
||||
>
|
||||
{$choice.text|escape:'html':'UTF-8'}
|
||||
</label>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -0,0 +1,177 @@
|
||||
{**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*}
|
||||
<div class="panel-body">
|
||||
<div class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label">{l s='Reference' mod='inpostshipping'}</label>
|
||||
<div class="col-lg-9">
|
||||
<p class="form-control-static">{$shipment.reference|escape:'html':'UTF-8'}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label">{l s='Shipment number' mod='inpostshipping'}</label>
|
||||
<div class="col-lg-9">
|
||||
<p class="form-control-static">{$shipment.tracking_number|escape:'html':'UTF-8'}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label">{l s='Created at' mod='inpostshipping'}</label>
|
||||
<div class="col-lg-9">
|
||||
<p class="form-control-static">{$shipment.date_add|escape:'html':'UTF-8'}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label">{l s='State' mod='inpostshipping'}</label>
|
||||
<div class="col-lg-9">
|
||||
<p class="form-control-static">
|
||||
{if $shipment.status.description}
|
||||
<a data-toggle="tooltip" title="{$shipment.status.description|escape:'html':'UTF-8'}">
|
||||
{$shipment.status.title|escape:'html':'UTF-8'}
|
||||
</a>
|
||||
{else}
|
||||
{$shipment.status.title|escape:'html':'UTF-8'}
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label">{l s='Sending method' mod='inpostshipping'}</label>
|
||||
<div class="col-lg-9">
|
||||
<p class="form-control-static">
|
||||
{$shipment.sending_method|escape:'html':'UTF-8'}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{if $shipment.sending_point}
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label">{l s='Sending point' mod='inpostshipping'}</label>
|
||||
<div class="col-lg-9">
|
||||
<p class="form-control-static">
|
||||
<a class="js-inpost-show-map"
|
||||
id="inpost-map-{$shipment.sending_point|escape:'html':'UTF-8'}"
|
||||
data-type="{$shipment.point_type|escape:'html':'UTF-8'}"
|
||||
data-function="parcel_send"
|
||||
data-point="{$shipment.sending_point|escape:'html':'UTF-8'}"
|
||||
title="{l s='Show on map' mod='inpostshipping'}"
|
||||
>
|
||||
{$shipment.sending_point|escape:'html':'UTF-8'}
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label">{l s='InPost Service' mod='inpostshipping'}</label>
|
||||
<div class="col-lg-9">
|
||||
<p class="form-control-static">
|
||||
{$shipment.service|escape:'html':'UTF-8'}
|
||||
{if $shipment.weekend_delivery}
|
||||
- {l s='Weekend delivery' mod='inpostshipping'}
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label">{l s='Receiver email' mod='inpostshipping'}</label>
|
||||
<div class="col-lg-9">
|
||||
<p class="form-control-static">{$shipment.email|escape:'html':'UTF-8'}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label">{l s='Receiver phone' mod='inpostshipping'}</label>
|
||||
<div class="col-lg-9">
|
||||
<p class="form-control-static">{$shipment.phone|escape:'html':'UTF-8'}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{if $shipment.target_point}
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label">{l s='Target point' mod='inpostshipping'}</label>
|
||||
<div class="col-lg-9">
|
||||
<p class="form-control-static">
|
||||
<a class="js-inpost-show-map"
|
||||
id="inpost-map-{$shipment.target_point|escape:'html':'UTF-8'}"
|
||||
data-type="parcel_locker"
|
||||
data-function="parcel_collect"
|
||||
data-point="{$shipment.target_point|escape:'html':'UTF-8'}"
|
||||
title="{l s='Show on map' mod='inpostshipping'}"
|
||||
>
|
||||
{$shipment.target_point|escape:'html':'UTF-8'}
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $shipment.template}
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label">{l s='Dimension template' mod='inpostshipping'}</label>
|
||||
<div class="col-lg-9">
|
||||
<p class="form-control-static">{$shipment.template|escape:'html':'UTF-8'}</p>
|
||||
</div>
|
||||
</div>
|
||||
{else}
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label">{l s='Dimensions' mod='inpostshipping'}</label>
|
||||
<div class="col-lg-9">
|
||||
<p class="form-control-static">
|
||||
{$shipment.dimensions.length|floatval} x {$shipment.dimensions.width|floatval} x {$shipment.dimensions.height|floatval} mm
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label">{l s='Weight' mod='inpostshipping'}</label>
|
||||
<div class="col-lg-9">
|
||||
<p class="form-control-static">{$shipment.dimensions.weight|floatval} kg</p>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $shipment.cod_amount}
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label">{l s='Cash on delivery amount' mod='inpostshipping'}</label>
|
||||
<div class="col-lg-9">
|
||||
<p class="form-control-static">{$shipment.cod_amount|escape:'html':'UTF-8'}</p>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $shipment.insurance_amount}
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label">{l s='Insurance amount' mod='inpostshipping'}</label>
|
||||
<div class="col-lg-9">
|
||||
<p class="form-control-static">{$shipment.insurance_amount|escape:'html':'UTF-8'}</p>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
34
modules/inpostshipping/views/templates/hook/order-detail.tpl
Normal file
34
modules/inpostshipping/views/templates/hook/order-detail.tpl
Normal file
@@ -0,0 +1,34 @@
|
||||
{**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*}
|
||||
<div class="box">
|
||||
<div class="row">
|
||||
<div class="col-xs-9">
|
||||
<p>{l s='Szybkie Zwroty info text' mod='inpostshipping'}</p>
|
||||
</div>
|
||||
<div class="col-xs-3 text-xs-right">
|
||||
<a class="btn btn-primary" href="{$returnFormUrl|escape:'html':'UTF-8'}" target="_blank">
|
||||
{l s='Return order' mod='inpostshipping'}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
32
modules/inpostshipping/views/templates/index.php
Normal file
32
modules/inpostshipping/views/templates/index.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright 2021-2022 InPost S.A.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* Licensed under the EUPL-1.2 or later.
|
||||
* You may not use this work except in compliance with the Licence.
|
||||
*
|
||||
* You may obtain a copy of the Licence at:
|
||||
* https://joinup.ec.europa.eu/software/page/eupl
|
||||
* It is also bundled with this package in the file LICENSE.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the Licence is distributed on an AS IS basis,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the Licence for the specific language governing permissions
|
||||
* and limitations under the Licence.
|
||||
*
|
||||
* @author InPost S.A.
|
||||
* @copyright 2021-2022 InPost S.A.
|
||||
* @license https://joinup.ec.europa.eu/software/page/eupl
|
||||
*/
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../');
|
||||
exit;
|
||||
Reference in New Issue
Block a user