Skip to content
This repository has been archived by the owner on Apr 26, 2023. It is now read-only.

Commit

Permalink
#45316 - b2b - template formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
szafran89 committed Jan 3, 2019
1 parent 486ce10 commit d1cdafa
Showing 1 changed file with 125 additions and 107 deletions.
232 changes: 125 additions & 107 deletions Magento_CustomerCustomAttributes/templates/customer/address/edit.phtml
Expand Up @@ -2,12 +2,13 @@
$addressHelper = $this->helper('Magento\Customer\Helper\Address');
?>

<form class="row form-address-edit form"
action="<?= $block->getSaveUrl() ?>"
method="post"
id="form-validate"
enctype="multipart/form-data"
data-hasrequired="<?= __('* Required Fields') ?>"
<form
class="row form-address-edit form"
action="<?= $block->getSaveUrl() ?>"
method="post"
id="form-validate"
enctype="multipart/form-data"
data-hasrequired="<?= __('* Required Fields') ?>"
>
<div class="col-sm-6 dashboard-form">
<h3 class="dashboard-form__title">
Expand All @@ -30,13 +31,14 @@
<?= __('Company') ?>
</label>

<input type="text"
name="company"
id="company"
title="<?= __('Company') ?>"
value="<?= $block->escapeHtml($block->getAddress()->getCompany()) ?>"
class="input__field <?= $getCompanyValidationClass ?>"
/>
<input
type="text"
name="company"
id="company"
title="<?= __('Company') ?>"
value="<?= $block->escapeHtml($block->getAddress()->getCompany()) ?>"
class="input__field <?= $getCompanyValidationClass ?>"
>
</div>

<div class="input required">
Expand All @@ -48,13 +50,14 @@
<?= __('Phone Number') ?>
</label>

<input type="text"
name="telephone"
value="<?= $block->escapeHtml($block->getAddress()->getTelephone()) ?>"
title="<?= __('Phone Number') ?>"
class="input__field <?= $getTelephoneValidationClass ?>"
id="telephone"
/>
<input
type="text"
name="telephone"
value="<?= $block->escapeHtml($block->getAddress()->getTelephone()) ?>"
title="<?= __('Phone Number') ?>"
class="input__field <?= $getTelephoneValidationClass ?>"
id="telephone"
>
</div>

<div class="input">
Expand All @@ -66,13 +69,14 @@
<?= __('Fax') ?>
</label>

<input type="text"
name="fax"
id="fax"
title="<?= __('Fax') ?>"
value="<?= $block->escapeHtml($block->getAddress()->getFax()) ?>"
class="input__field <?= $getFaxValidationClass ?>"
/>
<input
type="text"
name="fax"
id="fax"
title="<?= __('Fax') ?>"
value="<?= $block->escapeHtml($block->getAddress()->getFax()) ?>"
class="input__field <?= $getFaxValidationClass ?>"
>
</div>
</div>
</div>
Expand All @@ -92,13 +96,14 @@
<?= __('Street Address') ?>
</label>

<input type="text"
name="street[]"
value="<?= $block->escapeHtml($block->getStreetLine(1)) ?>"
title="<?= __('Street Address') ?>"
id="street_1"
class="input__field <?= $_streetValidationClass ?>"
/>
<input
type="text"
name="street[]"
value="<?= $block->escapeHtml($block->getStreetLine(1)) ?>"
title="<?= __('Street Address') ?>"
id="street_1"
class="input__field <?= $_streetValidationClass ?>"
>
</div>

<?php
Expand All @@ -112,13 +117,14 @@
<?= __('Street Address %1', $_i) ?>
</label>

<input type="text"
name="street[]"
value="<?= $block->escapeHtml($block->getStreetLine($_i)) ?>"
title="<?= __('Street Address %1', $_i) ?>"
id="street_<?= $_i ?>"
class="input__field <?= $_streetValidationClass ?>"
/>
<input
type="text"
name="street[]"
value="<?= $block->escapeHtml($block->getStreetLine($_i)) ?>"
title="<?= __('Street Address %1', $_i) ?>"
id="street_<?= $_i ?>"
class="input__field <?= $_streetValidationClass ?>"
>
</div>
<?php endfor; ?>

Expand All @@ -132,13 +138,14 @@
<?= __('VAT Number') ?>
</label>

<input type="text"
name="vat_id"
value="<?= $block->escapeHtml($block->getAddress()->getVatId()) ?>"
title="<?= __('VAT Number') ?>"
class="input__field <?= $getVatValidationClass ?>"
id="vat_id"
/>
<input
type="text"
name="vat_id"
value="<?= $block->escapeHtml($block->getAddress()->getVatId()) ?>"
title="<?= __('VAT Number') ?>"
class="input__field <?= $getVatValidationClass ?>"
id="vat_id"
>
</div>
<?php endif; ?>

Expand All @@ -151,13 +158,14 @@
<?= __('City') ?>
</label>

