-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlocker.phtml
More file actions
67 lines (62 loc) · 2.05 KB
/
Copy pathlocker.phtml
File metadata and controls
67 lines (62 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?php declare(strict_types=1);
use Hyva\Theme\Model\ViewModelRegistry;
use Hyva\Theme\ViewModel\HeroiconsOutline;
use Hyva\Theme\ViewModel\Modal;
use Magento\Framework\Escaper;
use Magento\Framework\View\Element\Template;
use Snowdog\Hyva\Checkout\Inpost\Magewire\Locker;
// phpcs:disable Generic.Files.LineLength
/** @var Escaper $escaper */
/** @var Template $block */
/** @var Locker $magewire */
/** @var ViewModelRegistry $viewModels */
/** @var Hyva\Theme\ViewModel\Modal $modalViewModel */
$modalViewModel = $viewModels->require(Modal::class);
/** @var Hyva\Theme\ViewModel\HeroiconsOutline $heroicons */
$heroIcons = $viewModels->require(HeroiconsOutline::class);
?>
<div
id="inpost-geowidget-cod"
class="flex flex-col gap-2 mt-3"
x-data="snowdogHyvaCheckoutInpostInpostlockerStandardcodLocker"
>
<?php if($magewire->locker): ?>
<span>
<?= $escaper->escapeHtml(__('Selected locker')) ?>:
</span>
<?php endif; ?>
<div class="flex flex-row gap-x-2 items-center">
<div
id="inpost_locker"
class="flex flex-col"
>
<span
id="inpost_locker-code"
class="font-semibold"
>
<?= $magewire->locker ?>
</span>
<span id="inpost_locker-address">
<?= nl2br($magewire->address ?? '') ?>
</span>
</div>
</div>
<button
class="w-fit-content btn btn-secondary"
@click="openInpostModalCod"
type="button"
aria-haspopup="dialog"
>
<?= $escaper->escapeHtml(__('Choose locker')) ?>
</button>
</div>
<script>
<?php /** Generated with hyva-csp-helper.php */ ?>
function snowdogHyvaCheckoutInpostInpostlockerStandardcodLocker() {
return Object.assign(
inpostGeowidgetCod.call(this)
)
}
window.addEventListener('alpine:init', () => Alpine.data('snowdogHyvaCheckoutInpostInpostlockerStandardcodLocker', snowdogHyvaCheckoutInpostInpostlockerStandardcodLocker), {once: true});
</script>
<?php $hyvaCsp->registerInlineScript() ?>