|
1 | 1 | <?php
|
2 | 2 | /**
|
3 |
| - * Copyright © Magento, Inc. All rights reserved. |
4 |
| - * See COPYING.txt for license details. |
| 3 | + * Copyright 2017 Adobe |
| 4 | + * All Rights Reserved. |
5 | 5 | */
|
6 | 6 |
|
7 | 7 | /** @var \Magento\Customer\Block\Address\Grid $block */
|
| 8 | +/** @var \Magento\Framework\Escaper $escaper */ |
8 | 9 | $customerAddressView = $block->getData('customer_address');
|
9 | 10 | ?>
|
10 | 11 |
|
11 | 12 | <div class="block block-addresses-list">
|
12 |
| - <div class="block-title"><strong><?= $block->escapeHtml(__('Additional Address Entries')) ?></strong></div> |
| 13 | + <div class="block-title"><strong><?= $escaper->escapeHtml(__('Additional Address Entries')) ?></strong></div> |
13 | 14 | <div class="block-content">
|
14 |
| - <?php if ($_pAddsses = $block->getAdditionalAddresses()) : ?> |
15 |
| - |
| 15 | + <?php if ($additionalAddresses = $block->getAdditionalAddresses()): ?> |
16 | 16 | <div class="table-wrapper additional-addresses">
|
17 | 17 | <table class="data table table-additional-addresses-items history" id="additional-addresses-table">
|
18 |
| - <caption class="table-caption"><?= $block->escapeHtml(__('Additional addresses')) ?></caption> |
| 18 | + <caption class="table-caption"><?= $escaper->escapeHtml(__('Additional addresses')) ?></caption> |
19 | 19 | <thead>
|
20 | 20 | <tr>
|
21 |
| - <th scope="col" class="col firstname"><?= $block->escapeHtml(__('First Name')) ?></th> |
22 |
| - <th scope="col" class="col lastname"><?= $block->escapeHtml(__('Last Name')) ?></th> |
23 |
| - <th scope="col" class="col streetaddress"><?= $block->escapeHtml(__('Street Address')) ?></th> |
24 |
| - <th scope="col" class="col city"><?= $block->escapeHtml(__('City')) ?></th> |
25 |
| - <th scope="col" class="col country"><?= $block->escapeHtml(__('Country')) ?></th> |
26 |
| - <th scope="col" class="col state"><?= $block->escapeHtml(__('State')) ?></th> |
27 |
| - <th scope="col" class="col zip"><?= $block->escapeHtml(__('Zip/Postal Code')) ?></th> |
28 |
| - <th scope="col" class="col phone"><?= $block->escapeHtml(__('Phone')) ?></th> |
| 21 | + <th scope="col" class="col firstname"><?= $escaper->escapeHtml(__('First Name')) ?></th> |
| 22 | + <th scope="col" class="col lastname"><?= $escaper->escapeHtml(__('Last Name')) ?></th> |
| 23 | + <th scope="col" class="col streetaddress"><?= $escaper->escapeHtml(__('Street Address')) ?></th> |
| 24 | + <th scope="col" class="col city"><?= $escaper->escapeHtml(__('City')) ?></th> |
| 25 | + <th scope="col" class="col country"><?= $escaper->escapeHtml(__('Country')) ?></th> |
| 26 | + <th scope="col" class="col state"><?= $escaper->escapeHtml(__('State')) ?></th> |
| 27 | + <th scope="col" class="col zip"><?= $escaper->escapeHtml(__('Zip/Postal Code')) ?></th> |
| 28 | + <th scope="col" class="col phone"><?= $escaper->escapeHtml(__('Phone')) ?></th> |
29 | 29 | <th scope="col" class="col actions"> </th>
|
30 | 30 | </tr>
|
31 | 31 | </thead>
|
32 | 32 | <tbody>
|
33 |
| - <?php foreach ($_pAddsses as $address) : ?> |
| 33 | + <?php foreach ($additionalAddresses as $address): ?> |
34 | 34 | <tr>
|
35 |
| - <td data-th="<?= $block->escapeHtml(__('First Name')) ?>" class="col firstname"><?= $block->escapeHtml($address->getFirstname()) ?></td> |
36 |
| - <td data-th="<?= $block->escapeHtml(__('Last Name')) ?>" class="col lastname"><?= $block->escapeHtml($address->getLastname()) ?></td> |
37 |
| - <td data-th="<?= $block->escapeHtml(__('Street Address')) ?>" class="col streetaddress"><?= $block->escapeHtml($block->getStreetAddress($address)) ?></td> |
38 |
| - <td data-th="<?= $block->escapeHtml(__('City')) ?>" class="col city"><?= $block->escapeHtml($address->getCity()) ?></td> |
39 |
| - <td data-th="<?= $block->escapeHtml(__('Country')) ?>" class="col country"><?= $block->escapeHtml($block->getCountryByCode($address->getCountryId())) ?></td> |
40 |
| - <td data-th="<?= $block->escapeHtml(__('State')) ?>" class="col state"><?= $block->escapeHtml($address->getRegion()->getRegion()) ?></td> |
41 |
| - <td data-th="<?= $block->escapeHtml(__('Zip/Postal Code')) ?>" class="col zip"><?= $block->escapeHtml($address->getPostcode()) ?></td> |
42 |
| - <td data-th="<?= $block->escapeHtml(__('Phone')) ?>" class="col phone"><?= $block->escapeHtml($address->getTelephone()) ?></td> |
43 |
| - <td data-th="<?= $block->escapeHtml(__('Actions')) ?>" class="col actions"> |
44 |
| - <a class="action edit" href="<?= $block->escapeUrl($block->getUrl('customer/address/edit', ['id' => $address->getId()])) ?>"><span><?= $block->escapeHtml(__('Edit')) ?></span></a> |
45 |
| - <a class="action delete" href="#" role="delete-address" data-address="<?= $block->escapeHtmlAttr($address->getId()) ?>"><span><?= $block->escapeHtml(__('Delete')) ?></span></a> |
| 35 | + <td data-th="<?= $escaper->escapeHtml(__('First Name')) ?>" class="col firstname"> |
| 36 | + <?= $escaper->escapeHtml($address->getFirstname()) ?> |
| 37 | + </td> |
| 38 | + <td data-th="<?= $escaper->escapeHtml(__('Last Name')) ?>" class="col lastname"> |
| 39 | + <?= $escaper->escapeHtml($address->getLastname()) ?> |
| 40 | + </td> |
| 41 | + <td data-th="<?= $escaper->escapeHtml(__('Street Address')) ?>" class="col streetaddress"> |
| 42 | + <?= $escaper->escapeHtml($block->getStreetAddress($address)) ?> |
| 43 | + </td> |
| 44 | + <td data-th="<?= $escaper->escapeHtml(__('City')) ?>" class="col city"> |
| 45 | + <?= $escaper->escapeHtml($address->getCity()) ?> |
| 46 | + </td> |
| 47 | + <td data-th="<?= $escaper->escapeHtml(__('Country')) ?>" class="col country"> |
| 48 | + <?= $escaper->escapeHtml($block->getCountryByCode($address->getCountryId())) ?> |
| 49 | + </td> |
| 50 | + <td data-th="<?= $escaper->escapeHtml(__('State')) ?>" class="col state"> |
| 51 | + <?= $escaper->escapeHtml($address->getRegion()->getRegion()) ?> |
| 52 | + </td> |
| 53 | + <td data-th="<?= $escaper->escapeHtml(__('Zip/Postal Code')) ?>" class="col zip"> |
| 54 | + <?= $escaper->escapeHtml($address->getPostcode()) ?> |
| 55 | + </td> |
| 56 | + <td data-th="<?= $escaper->escapeHtml(__('Phone')) ?>" class="col phone"> |
| 57 | + <?= $escaper->escapeHtml($address->getTelephone()) ?> |
| 58 | + </td> |
| 59 | + <td data-th="<?= $escaper->escapeHtml(__('Actions')) ?>" class="col actions"> |
| 60 | + <a class="action edit" href=" |
| 61 | + <?= $escaper->escapeUrl( |
| 62 | + $block->getUrl('customer/address/edit', ['id' => $address->getId()]) |
| 63 | + ) ?>"> |
| 64 | + <span><?= $escaper->escapeHtml(__('Edit')) ?></span> |
| 65 | + </a> |
| 66 | + <a class="action delete" |
| 67 | + href="#" role="delete-address" |
| 68 | + data-address="<?= $escaper->escapeHtmlAttr($address->getId()) ?>"> |
| 69 | + <span><?= $escaper->escapeHtml(__('Delete')) ?></span> |
| 70 | + </a> |
46 | 71 | </td>
|
47 | 72 | </tr>
|
48 | 73 | <?php endforeach; ?>
|
49 | 74 | </tbody>
|
50 | 75 | </table>
|
51 | 76 | </div>
|
52 |
| - <?php if ($block->getChildHtml('pager')) : ?> |
| 77 | + <?php if ($block->getChildHtml('pager')): ?> |
53 | 78 | <div class="customer-addresses-toolbar toolbar bottom"><?= $block->getChildHtml('pager') ?></div>
|
54 | 79 | <?php endif ?>
|
55 |
| - <?php else : ?> |
56 |
| - <p class="empty"><?= $block->escapeHtml(__('You have no other address entries in your address book.')) ?></p> |
| 80 | + <?php else: ?> |
| 81 | + <p class="empty"> |
| 82 | + <?= $escaper->escapeHtml(__('You have no other address entries in your address book.')) ?> |
| 83 | + </p> |
57 | 84 | <?php endif ?>
|
58 | 85 | </div>
|
59 | 86 | </div>
|
60 | 87 |
|
61 | 88 | <div class="actions-toolbar">
|
62 | 89 | <div class="primary">
|
63 |
| - <button type="button" role="add-address" title="<?= $block->escapeHtmlAttr(__('Add New Address')) ?>" class="action primary add"><span><?= $block->escapeHtml(__('Add New Address')) ?></span></button> |
| 90 | + <button type="button" role="add-address" title="<?= $escaper->escapeHtmlAttr(__('Add New Address')) ?>" |
| 91 | + class="action primary add"> |
| 92 | + <span><?= $escaper->escapeHtml(__('Add New Address')) ?></span> |
| 93 | + </button> |
64 | 94 | </div>
|
65 | 95 | <div class="secondary">
|
66 |
| - <a class="action back" href="<?= $block->escapeUrl($block->getUrl('customer/account')) ?>"><span><?= $block->escapeHtml(__('Back')) ?></span></a> |
| 96 | + <a class="action back" |
| 97 | + href="<?= $escaper->escapeUrl($block->getUrl('customer/account')) ?>"> |
| 98 | + <span><?= $escaper->escapeHtml(__('Back')) ?></span> |
| 99 | + </a> |
67 | 100 | </div>
|
68 | 101 | </div>
|
69 | 102 | <script type="text/x-magento-init">
|
70 | 103 | {
|
71 | 104 | ".page-main": {
|
72 | 105 | "address": {
|
73 | 106 | "deleteAddress": "td a[role='delete-address']",
|
74 |
| - "deleteUrlPrefix": "<?= $block->escapeJs($block->escapeUrl($block->getDeleteUrl())) ?>id/", |
| 107 | + "deleteUrlPrefix": "<?= $escaper->escapeJs($escaper->escapeUrl($block->getDeleteUrl())) ?>id/", |
75 | 108 | "addAddress": "button[role='add-address']",
|
76 |
| - "addAddressLocation": "<?= $block->escapeJs($block->escapeUrl($block->getAddAddressUrl())) ?>" |
| 109 | + "addAddressLocation": "<?= $escaper->escapeJs($escaper->escapeUrl($block->getAddAddressUrl())) ?>" |
77 | 110 | }
|
78 | 111 | }
|
79 | 112 | }
|
|
0 commit comments