<input type="text"
name="city"
value="<?= $block->escapeHtml($block->getAddress()->getCity()) ?>"
title="<?= __('City') ?>"
class="input__field <?= $getCityValidationClass ?>"
id="city"
/>
<input
type="text"
name="city"
value="<?= $block->escapeHtml($block->getAddress()->getCity()) ?>"
title="<?= __('City') ?>"
class="input__field <?= $getCityValidationClass ?>"
id="city"
>
</div>

<div class="input required">
Expand All @@ -169,24 +177,26 @@
<?= __('State/Province') ?>
</label>

<select id="region_id"
name="region_id"
title="<?= __('State/Province') ?>"
class="select__field select__field--native validate-select"
style="display:none;"
<select
id="region_id"
name="region_id"
title="<?= __('State/Province') ?>"
class="select__field select__field--native validate-select"
style="display: none;"
>
<option value="" disabled>
<?= __('Please select a region, state or province.') ?>
</option>
</select>

<input type="text"
id="region"
name="region"
value="<?= $block->escapeHtml($block->getRegion()) ?>"
title="<?= __('State/Province') ?>"
class="input__field <?= $getRegionValidationClass ?>"
/>
<input
type="text"
id="region"
name="region"
value="<?= $block->escapeHtml($block->getRegion()) ?>"
title="<?= __('State/Province') ?>"
class="input__field <?= $getRegionValidationClass ?>"
>
</div>

<div class="input required">
Expand All @@ -198,17 +208,18 @@
<?= __('Zip/Postal Code') ?>
</label>

<input type="text"
name="postcode"
value="<?= $block->escapeHtml($block->getAddress()->getPostcode()) ?>"
title="<?= __('Zip/Postal Code') ?>"
id="zip"
class="
input__field
validate-zip-international
<?= $getPostcodeValidationClass ?>
"
/>
<input
type="text"
name="postcode"
value="<?= $block->escapeHtml($block->getAddress()->getPostcode()) ?>"
title="<?= __('Zip/Postal Code') ?>"
id="zip"
class="
input__field
validate-zip-international
<?= $getPostcodeValidationClass ?>
"
>
</div>

<div class="input required">
Expand All @@ -218,12 +229,13 @@

<?php $countryList = $block->getCountryCollection()->toOptionArray() ?>

<select name="country_id"
id="country"
class="select__field select__field--native required-entry"
title="Country"
data-validate="{'validate-select': true}"
aria-required="true"
<select
name="country_id"
id="country"
class="select__field select__field--native required-entry"
title="Country"
data-validate="{'validate-select': true}"
aria-required="true"
>
<option value="" disabled>
<?= __('Please select a country.') ?>
Expand All @@ -246,12 +258,13 @@
</div>
<?php elseif ($block->canSetAsDefaultBilling()): ?>
<div class="checkbox dashboard-form__divider">
<input type="checkbox"
id="primary_billing"
name="default_billing"
value="1"
class="checkbox__field"
/>
<input
type="checkbox"
id="primary_billing"
name="default_billing"
value="1"
class="checkbox__field"
>

<svg class="checkbox__icon">
<use xlink:href="<?= $block->getViewFileUrl('images/icons-sprite.svg#checked'); ?>"></use>
Expand All @@ -262,49 +275,54 @@
</label>
</div>
<?php else: ?>
<input type="hidden" name="default_billing" value="1" />
<?php endif; ?>
<input type="hidden" name="default_billing" value="1">
<?php endif ?>

<?php if ($block->isDefaultShipping()): ?>
<div class="message info">
<?= __("It's a default shipping address.") ?>
</div>
<?php elseif ($block->canSetAsDefaultShipping()): ?>
<div class="checkbox dashboard-form__divider">
<input type="checkbox"
id="primary_shipping"
name="default_shipping"
value="1"
class="checkbox__field"
/>
<input
type="checkbox"
id="primary_shipping"
name="default_shipping"
value="1"
class="checkbox__field"
>

<svg class="checkbox__icon">
<use xlink:href="<?= $block->getViewFileUrl('images/icons-sprite.svg#checked'); ?>"></use>
<use xlink:href="<?= $block->getViewFileUrl('images/icons-sprite.svg#checked') ?>"></use>
</svg>

<label class="checkbox__label" for="primary_shipping">
<?= __('Use as my default shipping address') ?>
</label>
</div>
<?php else: ?>
<input type="hidden" name="default_shipping" value="1"/>
<?php endif; ?>
<input type="hidden" name="default_shipping" value="1">
<?php endif ?>
</div>
</div>

<div class="action">
<div class="col-xs-12 action">
<div class="action__handler">
<button type="submit"
class="button action__button"
data-action="save-address"
title="<?= __('Save Address') ?>"
<button
type="submit"
class="button action__button"
data-action="save-address"
title="<?= __('Save Address') ?>"
>
<?= __('Save Address') ?>
</button>
</div>

<div class="action__handler">
<a class="link action__link" href="<?= $block->escapeUrl($block->getBackUrl()) ?>">
<a
class="link action__link"
href="<?= $block->escapeUrl($block->getBackUrl()) ?>"
>
<?= __('Go back') ?>
</a>
</div>
Expand Down

0 comments on commit d1cdafa

Please sign in to comment.