Skip to content

Commit 8074c67

Browse files
committed
MAGETWO-90029: Once integer is stored for State/Province field, it can not be changed to alphanumeric
1 parent 5b87891 commit 8074c67

File tree

1 file changed

+10
-10
lines changed
  • app/code/Magento/Customer/view/frontend/templates/address

1 file changed

+10
-10
lines changed

app/code/Magento/Customer/view/frontend/templates/address/edit.phtml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
/** @var \Magento\Customer\Block\Address\Edit $block */
1010
?>
11-
<?php $_company = $block->getLayout()->createBlock('Magento\Customer\Block\Widget\Company') ?>
12-
<?php $_telephone = $block->getLayout()->createBlock('Magento\Customer\Block\Widget\Telephone') ?>
13-
<?php $_fax = $block->getLayout()->createBlock('Magento\Customer\Block\Widget\Fax') ?>
11+
<?php $_company = $block->getLayout()->createBlock(\Magento\Customer\Block\Widget\Company::class) ?>
12+
<?php $_telephone = $block->getLayout()->createBlock(\Magento\Customer\Block\Widget\Telephone::class) ?>
13+
<?php $_fax = $block->getLayout()->createBlock(\Magento\Customer\Block\Widget\Fax::class) ?>
1414
<form class="form-address-edit"
1515
action="<?= $block->escapeUrl($block->getSaveUrl()) ?>"
1616
method="post"
@@ -39,7 +39,7 @@
3939
</fieldset>
4040
<fieldset class="fieldset">
4141
<legend class="legend"><span><?= $block->escapeHtml(__('Address')) ?></span></legend><br>
42-
<?php $_streetValidationClass = $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('street'); ?>
42+
<?php $_streetValidationClass = $this->helper(\Magento\Customer\Helper\Address::class)->getAttributeValidationClass('street'); ?>
4343
<div class="field street required">
4444
<label for="street_1" class="label">
4545
<span><?= $block->escapeHtml(__('Street Address')) ?></span>
@@ -53,7 +53,7 @@
5353
class="input-text <?= $block->escapeHtmlAttr($_streetValidationClass) ?>"/>
5454
<div class="nested">
5555
<?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?>
56-
<?php for ($_i = 1, $_n = $this->helper('Magento\Customer\Helper\Address')->getStreetLines(); $_i < $_n; $_i++): ?>
56+
<?php for ($_i = 1, $_n = $this->helper(\Magento\Customer\Helper\Address::class)->getStreetLines(); $_i < $_n; $_i++): ?>
5757
<div class="field additional">
5858
<label class="label" for="street_<?= /* @noEscape */ $_i + 1 ?>">
5959
<span><?= $block->escapeHtml(__('Street Address %1', $_i + 1)) ?></span>
@@ -71,7 +71,7 @@
7171
</div>
7272
</div>
7373

74-
<?php if ($this->helper('Magento\Customer\Helper\Address')->isVatAttributeVisible()) : ?>
74+
<?php if ($this->helper(\Magento\Customer\Helper\Address::class)->isVatAttributeVisible()) : ?>
7575
<div class="field taxvat">
7676
<label class="label" for="vat_id">
7777
<span><?= $block->escapeHtml(__('VAT Number')) ?></span>
@@ -81,7 +81,7 @@
8181
name="vat_id"
8282
value="<?= $block->escapeHtmlAttr($block->getAddress()->getVatId()) ?>"
8383
title="<?= $block->escapeHtmlAttr(__('VAT Number')) ?>"
84-
class="input-text <?= $block->escapeHtmlAttr($this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('vat_id')) ?>"
84+
class="input-text <?= $block->escapeHtmlAttr($this->helper(\Magento\Customer\Helper\Address::class)->getAttributeValidationClass('vat_id')) ?>"
8585
id="vat_id">
8686
</div>
8787
</div>
@@ -93,7 +93,7 @@
9393
name="city"
9494
value="<?= $block->escapeHtmlAttr($block->getAddress()->getCity()) ?>"
9595
title="<?= $block->escapeHtmlAttr(__('City')) ?>"
96-
class="input-text <?= $block->escapeHtmlAttr($this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('city')) ?>"
96+
class="input-text <?= $block->escapeHtmlAttr($this->helper(\Magento\Customer\Helper\Address::class)->getAttributeValidationClass('city')) ?>"
9797
id="city">
9898
</div>
9999
</div>
@@ -112,7 +112,7 @@
112112
name="region"
113113
value="<?= $block->escapeHtmlAttr($block->getRegion()) ?>"
114114
title="<?= $block->escapeHtmlAttr(__('State/Province')) ?>"
115-
class="input-text validate-not-number-first <?= $block->escapeHtmlAttr($this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('region')) ?>"<?= !$block->getConfig('general/region/display_all') ? ' disabled="disabled"' : '' ?>/>
115+
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"' : '' ?>/>
116116
</div>
117117
</div>
118118
<div class="field zip required">
@@ -125,7 +125,7 @@
125125
value="<?= $block->escapeHtmlAttr($block->getAddress()->getPostcode()) ?>"
126126
title="<?= $block->escapeHtmlAttr(__('Zip/Postal Code')) ?>"
127127
id="zip"
128-
class="input-text validate-zip-international <?= $block->escapeHtmlAttr($this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('postcode')) ?>">
128+
class="input-text validate-zip-international <?= $block->escapeHtmlAttr($this->helper(\Magento\Customer\Helper\Address::class)->getAttributeValidationClass('postcode')) ?>">
129129
</div>
130130
</div>
131131
<div class="field country required">

0 commit comments

Comments
 (0)