Guest User

Untitled

a guest
Dec 18th, 2018
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.36 KB | None | 0 0
  1. <form class="form-address-edit"
  2. action="<?= $block->escapeUrl($block->getSaveUrl()) ?>"
  3. method="post"
  4. id="form-validate"
  5. enctype="multipart/form-data"
  6. data-hasrequired="<?= $block->escapeHtmlAttr(__('* Required Fields')) ?>"
  7. data-mage-init='{"validation":{}}'>
  8. <fieldset class="fieldset">
  9. <legend class="legend"><span><?= $block->escapeHtml(__('Contact Information')) ?></span></legend><br>
  10. <?= $block->getBlockHtml('formkey') ?>
  11. <input type="hidden" name="success_url" value="<?= $block->escapeUrl($block->getSuccessUrl()) ?>">
  12. <input type="hidden" name="error_url" value="<?= $block->escapeUrl($block->getErrorUrl()) ?>">
  13. <?= $block->getNameBlockHtml() ?>
  14.  
  15. <?php if ($_company->isEnabled()): ?>
  16. <?= $_company->setCompany($block->getAddress()->getCompany())->toHtml() ?>
  17. <?php endif ?>
  18.  
  19. <?php if ($_telephone->isEnabled()): ?>
  20. <?= $_telephone->setTelephone($block->getAddress()->getTelephone())->toHtml() ?>
  21. <?php endif ?>
  22.  
  23. <?php if ($_fax->isEnabled()): ?>
  24. <?= $_fax->setFax($block->getAddress()->getFax())->toHtml() ?>
  25. <?php endif ?>
  26.  
  27. </fieldset>
  28. <fieldset class="fieldset">
  29. <legend class="legend"><span><?= $block->escapeHtml(__('Address')) ?></span></legend><br>
  30. <?php $_streetValidationClass = $this->helper('MagentoCustomerHelperAddress')->getAttributeValidationClass('street'); ?>
  31. <div class="field street required">
  32. <label for="street_1" class="label">
  33. <span><?= $block->escapeHtml(__('Street Address')) ?></span>
  34. </label>
  35. <div class="control">
  36. <input type="text"
  37. name="street[]"
  38. value="<?= $block->escapeHtmlAttr($block->getStreetLine(1)) ?>"
  39. title="<?= $block->escapeHtmlAttr(__('Street Address')) ?>"
  40. id="street_1"
  41. class="input-text <?= $block->escapeHtmlAttr($_streetValidationClass) ?>"/>
  42. <div class="nested">
  43. <?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?>
  44. <?php for ($_i = 1, $_n = $this->helper('MagentoCustomerHelperAddress')->getStreetLines(); $_i < $_n; $_i++): ?>
  45. <div class="field additional">
  46. <label class="label" for="street_<?= /* @noEscape */ $_i + 1 ?>">
  47. <span><?= $block->escapeHtml(__('Street Address %1', $_i + 1)) ?></span>
  48. </label>
  49. <div class="control">
  50. <input type="text" name="street[]"
  51. value="<?= $block->escapeHtmlAttr($block->getStreetLine($_i + 1)) ?>"
  52. title="<?= $block->escapeHtmlAttr(__('Street Address %1', $_i + 1)) ?>"
  53. id="street_<?= /* @noEscape */ $_i + 1 ?>"
  54. class="input-text <?= $block->escapeHtmlAttr($_streetValidationClass) ?>">
  55. </div>
  56. </div>
  57. <?php endfor; ?>
  58. </div>
  59. </div>
  60. </div>
  61.  
  62. <?php if ($this->helper('MagentoCustomerHelperAddress')->isVatAttributeVisible()) : ?>
  63. <div class="field taxvat">
  64. <label class="label" for="vat_id">
  65. <span><?= $block->escapeHtml(__('VAT Number')) ?></span>
  66. </label>
  67. <div class="control">
  68. <input type="text"
  69. name="vat_id"
  70. value="<?= $block->escapeHtmlAttr($block->getAddress()->getVatId()) ?>"
  71. title="<?= $block->escapeHtmlAttr(__('VAT Number')) ?>"
  72. class="input-text <?= $block->escapeHtmlAttr($this->helper('MagentoCustomerHelperAddress')->getAttributeValidationClass('vat_id')) ?>"
  73. id="vat_id">
  74. </div>
  75. </div>
  76. <?php endif; ?>
  77. <div class="field city required">
  78. <label class="label" for="city"><span><?= $block->escapeHtml(__('City')) ?></span></label>
  79. <div class="control">
  80. <input type="text"
  81. name="city"
  82. value="<?= $block->escapeHtmlAttr($block->getAddress()->getCity()) ?>"
  83. title="<?= $block->escapeHtmlAttr(__('City')) ?>"
  84. class="input-text <?= $block->escapeHtmlAttr($this->helper('MagentoCustomerHelperAddress')->getAttributeValidationClass('city')) ?>"
  85. id="city">
  86. </div>
  87. </div>
  88. <div class="field region required">
  89. <label class="label" for="region_id">
  90. <span><?= $block->escapeHtml(__('State/Province')) ?></span>
  91. </label>
  92. <div class="control">
  93. <select id="region_id" name="region_id"
  94. title="<?= $block->escapeHtmlAttr(__('State/Province')) ?>"
  95. class="validate-select" <?= /* @noEscape */ !$block->getConfig('general/region/display_all') ? ' disabled="disabled"' : '' ?>>
  96. <option value=""><?= $block->escapeHtml(__('Please select a region, state or province.')) ?></option>
  97. </select>
  98. <input type="text"
  99. id="region"
  100. name="region"
  101. value="<?= $block->escapeHtmlAttr($block->getRegion()) ?>"
  102. title="<?= $block->escapeHtmlAttr(__('State/Province')) ?>"
  103. class="input-text <?= $block->escapeHtmlAttr($this->helper('MagentoCustomerHelperAddress')->getAttributeValidationClass('region')) ?>"<?= !$block->getConfig('general/region/display_all') ? ' disabled="disabled"' : '' ?>/>
  104. </div>
  105. </div>
  106. <div class="field zip required">
  107. <label class="label" for="zip">
  108. <span><?= $block->escapeHtml(__('Zip/Postal Code')) ?></span>
  109. </label>
  110. <div class="control">
  111. <input type="text"
  112. name="postcode"
  113. value="<?= $block->escapeHtmlAttr($block->getAddress()->getPostcode()) ?>"
  114. title="<?= $block->escapeHtmlAttr(__('Zip/Postal Code')) ?>"
  115. id="zip"
  116. class="input-text validate-zip-international <?= $block->escapeHtmlAttr($this->helper('MagentoCustomerHelperAddress')->getAttributeValidationClass('postcode')) ?>">
  117. </div>
  118. </div>
  119. <div class="field country required">
  120. <label class="label" for="country"><span><?= $block->escapeHtml(__('Country')) ?></span></label>
  121. <div class="control">
  122. <?= $block->getCountryHtmlSelect() ?>
  123. </div>
  124. </div>
  125.  
  126. <?php if ($block->isDefaultBilling()): ?>
  127. <div class="message info">
  128. <span><?= $block->escapeHtml(__("It's a default billing address.")) ?></span>
  129. </div>
  130. <?php elseif ($block->canSetAsDefaultBilling()): ?>
  131. <div class="field choice set billing">
  132. <input type="checkbox" id="primary_billing" name="default_billing" value="1" class="checkbox">
  133. <label class="label" for="primary_billing">
  134. <span><?= $block->escapeHtml(__('Use as my default billing address')) ?></span>
  135. </label>
  136. </div>
  137. <?php else: ?>
  138. <input type="hidden" name="default_billing" value="1" />
  139. <?php endif; ?>
  140.  
  141. <?php if ($block->isDefaultShipping()): ?>
  142. <div class="message info">
  143. <span><?= $block->escapeHtml(__("It's a default shipping address.")) ?></span>
  144. </div>
  145. <?php elseif ($block->canSetAsDefaultShipping()): ?>
  146. <div class="field choice set shipping">
  147. <input type="checkbox" id="primary_shipping" name="default_shipping" value="1" class="checkbox">
  148. <label class="label" for="primary_shipping">
  149. <span><?= $block->escapeHtml(__('Use as my default shipping address')) ?></span>
  150. </label>
  151. </div>
  152. <?php else: ?>
  153. <input type="hidden" name="default_shipping" value="1">
  154. <?php endif; ?>
  155. </fieldset>
  156. <div class="actions-toolbar">
  157. <div class="primary">
  158. <button type="submit"
  159. class="action save primary"
  160. data-action="save-address"
  161. title="<?= $block->escapeHtmlAttr(__('Save Address')) ?>">
  162. <span><?= $block->escapeHtml(__('Save Address')) ?></span>
  163. </button>
  164. </div>
  165. <div class="secondary">
  166. <a class="action back" href="<?= $block->escapeUrl($block->getBackUrl()) ?>">
  167. <span><?= $block->escapeHtml(__('Go back')) ?></span>
  168. </a>
  169. </div>
  170. </div>
Add Comment
Please, Sign In to add comment