|
9 | 9 | <?php $_company = $block->getLayout()->createBlock(\Magento\Customer\Block\Widget\Company::class) ?>
|
10 | 10 | <?php $_telephone = $block->getLayout()->createBlock(\Magento\Customer\Block\Widget\Telephone::class) ?>
|
11 | 11 | <?php $_fax = $block->getLayout()->createBlock(\Magento\Customer\Block\Widget\Fax::class) ?>
|
| 12 | +<?php $_country_id = $block->getAttributeData()->getFrontendLabel('country_id'); ?> |
| 13 | +<?php $_street = $block->getAttributeData()->getFrontendLabel('street'); ?> |
| 14 | +<?php $_city = $block->getAttributeData()->getFrontendLabel('city'); ?> |
| 15 | +<?php $_region = $block->getAttributeData()->getFrontendLabel('region'); ?> |
| 16 | +<?php $_data_helper = $this->helper(\Magento\Directory\Helper\Data::class); ?> |
| 17 | +<?php $_address_helper = $this->helper(\Magento\Customer\Helper\Address::class); ?> |
12 | 18 | <form class="form-address-edit"
|
13 | 19 | action="<?= $block->escapeUrl($block->getSaveUrl()) ?>"
|
14 | 20 | method="post"
|
|
37 | 43 | </fieldset>
|
38 | 44 | <fieldset class="fieldset">
|
39 | 45 | <legend class="legend"><span><?= $block->escapeHtml(__('Address')) ?></span></legend><br>
|
40 |
| - <?php $_streetValidationClass = $this->helper(\Magento\Customer\Helper\Address::class)->getAttributeValidationClass('street'); ?> |
| 46 | + <?php $_streetValidationClass = $_address_helper->getAttributeValidationClass('street'); ?> |
41 | 47 | <div class="field street required">
|
42 |
| - <label for="street_1" class="label"><span><?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('street') ?></span></label> |
| 48 | + <label for="street_1" class="label"><span><?= /* @noEscape */ $_street ?></span></label> |
43 | 49 | <div class="control">
|
44 | 50 | <input type="text"
|
45 | 51 | name="street[]"
|
46 | 52 | value="<?= $block->escapeHtmlAttr($block->getStreetLine(1)) ?>"
|
47 |
| - title="<?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('street') ?>" |
| 53 | + title="<?= /* @noEscape */ $_street ?>" |
48 | 54 | id="street_1"
|
49 | 55 | class="input-text <?= $block->escapeHtmlAttr($_streetValidationClass) ?>"/>
|
50 | 56 | <div class="nested">
|
51 | 57 | <?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?>
|
52 |
| - <?php for ($_i = 1, $_n = $this->helper(\Magento\Customer\Helper\Address::class)->getStreetLines(); $_i < $_n; $_i++): ?> |
| 58 | + <?php for ($_i = 1, $_n = $_address_helper->getStreetLines(); $_i < $_n; $_i++): ?> |
53 | 59 | <div class="field additional">
|
54 | 60 | <label class="label" for="street_<?= /* @noEscape */ $_i + 1 ?>">
|
55 | 61 | <span><?= $block->escapeHtml(__('Street Address %1', $_i + 1)) ?></span>
|
|
67 | 73 | </div>
|
68 | 74 | </div>
|
69 | 75 |
|
70 |
| - <?php if ($this->helper(\Magento\Customer\Helper\Address::class)->isVatAttributeVisible()): ?> |
| 76 | + <?php if ($_address_helper->isVatAttributeVisible()): ?> |
71 | 77 | <div class="field taxvat">
|
72 | 78 | <label class="label" for="vat_id">
|
73 | 79 | <span><?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('vat_id') ?></span>
|
|
77 | 83 | name="vat_id"
|
78 | 84 | value="<?= $block->escapeHtmlAttr($block->getAddress()->getVatId()) ?>"
|
79 | 85 | title="<?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('vat_id') ?>"
|
80 |
| - class="input-text <?= $block->escapeHtmlAttr($this->helper(\Magento\Customer\Helper\Address::class)->getAttributeValidationClass('vat_id')) ?>" |
| 86 | + class="input-text <?= $block->escapeHtmlAttr($_address_helper->getAttributeValidationClass('vat_id')) ?>" |
81 | 87 | id="vat_id">
|
82 | 88 | </div>
|
83 | 89 | </div>
|
84 | 90 | <?php endif; ?>
|
85 | 91 | <div class="field city required">
|
86 |
| - <label class="label" for="city"><span><?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('city') ?></span></label> |
| 92 | + <label class="label" for="city"><span><?= /* @noEscape */ $_city ?></span></label> |
87 | 93 | <div class="control">
|
88 | 94 | <input type="text"
|
89 | 95 | name="city"
|
90 | 96 | value="<?= $block->escapeHtmlAttr($block->getAddress()->getCity()) ?>"
|
91 | 97 | title="<?= $block->escapeHtmlAttr(__('City')) ?>"
|
92 |
| - class="input-text <?= $block->escapeHtmlAttr($this->helper(\Magento\Customer\Helper\Address::class)->getAttributeValidationClass('city')) ?>" |
| 98 | + class="input-text <?= $block->escapeHtmlAttr($_address_helper->getAttributeValidationClass('city')) ?>" |
93 | 99 | id="city">
|
94 | 100 | </div>
|
95 | 101 | </div>
|
96 | 102 | <div class="field region required">
|
97 | 103 | <label class="label" for="region_id">
|
98 |
| - <span><?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('region') ?></span> |
| 104 | + <span><?= /* @noEscape */ $_region ?></span> |
99 | 105 | </label>
|
100 | 106 | <div class="control">
|
101 | 107 | <select id="region_id" name="region_id"
|
102 |
| - title="<?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('region') ?>" |
| 108 | + title="<?= /* @noEscape */ $_region ?>" |
103 | 109 | class="validate-select region_id" <?= /* @noEscape */ !$block->getConfig('general/region/display_all') ? ' disabled="disabled"' : '' ?>>
|
104 | 110 | <option value=""><?= $block->escapeHtml(__('Please select a region, state or province.')) ?></option>
|
105 | 111 | </select>
|
106 | 112 | <input type="text"
|
107 | 113 | id="region"
|
108 | 114 | name="region"
|
109 | 115 | value="<?= $block->escapeHtmlAttr($block->getRegion()) ?>"
|
110 |
| - title="<?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('region') ?>" |
111 |
| - class="input-text validate-not-number-first <?= $block->escapeHtmlAttr($this->helper(\Magento\Customer\Helper\Address::class)->getAttributeValidationClass('region')) ?>"<?= !$block->getConfig('general/region/display_all') ? ' disabled="disabled"' : '' ?>/> |
| 116 | + title="<?= /* @noEscape */ $_region ?>" |
| 117 | + class="input-text validate-not-number-first <?= $block->escapeHtmlAttr($_address_helper->getAttributeValidationClass('region')) ?>"<?= !$block->getConfig('general/region/display_all') ? ' disabled="disabled"' : '' ?>/> |
112 | 118 | </div>
|
113 | 119 | </div>
|
114 | 120 | <div class="field zip required">
|
|
121 | 127 | value="<?= $block->escapeHtmlAttr($block->getAddress()->getPostcode()) ?>"
|
122 | 128 | title="<?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('postcode') ?>"
|
123 | 129 | id="zip"
|
124 |
| - class="input-text validate-zip-international <?= $block->escapeHtmlAttr($this->helper(\Magento\Customer\Helper\Address::class)->getAttributeValidationClass('postcode')) ?>"> |
| 130 | + class="input-text validate-zip-international <?= $block->escapeHtmlAttr($_address_helper->getAttributeValidationClass('postcode')) ?>"> |
125 | 131 | <div role="alert" class="message warning" style="display:none">
|
126 | 132 | <span></span>
|
127 | 133 | </div>
|
128 | 134 | </div>
|
129 | 135 | </div>
|
130 | 136 | <div class="field country required">
|
131 |
| - <label class="label" for="country"><span><?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('country_id') ?></span></label> |
| 137 | + <label class="label" for="country"><span><?= /* @noEscape */ $_country_id ?></span></label> |
132 | 138 | <div class="control">
|
133 | 139 | <?= $block->getCountryHtmlSelect() ?>
|
134 | 140 | </div>
|
|
189 | 195 | },
|
190 | 196 | "#country": {
|
191 | 197 | "regionUpdater": {
|
192 |
| - "optionalRegionAllowed": <?= /* @noEscape */ $block->getConfig('general/region/display_all') ? 'true' : 'false' ?>, |
| 198 | + "optionalRegionAllowed": |
| 199 | + <?= /* @noEscape */ $block->getConfig('general/region/display_all') ? 'true' : 'false' ?>, |
193 | 200 | "regionListId": "#region_id",
|
194 | 201 | "regionInputId": "#region",
|
195 | 202 | "postcodeId": "#zip",
|
196 | 203 | "form": "#form-validate",
|
197 |
| - "regionJson": <?= /* @noEscape */ $this->helper(\Magento\Directory\Helper\Data::class)->getRegionJson() ?>, |
| 204 | + "regionJson": <?= /* @noEscape */ $_helper->getRegionJson() ?>, |
198 | 205 | "defaultRegion": "<?= (int) $block->getRegionId() ?>",
|
199 |
| - "countriesWithOptionalZip": <?= /* @noEscape */ $this->helper(\Magento\Directory\Helper\Data::class)->getCountriesWithOptionalZip(true) ?> |
| 206 | + "countriesWithOptionalZip": <?= /* @noEscape */ $_data_helper->getCountriesWithOptionalZip(true) ?> |
200 | 207 | }
|
201 | 208 | }
|
202 | 209 | }
|
|
0 commit comments