init
This commit is contained in:
+44
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
/** @var Magento\Customer\Block\Account\Customer $block */
|
||||
?>
|
||||
<?php if ($block->customerLoggedIn()) : ?>
|
||||
<li class="customer-welcome">
|
||||
<span class="customer-name"
|
||||
role="link"
|
||||
tabindex="0"
|
||||
data-mage-init='{"dropdown":{}}'
|
||||
data-toggle="dropdown"
|
||||
data-trigger-keypress-button="true"
|
||||
data-bind="scope: 'customer'">
|
||||
<button type="button"
|
||||
class="action switch"
|
||||
tabindex="-1"
|
||||
data-action="customer-menu-toggle">
|
||||
<span><?= $block->escapeHtml(__('Change')) ?></span>
|
||||
</button>
|
||||
</span>
|
||||
<script type="text/x-magento-init">
|
||||
{
|
||||
"*": {
|
||||
"Magento_Ui/js/core/app": {
|
||||
"components": {
|
||||
"customer": {
|
||||
"component": "Magento_Customer/js/view/customer"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<?php if ($block->getChildHtml()) :?>
|
||||
<div class="customer-menu" data-target="dropdown">
|
||||
<?= $block->getChildHtml() ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
/** @var \Magento\Customer\Block\Account\Dashboard\Address $block */
|
||||
?>
|
||||
<div class="block block-dashboard-addresses">
|
||||
<div class="block-title">
|
||||
<strong><?= $block->escapeHtml(__('Address Book')) ?></strong>
|
||||
<a class="action edit" href="<?= $block->escapeUrl($block->getAddressBookUrl()) ?>"><span><?= $block->escapeHtml(__('Manage Addresses')) ?></span></a>
|
||||
</div>
|
||||
<div class="block-content">
|
||||
<div class="box box-billing-address">
|
||||
<strong class="box-title">
|
||||
<span><?= $block->escapeHtml(__('Default Billing Address')) ?></span>
|
||||
</strong>
|
||||
<div class="box-content">
|
||||
<address>
|
||||
<?= $block->getPrimaryBillingAddressHtml() ?>
|
||||
</address>
|
||||
</div>
|
||||
<div class="box-actions">
|
||||
<a class="action edit" href="<?= $block->escapeUrl($block->getPrimaryBillingAddressEditUrl()) ?>" data-ui-id="default-billing-edit-link"><span><?= $block->escapeHtml(__('Edit Address')) ?></span></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box box-shipping-address">
|
||||
<strong class="box-title">
|
||||
<span><?= $block->escapeHtml(__('Default Shipping Address')) ?></span>
|
||||
</strong>
|
||||
<div class="box-content">
|
||||
<address>
|
||||
<?= $block->getPrimaryShippingAddressHtml() ?>
|
||||
</address>
|
||||
</div>
|
||||
<div class="box-actions">
|
||||
<a class="action edit" href="<?= $block->escapeUrl($block->getPrimaryShippingAddressEditUrl()) ?>" data-ui-id="default-shipping-edit-link"><span><?= $block->escapeHtml(__('Edit Address')) ?></span></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
/** @var \Magento\Customer\Block\Account\Dashboard\Info $block */
|
||||
?>
|
||||
<div class="block block-dashboard-info">
|
||||
<div class="block-title"><strong><?= $block->escapeHtml(__('Account Information')) ?></strong></div>
|
||||
<div class="block-content">
|
||||
<div class="box box-information">
|
||||
<strong class="box-title">
|
||||
<span><?= $block->escapeHtml(__('Contact Information')) ?></span>
|
||||
</strong>
|
||||
<div class="box-content">
|
||||
<p>
|
||||
<?= $block->escapeHtml($block->getName()) ?><br>
|
||||
<?= $block->escapeHtml($block->getCustomer()->getEmail()) ?><br>
|
||||
</p>
|
||||
<?= $block->getChildHtml('customer.account.dashboard.info.extra'); ?>
|
||||
</div>
|
||||
<div class="box-actions">
|
||||
<a class="action edit" href="<?= $block->escapeUrl($block->getUrl('customer/account/edit')) ?>">
|
||||
<span><?= $block->escapeHtml(__('Edit')) ?></span>
|
||||
</a>
|
||||
<a href="<?= $block->escapeUrl($block->getChangePasswordUrl()) ?>" class="action change-password">
|
||||
<?= $block->escapeHtml(__('Change Password')) ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?= $block->getChildHtml('additional_blocks'); ?>
|
||||
</div>
|
||||
</div>
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var \Magento\Customer\Block\Account\AuthorizationLink $block
|
||||
* @var \Magento\Framework\Escaper $escaper
|
||||
*/
|
||||
$dataPostParam = '';
|
||||
if ($block->isLoggedIn()) {
|
||||
$dataPostParam = sprintf(" data-post='%s'", $block->getPostParams());
|
||||
}
|
||||
?>
|
||||
<li class="link authorization-link" data-label="<?= $escaper->escapeHtml(__('or')) ?>">
|
||||
<a <?= /* @noEscape */ $block->getLinkAttributes() ?>
|
||||
<?= /* @noEscape */ $dataPostParam ?>><?= $escaper->escapeHtml($block->getLabel()) ?></a>
|
||||
</li>
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
?>
|
||||
<div class="actions-toolbar">
|
||||
<div class="secondary"><a class="action back" href="<?= $block->escapeUrl($block->getBackUrl()) ?>"><span><?= $block->escapeHtml(__('Back')) ?></span></a></div>
|
||||
</div>
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var \Magento\Customer\Block\Account\Link $block
|
||||
* @var \Magento\Framework\Escaper $escaper
|
||||
*/
|
||||
?>
|
||||
<li class="link my-account-link">
|
||||
<a <?= /* @noEscape */ $block->getLinkAttributes() ?>><?= $escaper->escapeHtml($block->getLabel()) ?></a>
|
||||
</li>
|
||||
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
/** @var \Magento\Customer\Block\Address\Book $block */
|
||||
?>
|
||||
<div class="block block-addresses-default">
|
||||
<div class="block-title"><strong><?= $block->escapeHtml(__('Default Addresses')) ?></strong></div>
|
||||
<div class="block-content">
|
||||
<?php if ($_pAddsses = $block->getDefaultBilling()) : ?>
|
||||
<div class="box box-address-billing">
|
||||
<strong class="box-title">
|
||||
<span><?= $block->escapeHtml(__('Default Billing Address')) ?></span>
|
||||
</strong>
|
||||
<div class="box-content">
|
||||
<address>
|
||||
<?= $block->getAddressHtml($block->getAddressById($_pAddsses)) ?>
|
||||
</address>
|
||||
</div>
|
||||
<div class="box-actions">
|
||||
<a class="action edit" href="<?= $block->escapeUrl($block->getAddressEditUrl($_pAddsses)) ?>">
|
||||
<span><?= $block->escapeHtml(__('Change Billing Address')) ?></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<div class="box box-billing-address">
|
||||
<strong class="box-title"><span><?= $block->escapeHtml(__('Default Billing Address')) ?></span></strong>
|
||||
<div class="box-content">
|
||||
<p><?= $block->escapeHtml(__('You have no default billing address in your address book.')) ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($_pAddsses = $block->getDefaultShipping()) : ?>
|
||||
<div class="box box-address-shipping">
|
||||
<strong class="box-title">
|
||||
<span><?= $block->escapeHtml(__('Default Shipping Address')) ?></span>
|
||||
</strong>
|
||||
<div class="box-content">
|
||||
<address>
|
||||
<?= $block->getAddressHtml($block->getAddressById($_pAddsses)) ?>
|
||||
</address>
|
||||
</div>
|
||||
<div class="box-actions">
|
||||
<a class="action edit" href="<?= $block->escapeUrl($block->getAddressEditUrl($_pAddsses)) ?>">
|
||||
<span><?= $block->escapeHtml(__('Change Shipping Address')) ?></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<div class="box box-shipping-address">
|
||||
<strong class="box-title"><span><?= $block->escapeHtml(__('Default Shipping Address')) ?></span></strong>
|
||||
<div class="box-content">
|
||||
<p><?= $block->escapeHtml(__('You have no default shipping address in your address book.')) ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,240 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
/** @var \Magento\Customer\Block\Address\Edit $block */
|
||||
/** @var \Magento\Customer\ViewModel\Address $viewModel */
|
||||
/** @var \Magento\Framework\Escaper $escaper */
|
||||
/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
|
||||
/** @var \Magento\Customer\ViewModel\Address\RegionProvider $regionProvider */
|
||||
$viewModel = $block->getViewModel();
|
||||
$regionProvider = $block->getRegionProvider();
|
||||
?>
|
||||
<?php $_company = $block->getLayout()->createBlock(\Magento\Customer\Block\Widget\Company::class) ?>
|
||||
<?php $_telephone = $block->getLayout()->createBlock(\Magento\Customer\Block\Widget\Telephone::class) ?>
|
||||
<?php $_fax = $block->getLayout()->createBlock(\Magento\Customer\Block\Widget\Fax::class) ?>
|
||||
<?php $_country_id = $block->getAttributeData()->getFrontendLabel('country_id'); ?>
|
||||
<?php $_street = $block->getAttributeData()->getFrontendLabel('street'); ?>
|
||||
<?php $_city = $block->getAttributeData()->getFrontendLabel('city'); ?>
|
||||
<?php $_region = $block->getAttributeData()->getFrontendLabel('region'); ?>
|
||||
<?php $_selectRegion = 'Please select a region, state or province.'; ?>
|
||||
<?php $_displayAll = $block->getConfig('general/region/display_all'); ?>
|
||||
|
||||
<?php $_vatidValidationClass = $viewModel->addressGetAttributeValidationClass('vat_id'); ?>
|
||||
<?php $_cityValidationClass = $viewModel->addressGetAttributeValidationClass('city'); ?>
|
||||
<?php $_postcodeValidationClass_value = $viewModel->addressGetAttributeValidationClass('postcode'); ?>
|
||||
<?php $_postcodeValidationClass = $_postcodeValidationClass_value; ?>
|
||||
<?php $_streetValidationClass = $viewModel->addressGetAttributeValidationClass('street'); ?>
|
||||
<?php $_streetValidationClassNotRequired = $_streetValidationClass !== null ?
|
||||
trim(str_replace('required-entry', '', $_streetValidationClass)) : ''; ?>
|
||||
<?php $_regionValidationClass = $viewModel->addressGetAttributeValidationClass('region'); ?>
|
||||
<form class="form-address-edit"
|
||||
action="<?= $escaper->escapeUrl($block->getSaveUrl()) ?>"
|
||||
method="post"
|
||||
id="form-validate"
|
||||
enctype="multipart/form-data"
|
||||
data-hasrequired="<?= $escaper->escapeHtmlAttr(__('* Required Fields')) ?>">
|
||||
<fieldset class="fieldset">
|
||||
<legend class="legend"><span><?= $escaper->escapeHtml(__('Contact Information')) ?></span></legend><br>
|
||||
<?= $block->getBlockHtml('formkey') ?>
|
||||
<input type="hidden" name="success_url" value="<?= $escaper->escapeUrl($block->getSuccessUrl()) ?>">
|
||||
<input type="hidden" name="error_url" value="<?= $escaper->escapeUrl($block->getErrorUrl()) ?>">
|
||||
<?= $block->getNameBlockHtml() ?>
|
||||
|
||||
<?php if ($_company->isEnabled()): ?>
|
||||
<?= $_company->setCompany($block->getAddress()->getCompany())->toHtml() ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($_telephone->isEnabled()): ?>
|
||||
<?= $_telephone->setTelephone($block->getAddress()->getTelephone())->toHtml() ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($_fax->isEnabled()): ?>
|
||||
<?= $_fax->setFax($block->getAddress()->getFax())->toHtml() ?>
|
||||
<?php endif ?>
|
||||
|
||||
</fieldset>
|
||||
<fieldset class="fieldset">
|
||||
<legend class="legend"><span><?= $escaper->escapeHtml(__('Address')) ?></span></legend><br>
|
||||
<div class="field street required">
|
||||
<label for="street_1" class="label"><span><?= /* @noEscape */ $_street ?></span></label>
|
||||
<div class="control">
|
||||
<div class="field primary">
|
||||
<label for="street_1" class="label">
|
||||
<span>
|
||||
<?= $escaper->escapeHtml(__('Street Address: Line %1', 1)) ?>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<input type="text"
|
||||
name="street[0]"
|
||||
value="<?= $escaper->escapeHtmlAttr($block->getStreetLine(1)) ?>"
|
||||
title="<?= /* @noEscape */ $_street ?>"
|
||||
id="street_1"
|
||||
class="input-text <?= $escaper->escapeHtmlAttr($_streetValidationClass) ?>"/>
|
||||
<div class="nested">
|
||||
<?php for ($_i = 1, $_n = $viewModel->addressGetStreetLines(); $_i < $_n; $_i++): ?>
|
||||
<div class="field additional">
|
||||
<label class="label" for="street_<?= /* @noEscape */ $_i + 1 ?>">
|
||||
<span><?= $escaper->escapeHtml(__('Street Address: Line %1', $_i + 1)) ?></span>
|
||||
</label>
|
||||
<div class="control">
|
||||
<input type="text" name="street[<?= /* @noEscape */ $_i ?>]"
|
||||
value="<?= $escaper->escapeHtmlAttr($block->getStreetLine($_i + 1)) ?>"
|
||||
title="<?= $escaper->escapeHtmlAttr(__('Street Address %1', $_i + 1)) ?>"
|
||||
id="street_<?= /* @noEscape */ $_i + 1 ?>"
|
||||
class="input-text
|
||||
<?= $escaper->escapeHtmlAttr($_streetValidationClassNotRequired) ?>">
|
||||
</div>
|
||||
</div>
|
||||
<?php endfor; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ($viewModel->addressIsVatAttributeVisible()): ?>
|
||||
<div class="field taxvat">
|
||||
<label class="label" for="vat_id">
|
||||
<span><?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('vat_id') ?></span>
|
||||
</label>
|
||||
<div class="control">
|
||||
<input type="text"
|
||||
name="vat_id"
|
||||
value="<?= $escaper->escapeHtmlAttr($block->getAddress()->getVatId()) ?>"
|
||||
title="<?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('vat_id') ?>"
|
||||
class="input-text <?= $escaper->escapeHtmlAttr($_vatidValidationClass) ?>"
|
||||
id="vat_id">
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="field country required">
|
||||
<label class="label" for="country">
|
||||
<span><?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('country_id') ?></span>
|
||||
</label>
|
||||
<div class="control">
|
||||
<?= $block->getCountryHtmlSelect() ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field region required">
|
||||
<label class="label" for="region_id">
|
||||
<span><?= /* @noEscape */ $_region ?></span>
|
||||
</label>
|
||||
<div class="control">
|
||||
<select id="region_id" name="region_id"
|
||||
title="<?= /* @noEscape */ $_region ?>"
|
||||
class="validate-select region_id"
|
||||
<?= /* @noEscape */ !$_displayAll ? ' disabled="disabled"' : '' ?>>
|
||||
<option value=""><?= $escaper->escapeHtml(__($_selectRegion)) ?></option>
|
||||
</select>
|
||||
<input type="text"
|
||||
id="region"
|
||||
name="region"
|
||||
value="<?= $escaper->escapeHtmlAttr($block->getRegion()) ?>"
|
||||
title="<?= /* @noEscape */ $_region ?>"
|
||||
class="input-text validate-not-number-first
|
||||
<?= $escaper->escapeHtmlAttr($_regionValidationClass) ?>"
|
||||
<?= !$_displayAll ? ' disabled="disabled"' : '' ?>/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field city required">
|
||||
<label class="label" for="city">
|
||||
<span><?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('city') ?></span>
|
||||
</label>
|
||||
<div class="control">
|
||||
<input type="text"
|
||||
name="city"
|
||||
value="<?= $escaper->escapeHtmlAttr($block->getAddress()->getCity()) ?>"
|
||||
title="<?= $escaper->escapeHtmlAttr(__('City')) ?>"
|
||||
class="input-text <?= $escaper->escapeHtmlAttr($_cityValidationClass) ?>"
|
||||
id="city">
|
||||
</div>
|
||||
</div>
|
||||
<div class="field zip required">
|
||||
<label class="label" for="zip">
|
||||
<span><?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('postcode') ?></span>
|
||||
</label>
|
||||
<div class="control">
|
||||
<input type="text"
|
||||
name="postcode"
|
||||
value="<?= $escaper->escapeHtmlAttr($block->getAddress()->getPostcode()) ?>"
|
||||
title="<?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('postcode') ?>"
|
||||
id="zip"
|
||||
class="input-text validate-zip-international
|
||||
<?= $escaper->escapeHtmlAttr($_postcodeValidationClass) ?>">
|
||||
<div role="alert" class="message warning">
|
||||
<span></span>
|
||||
</div>
|
||||
<?= /* @noEscape */ $secureRenderer->renderStyleAsTag("display: none;", 'div.message.warning') ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ($block->isDefaultBilling()): ?>
|
||||
<div class="message info">
|
||||
<span><?= $escaper->escapeHtml(__("It's a default billing address.")) ?></span>
|
||||
</div>
|
||||
<?php elseif ($block->canSetAsDefaultBilling()): ?>
|
||||
<div class="field choice set billing">
|
||||
<input type="checkbox" id="primary_billing" name="default_billing" value="1" class="checkbox">
|
||||
<label class="label" for="primary_billing">
|
||||
<span><?= $escaper->escapeHtml(__('Use as my default billing address')) ?></span>
|
||||
</label>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<input type="hidden" name="default_billing" value="1" />
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($block->isDefaultShipping()): ?>
|
||||
<div class="message info">
|
||||
<span><?= $escaper->escapeHtml(__("It's a default shipping address.")) ?></span>
|
||||
</div>
|
||||
<?php elseif ($block->canSetAsDefaultShipping()): ?>
|
||||
<div class="field choice set shipping">
|
||||
<input type="checkbox" id="primary_shipping" name="default_shipping" value="1" class="checkbox">
|
||||
<label class="label" for="primary_shipping">
|
||||
<span><?= $escaper->escapeHtml(__('Use as my default shipping address')) ?></span>
|
||||
</label>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<input type="hidden" name="default_shipping" value="1">
|
||||
<?php endif; ?>
|
||||
</fieldset>
|
||||
<div class="actions-toolbar">
|
||||
<div class="primary">
|
||||
<button type="submit"
|
||||
class="action save primary"
|
||||
data-action="save-address"
|
||||
disabled="disabled"
|
||||
title="<?= $escaper->escapeHtmlAttr(__('Save Address')) ?>">
|
||||
<span><?= $escaper->escapeHtml(__('Save Address')) ?></span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="secondary">
|
||||
<a class="action back" href="<?= $escaper->escapeUrl($block->getBackUrl()) ?>">
|
||||
<span><?= $escaper->escapeHtml(__('Go back')) ?></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<script type="text/x-magento-init">
|
||||
{
|
||||
"#form-validate": {
|
||||
"addressValidation": {
|
||||
"postCodes": <?= /* @noEscape */ $block->getPostCodeConfig()->getSerializedPostCodes() ?>
|
||||
}
|
||||
},
|
||||
"#country": {
|
||||
"directoryRegionUpdater": {
|
||||
"optionalRegionAllowed": <?= /* @noEscape */ $_displayAll ? 'true' : 'false' ?>,
|
||||
"regionListId": "#region_id",
|
||||
"regionInputId": "#region",
|
||||
"postcodeId": "#zip",
|
||||
"form": "#form-validate",
|
||||
"regionJson": <?= /* @noEscape */ $regionProvider->getRegionJson(); ?>,
|
||||
"defaultRegion": "<?= (int) $block->getRegionId() ?>",
|
||||
"countriesWithOptionalZip": <?= /* @noEscape */ $viewModel->dataGetCountriesWithOptionalZip(true) ?>
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,80 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
/** @var \Magento\Customer\Block\Address\Grid $block */
|
||||
$customerAddressView = $block->getData('customer_address');
|
||||
?>
|
||||
|
||||
<div class="block block-addresses-list">
|
||||
<div class="block-title"><strong><?= $block->escapeHtml(__('Additional Address Entries')) ?></strong></div>
|
||||
<div class="block-content">
|
||||
<?php if ($_pAddsses = $block->getAdditionalAddresses()) : ?>
|
||||
|
||||
<div class="table-wrapper additional-addresses">
|
||||
<table class="data table table-additional-addresses-items history" id="additional-addresses-table">
|
||||
<caption class="table-caption"><?= $block->escapeHtml(__('Additional addresses')) ?></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="col firstname"><?= $block->escapeHtml(__('First Name')) ?></th>
|
||||
<th scope="col" class="col lastname"><?= $block->escapeHtml(__('Last Name')) ?></th>
|
||||
<th scope="col" class="col streetaddress"><?= $block->escapeHtml(__('Street Address')) ?></th>
|
||||
<th scope="col" class="col city"><?= $block->escapeHtml(__('City')) ?></th>
|
||||
<th scope="col" class="col country"><?= $block->escapeHtml(__('Country')) ?></th>
|
||||
<th scope="col" class="col state"><?= $block->escapeHtml(__('State')) ?></th>
|
||||
<th scope="col" class="col zip"><?= $block->escapeHtml(__('Zip/Postal Code')) ?></th>
|
||||
<th scope="col" class="col phone"><?= $block->escapeHtml(__('Phone')) ?></th>
|
||||
<th scope="col" class="col actions"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($_pAddsses as $address) : ?>
|
||||
<tr>
|
||||
<td data-th="<?= $block->escapeHtml(__('First Name')) ?>" class="col firstname"><?= $block->escapeHtml($address->getFirstname()) ?></td>
|
||||
<td data-th="<?= $block->escapeHtml(__('Last Name')) ?>" class="col lastname"><?= $block->escapeHtml($address->getLastname()) ?></td>
|
||||
<td data-th="<?= $block->escapeHtml(__('Street Address')) ?>" class="col streetaddress"><?= $block->escapeHtml($block->getStreetAddress($address)) ?></td>
|
||||
<td data-th="<?= $block->escapeHtml(__('City')) ?>" class="col city"><?= $block->escapeHtml($address->getCity()) ?></td>
|
||||
<td data-th="<?= $block->escapeHtml(__('Country')) ?>" class="col country"><?= $block->escapeHtml($block->getCountryByCode($address->getCountryId())) ?></td>
|
||||
<td data-th="<?= $block->escapeHtml(__('State')) ?>" class="col state"><?= $block->escapeHtml($address->getRegion()->getRegion()) ?></td>
|
||||
<td data-th="<?= $block->escapeHtml(__('Zip/Postal Code')) ?>" class="col zip"><?= $block->escapeHtml($address->getPostcode()) ?></td>
|
||||
<td data-th="<?= $block->escapeHtml(__('Phone')) ?>" class="col phone"><?= $block->escapeHtml($address->getTelephone()) ?></td>
|
||||
<td data-th="<?= $block->escapeHtml(__('Actions')) ?>" class="col actions">
|
||||
<a class="action edit" href="<?= $block->escapeUrl($block->getUrl('customer/address/edit', ['id' => $address->getId()])) ?>"><span><?= $block->escapeHtml(__('Edit')) ?></span></a>
|
||||
<a class="action delete" href="#" role="delete-address" data-address="<?= $block->escapeHtmlAttr($address->getId()) ?>"><span><?= $block->escapeHtml(__('Delete')) ?></span></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php if ($block->getChildHtml('pager')) : ?>
|
||||
<div class="customer-addresses-toolbar toolbar bottom"><?= $block->getChildHtml('pager') ?></div>
|
||||
<?php endif ?>
|
||||
<?php else : ?>
|
||||
<p class="empty"><?= $block->escapeHtml(__('You have no other address entries in your address book.')) ?></p>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="actions-toolbar">
|
||||
<div class="primary">
|
||||
<button type="button" role="add-address" title="<?= $block->escapeHtmlAttr(__('Add New Address')) ?>" class="action primary add"><span><?= $block->escapeHtml(__('Add New Address')) ?></span></button>
|
||||
</div>
|
||||
<div class="secondary">
|
||||
<a class="action back" href="<?= $block->escapeUrl($block->getUrl('customer/account')) ?>"><span><?= $block->escapeHtml(__('Back')) ?></span></a>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/x-magento-init">
|
||||
{
|
||||
".page-main": {
|
||||
"address": {
|
||||
"deleteAddress": "td a[role='delete-address']",
|
||||
"deleteUrlPrefix": "<?= $block->escapeJs($block->escapeUrl($block->getDeleteUrl())) ?>id/",
|
||||
"addAddress": "button[role='add-address']",
|
||||
"addAddressLocation": "<?= $block->escapeJs($block->escapeUrl($block->getAddAddressUrl())) ?>"
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
<!--
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
-->
|
||||
<!--@subject {{trans "Welcome to %store_name" store_name=$store.frontend_name}} @-->
|
||||
<!--@vars {
|
||||
"var store.frontend_name":"Store Name",
|
||||
"var this.getUrl($store,'customer/account/',[_nosid:1])":"Customer Account URL",
|
||||
"var this.getUrl($store,'customer/account/createPassword/',[_query:[id:$customer.id,token:$customer.rp_token],_nosid:1])":"Password Reset URL",
|
||||
"var customer.email":"Customer Email",
|
||||
"var customer.name":"Customer Name"
|
||||
} @-->
|
||||
|
||||
{{template config_path="design/email/header_template"}}
|
||||
|
||||
<p>{{trans "Welcome to %store_name." store_name=$store.frontend_name}}</p>
|
||||
<p>
|
||||
{{trans
|
||||
'To sign in to our site, use these credentials during checkout or on the <a href="%customer_url">My Account</a> page:'
|
||||
|
||||
customer_url=$this.getUrl($store,'customer/account/',[_nosid:1])
|
||||
|raw}}
|
||||
</p>
|
||||
<ul>
|
||||
<li><strong>{{trans "Email:"}}</strong> {{var customer.email}}</li>
|
||||
<li><strong>{{trans "Password:"}}</strong> <em>{{trans "Password you set when creating account"}}</em></li>
|
||||
</ul>
|
||||
<p>
|
||||
{{trans
|
||||
'Forgot your account password? Click <a href="%reset_url">here</a> to reset it.'
|
||||
|
||||
reset_url="$this.getUrl($store,'customer/account/createPassword/',[_query:[id:$customer.id,token:$customer.rp_token],_nosid:1])"
|
||||
|raw}}
|
||||
</p>
|
||||
<p>{{trans "When you sign in to your account, you will be able to:"}}</p>
|
||||
<ul>
|
||||
<li>{{trans "Proceed through checkout faster"}}</li>
|
||||
<li>{{trans "Check the status of orders"}}</li>
|
||||
<li>{{trans "View past orders"}}</li>
|
||||
<li>{{trans "Store alternative addresses (for shipping to multiple family members and friends)"}}</li>
|
||||
</ul>
|
||||
|
||||
{{template config_path="design/email/footer_template"}}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
<!--
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
-->
|
||||
<!--@subject {{trans "Please confirm your %store_name account" store_name=$store.frontend_name}} @-->
|
||||
<!--@vars {
|
||||
"var store.frontend_name":"Store Name",
|
||||
"var this.getUrl($store,'customer/account/confirm/',[_query:[id:$customer.id,key:$customer.confirmation,back_url:$back_url],_nosid:1])":"Account Confirmation URL",
|
||||
"var this.getUrl($store, 'customer/account/')":"Customer Account URL",
|
||||
"var customer.email":"Customer Email",
|
||||
"var customer.name":"Customer Name"
|
||||
} @-->
|
||||
|
||||
{{template config_path="design/email/header_template"}}
|
||||
|
||||
<p class="greeting">{{trans "%name," name=$customer.name}}</p>
|
||||
<p>{{trans "You must confirm your %customer_email email before you can sign in (link is only valid once):" customer_email=$customer.email}}</p>
|
||||
|
||||
<table class="button" width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td>
|
||||
<table class="inner-wrapper" border="0" cellspacing="0" cellpadding="0" align="center">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a href="{{var this.getUrl($store,'customer/account/confirm/',[_query:[id:$customer.id,key:$customer.confirmation,back_url:$back_url],_nosid:1])}}" target="_blank">{{trans "Confirm Your Account"}}</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
{{template config_path="design/email/footer_template"}}
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
<!--
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
-->
|
||||
<!--@subject {{trans "Welcome to %store_name" store_name=$store.frontend_name}} @-->
|
||||
<!--@vars {
|
||||
"var store.frontend_name":"Store Name",
|
||||
"var this.getUrl($store,'customer/account/',[_nosid:1])":"Customer Account URL",
|
||||
"var this.getUrl($store,'customer/account/createPassword/',[_query:[id:$customer.id,token:$customer.rp_token],_nosid:1])":"Password Reset URL",
|
||||
"var customer.email":"Customer Email",
|
||||
"var customer.name":"Customer Name"
|
||||
} @-->
|
||||
{{template config_path="design/email/header_template"}}
|
||||
|
||||
<p class="greeting">{{trans "%name," name=$customer.name}}</p>
|
||||
<p>{{trans "Thank you for confirming your %store_name account." store_name=$store.frontend_name}}</p>
|
||||
<p>
|
||||
{{trans
|
||||
'To sign in to our site, use these credentials during checkout or on the <a href="%customer_url">My Account</a> page:'
|
||||
|
||||
customer_url=$this.getUrl($store,'customer/account/',[_nosid:1])
|
||||
|raw}}
|
||||
</p>
|
||||
<ul>
|
||||
<li><strong>{{trans "Email:"}}</strong> {{var customer.email}}</li>
|
||||
<li><strong>{{trans "Password:"}}</strong> <em>{{trans "Password you set when creating account"}}</em></li>
|
||||
</ul>
|
||||
<p>
|
||||
{{trans
|
||||
'Forgot your account password? Click <a href="%reset_url">here</a> to reset it.'
|
||||
|
||||
reset_url="$this.getUrl($store,'customer/account/createPassword/',[_query:[id:$customer.id,token:$customer.rp_token],_nosid:1])"
|
||||
|raw}}
|
||||
</p>
|
||||
<p>{{trans "When you sign in to your account, you will be able to:"}}</p>
|
||||
<ul>
|
||||
<li>{{trans "Proceed through checkout faster"}}</li>
|
||||
<li>{{trans "Check the status of orders"}}</li>
|
||||
<li>{{trans "View past orders"}}</li>
|
||||
<li>{{trans "Store alternative addresses (for shipping to multiple family members and friends)"}}</li>
|
||||
</ul>
|
||||
|
||||
{{template config_path="design/email/footer_template"}}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
<!--
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
-->
|
||||
<!--@subject {{trans "Welcome to %store_name" store_name=$store.frontend_name}} @-->
|
||||
<!--@vars {
|
||||
"var store.frontend_name":"Store Name",
|
||||
"var this.getUrl($store, 'customer/account/')":"Customer Account URL",
|
||||
"var this.getUrl($store,'customer/account/createPassword/',[_query:[id:$customer.id,token:$customer.rp_token],_nosid:1])":"Create Password URL",
|
||||
"var customer.email":"Customer Email",
|
||||
"var customer.name":"Customer Name"
|
||||
} @-->
|
||||
{{template config_path="design/email/header_template"}}
|
||||
|
||||
<p class="greeting">{{trans "%name," name=$customer.name}}</p>
|
||||
<p>{{trans "Welcome to %store_name." store_name=$store.frontend_name}}</p>
|
||||
<p>
|
||||
{{trans
|
||||
'To sign in to our site and set a password, click on the <a href="%create_password_url">link</a>:'
|
||||
|
||||
create_password_url="$this.getUrl($store,'customer/account/createPassword/',[_query:[id:$customer.id,token:$customer.rp_token],_nosid:1])"
|
||||
|raw}}
|
||||
</p>
|
||||
<ul>
|
||||
<li><strong>{{trans "Email:"}}</strong> {{var customer.email}}</li>
|
||||
</ul>
|
||||
<p>{{trans "When you sign in to your account, you will be able to:"}}</p>
|
||||
<ul>
|
||||
<li>{{trans "Proceed through checkout faster"}}</li>
|
||||
<li>{{trans "Check the status of orders"}}</li>
|
||||
<li>{{trans "View past orders"}}</li>
|
||||
<li>{{trans "Store alternative addresses (for shipping to multiple family members and friends)"}}</li>
|
||||
</ul>
|
||||
|
||||
{{template config_path="design/email/footer_template"}}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
<!--
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
-->
|
||||
<!--@subject {{trans "Your %store_name email has been changed" store_name=$store.frontend_name}} @-->
|
||||
<!--@vars {
|
||||
"var store.frontend_name":"Store Name",
|
||||
"var store_email":"Store Email",
|
||||
"var store_phone":"Store Phone",
|
||||
"var customer.name":"Customer Name"
|
||||
} @-->
|
||||
{{template config_path="design/email/header_template"}}
|
||||
|
||||
<p class="greeting">{{trans "%name," name=$customer.name}}</p>
|
||||
<p>
|
||||
{{trans "We have received a request to change the following information associated with your account at %store_name: email." store_name=$store.frontend_name}}
|
||||
{{trans 'If you have not authorized this action, please contact us immediately at <a href="mailto:%store_email">%store_email</a>' store_email=$store_email |raw}}{{depend store_phone}} {{trans 'or call us at <a href="tel:%store_phone">%store_phone</a>' store_phone=$store_phone |raw}}{{/depend}}.
|
||||
</p>
|
||||
|
||||
{{template config_path="design/email/footer_template"}}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
<!--
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
-->
|
||||
<!--@subject {{trans "Your %store_name email and password has been changed" store_name=$store.frontend_name}} @-->
|
||||
<!--@vars {
|
||||
"var store.frontend_name":"Store Name",
|
||||
"var store_email":"Store Email",
|
||||
"var store_phone":"Store Phone",
|
||||
"var customer.name":"Customer Name"
|
||||
} @-->
|
||||
{{template config_path="design/email/header_template"}}
|
||||
|
||||
<p class="greeting">{{trans "%name," name=$customer.name}}</p>
|
||||
<p>
|
||||
{{trans "We have received a request to change the following information associated with your account at %store_name: email, password." store_name=$store.frontend_name}}
|
||||
{{trans 'If you have not authorized this action, please contact us immediately at <a href="mailto:%store_email">%store_email</a>' store_email=$store_email |raw}}{{depend store_phone}} {{trans 'or call us at <a href="tel:%store_phone">%store_phone</a>' store_phone=$store_phone |raw}}{{/depend}}.
|
||||
</p>
|
||||
|
||||
{{template config_path="design/email/footer_template"}}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
<!--
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
-->
|
||||
<!--@subject {{trans "Reset your %store_name password" store_name=$store.frontend_name}} @-->
|
||||
<!--@vars {
|
||||
"var store.frontend_name":"Store Name",
|
||||
"var this.getUrl($store, 'customer/account/')":"Customer Account URL",
|
||||
"var this.getUrl($store,'customer/account/createPassword',[_query:[id:$customer.id,token:$customer.rp_token],_nosid:1])":"Password Reset URL",
|
||||
"var customer.name":"Customer Name"
|
||||
} @-->
|
||||
{{template config_path="design/email/header_template"}}
|
||||
|
||||
<p class="greeting">{{trans "%name," name=$customer.name}}</p>
|
||||
<p>{{trans "There was recently a request to change the password for your account."}}</p>
|
||||
<p>{{trans "If you requested this change, set a new password here:"}}</p>
|
||||
|
||||
<table class="button" width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td>
|
||||
<table class="inner-wrapper" border="0" cellspacing="0" cellpadding="0" align="center">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a href="{{var this.getUrl($store,'customer/account/createPassword',[_query:[id:$customer.id,token:$customer.rp_token],_nosid:1])}}" target="_blank">{{trans "Set a New Password"}}</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p>{{trans "If you did not make this request, you can ignore this email and your password will remain the same."}}</p>
|
||||
|
||||
{{template config_path="design/email/footer_template"}}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
<!--
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
-->
|
||||
<!--@subject {{trans "Your %store_name password has been changed" store_name=$store.frontend_name}} @-->
|
||||
<!--@vars {
|
||||
"var store.frontend_name":"Store Name",
|
||||
"var store_email":"Store Email",
|
||||
"var store_phone":"Store Phone",
|
||||
"var customer.name":"Customer Name"
|
||||
} @-->
|
||||
{{template config_path="design/email/header_template"}}
|
||||
|
||||
<p class="greeting">{{trans "%name," name=$customer.name}}</p>
|
||||
<p>
|
||||
{{trans "We have received a request to change the following information associated with your account at %store_name: password." store_name=$store.frontend_name}}
|
||||
{{trans 'If you have not authorized this action, please contact us immediately at <a href="mailto:%store_email">%store_email</a>' store_email=$store_email |raw}}{{depend store_phone}} {{trans 'or call us at <a href="tel:%store_phone">%store_phone</a>' store_phone=$store_phone |raw}}{{/depend}}.
|
||||
</p>
|
||||
|
||||
{{template config_path="design/email/footer_template"}}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
<!--
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
-->
|
||||
<!--@subject {{trans "Reset your %store_name password" store_name=$store.frontend_name}} @-->
|
||||
<!--@vars {
|
||||
"var store.frontend_name":"Store Name",
|
||||
"var customer.name":"Customer Name",
|
||||
"var this.getUrl($store,'customer/account/createPassword/',[_query:[id:$customer.id,token:$customer.rp_token],_nosid:1])":"Reset Password URL"
|
||||
} @-->
|
||||
{{template config_path="design/email/header_template"}}
|
||||
|
||||
<p class="greeting">{{trans "%name," name=$customer.name}}</p>
|
||||
<p>{{trans "There was recently a request to change the password for your account."}}</p>
|
||||
<p>{{trans "If you requested this change, set a new password here:"}}</p>
|
||||
|
||||
<table class="button" width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td>
|
||||
<table class="inner-wrapper" border="0" cellspacing="0" cellpadding="0" align="center">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a href="{{var this.getUrl($store,'customer/account/createPassword/',[_query:[id:$customer.id,token:$customer.rp_token],_nosid:1])}}" target="_blank">{{trans "Set a New Password"}}</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p>{{trans "If you did not make this request, you can ignore this email and your password will remain the same."}}</p>
|
||||
|
||||
{{template config_path="design/email/footer_template"}}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
/** @var \Magento\Framework\View\Element\Template $block */
|
||||
?>
|
||||
<form action="" method="post" id="form-validate" class="form send confirmation" data-mage-init='{"validation":{}}'>
|
||||
<fieldset class="fieldset" data-hasrequired="<?= $block->escapeHtmlAttr(__('* Required Fields')) ?>">
|
||||
<p class="field note"><?= $block->escapeHtml(__('Please enter your email below and we will send you the confirmation link.')) ?></p>
|
||||
<div class="field email required">
|
||||
<label for="email_address" class="label"><span><?= $block->escapeHtml(__('Email')) ?></span></label>
|
||||
<div class="control">
|
||||
<input type="email" name="email" id="email_address" class="input-text" value="<?= $block->escapeHtmlAttr($block->getEmail()) ?>" data-validate="{required:true, 'validate-email':true}" data-mage-init='{"mage/trim-input":{}}'>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class="actions-toolbar">
|
||||
<div class="primary">
|
||||
<button type="submit" class="action send primary"><span><?= $block->escapeHtml(__('Send confirmation link')) ?></span></button>
|
||||
</div>
|
||||
<div class="secondary">
|
||||
<a href="<?= $block->escapeUrl($block->getLoginUrl()) ?>" class="action back"><span><?= $block->escapeHtml(__('Back to Sign In')) ?></span></a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -0,0 +1,194 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
use Magento\Customer\Block\Widget\Name;
|
||||
|
||||
/** @var \Magento\Customer\Block\Form\Edit $block */
|
||||
/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
|
||||
?>
|
||||
<form class="form form-edit-account"
|
||||
action="<?= $block->escapeUrl($block->getUrl('customer/account/editPost')) ?>"
|
||||
method="post" id="form-validate"
|
||||
enctype="multipart/form-data"
|
||||
data-hasrequired="<?= $block->escapeHtmlAttr(__('* Required Fields')) ?>"
|
||||
autocomplete="off">
|
||||
<fieldset class="fieldset info">
|
||||
<?= $block->getBlockHtml('formkey') ?>
|
||||
<legend class="legend"><span><?= $block->escapeHtml(__('Account Information')) ?></span></legend><br>
|
||||
<?= $block->getLayout()->createBlock(Name::class)->setObject($block->getCustomer())->toHtml() ?>
|
||||
|
||||
<?php $_dob = $block->getLayout()->createBlock(\Magento\Customer\Block\Widget\Dob::class) ?>
|
||||
<?php $_taxvat = $block->getLayout()->createBlock(\Magento\Customer\Block\Widget\Taxvat::class) ?>
|
||||
<?php $_gender = $block->getLayout()->createBlock(\Magento\Customer\Block\Widget\Gender::class) ?>
|
||||
<?php if ($_dob->isEnabled()): ?>
|
||||
<?= $_dob->setDate($block->getCustomer()->getDob())->toHtml() ?>
|
||||
<?php endif ?>
|
||||
<?php if ($_taxvat->isEnabled()): ?>
|
||||
<?= $_taxvat->setTaxvat($block->getCustomer()->getTaxvat())->toHtml() ?>
|
||||
<?php endif ?>
|
||||
<?php if ($_gender->isEnabled()): ?>
|
||||
<?= $_gender->setGender($block->getCustomer()->getGender())->toHtml() ?>
|
||||
<?php endif ?>
|
||||
<div class="field choice">
|
||||
<input type="checkbox" name="change_email" id="change-email" data-role="change-email" value="1"
|
||||
title="<?= $block->escapeHtmlAttr(__('Change Email')) ?>" class="checkbox" />
|
||||
<label class="label" for="change-email">
|
||||
<span><?= $block->escapeHtml(__('Change Email')) ?></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="field choice">
|
||||
<input type="checkbox" name="change_password" id="change-password" data-role="change-password" value="1"
|
||||
title="<?= $block->escapeHtmlAttr(__('Change Password')) ?>"
|
||||
<?php if ($block->getChangePassword()): ?> checked="checked"<?php endif; ?> class="checkbox" />
|
||||
<label class="label" for="change-password">
|
||||
<span><?= $block->escapeHtml(__('Change Password')) ?></span>
|
||||
</label>
|
||||
</div>
|
||||
<?= $block->getChildHtml('fieldset_edit_info_additional') ?>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="fieldset password" data-container="change-email-password">
|
||||
<legend class="legend">
|
||||
<span data-title="change-email-password"><?= $block->escapeHtml(__('Change Email and Password')) ?></span>
|
||||
</legend><br>
|
||||
<div class="field email required" data-container="change-email">
|
||||
<label class="label" for="email"><span><?= $block->escapeHtml(__('Email')) ?></span></label>
|
||||
<div class="control">
|
||||
<input type="email" name="email" id="email" autocomplete="email" data-input="change-email"
|
||||
value="<?= $block->escapeHtmlAttr($block->getCustomer()->getEmail()) ?>"
|
||||
title="<?= $block->escapeHtmlAttr(__('Email')) ?>"
|
||||
class="input-text"
|
||||
data-validate="{required:true, 'validate-email':true}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="field password current required">
|
||||
<label class="label" for="current-password">
|
||||
<span><?= $block->escapeHtml(__('Current Password')) ?></span>
|
||||
</label>
|
||||
<div class="control">
|
||||
<input type="password" class="input-text" name="current_password" id="current-password"
|
||||
data-input="current-password"
|
||||
autocomplete="off" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="field new password required" data-container="new-password">
|
||||
<label class="label" for="password"><span><?= $block->escapeHtml(__('New Password')) ?></span></label>
|
||||
<div class="control">
|
||||
<?php $minCharacterSets = $block->getRequiredCharacterClassesNumber() ?>
|
||||
<input type="password" class="input-text" name="password" id="password"
|
||||
data-password-min-length="<?= $block->escapeHtml($block->getMinimumPasswordLength()) ?>"
|
||||
data-password-min-character-sets="<?= $block->escapeHtml($minCharacterSets) ?>"
|
||||
data-input="new-password"
|
||||
data-validate="{required:true, 'validate-customer-password':true}"
|
||||
autocomplete="off" />
|
||||
<div id="password-strength-meter-container" data-role="password-strength-meter" aria-live="polite">
|
||||
<div id="password-strength-meter" class="password-strength-meter">
|
||||
<?= $block->escapeHtml(__('Password Strength')) ?>:
|
||||
<span id="password-strength-meter-label" data-role="password-strength-meter-label">
|
||||
<?= $block->escapeHtml(__('No Password')) ?>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field confirmation password required" data-container="confirm-password">
|
||||
<label class="label" for="password-confirmation">
|
||||
<span><?= $block->escapeHtml(__('Confirm New Password')) ?></span>
|
||||
</label>
|
||||
<div class="control">
|
||||
<input type="password" class="input-text" name="password_confirmation" id="password-confirmation"
|
||||
data-input="confirm-password"
|
||||
autocomplete="off" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="field choice" data-bind="scope: 'showPassword'">
|
||||
<!-- ko template: getTemplate() --><!-- /ko -->
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="fieldset additional_info">
|
||||
<?= $block->getChildHtml('form_additional_info') ?>
|
||||
</fieldset>
|
||||
|
||||
<div class="actions-toolbar">
|
||||
<div class="primary">
|
||||
<button type="submit" class="action save primary" title="<?= $block->escapeHtmlAttr(__('Save')) ?>">
|
||||
<span><?= $block->escapeHtml(__('Save')) ?></span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="secondary">
|
||||
<a class="action back" href="<?= $block->escapeUrl($block->getBackUrl()) ?>">
|
||||
<span><?= $block->escapeHtml(__('Go back')) ?></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<?php $ignore = /* @noEscape */ $_dob->isEnabled() ? '\'input[id$="full"]\'' : 'null';
|
||||
$scriptString = <<<script
|
||||
require([
|
||||
"jquery",
|
||||
"mage/mage"
|
||||
], function($){
|
||||
var dataForm = $('#form-validate');
|
||||
var ignore = {$ignore};
|
||||
|
||||
dataForm.mage('validation', {
|
||||
script;
|
||||
if ($_dob->isEnabled()):
|
||||
$scriptString .= <<<script
|
||||
errorPlacement: function(error, element) {
|
||||
if (element.prop('id').search('full') !== -1) {
|
||||
var dobElement = $(element).parents('.customer-dob'),
|
||||
errorClass = error.prop('class');
|
||||
error.insertAfter(element.parent());
|
||||
dobElement.find('.validate-custom').addClass(errorClass)
|
||||
.after('<div class="' + errorClass + '"></div>');
|
||||
}
|
||||
else {
|
||||
error.insertAfter(element);
|
||||
}
|
||||
},
|
||||
ignore: ':hidden:not(' + ignore + ')'
|
||||
script;
|
||||
else:
|
||||
$scriptString .= <<<script
|
||||
ignore: ignore ? ':hidden:not(' + ignore + ')' : ':hidden'
|
||||
script;
|
||||
endif;
|
||||
$scriptString .= <<<script
|
||||
});
|
||||
|
||||
});
|
||||
script;
|
||||
?>
|
||||
<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
|
||||
<?php $changeEmailAndPasswordTitle = $block->escapeHtml(__('Change Email and Password')) ?>
|
||||
<script type="text/x-magento-init">
|
||||
{
|
||||
"[data-role=change-email], [data-role=change-password]": {
|
||||
"changeEmailPassword": {
|
||||
"titleChangeEmail": "<?= $block->escapeJs($block->escapeHtml(__('Change Email'))) ?>",
|
||||
"titleChangePassword": "<?= $block->escapeJs($block->escapeHtml(__('Change Password'))) ?>",
|
||||
"titleChangeEmailAndPassword": "<?= $block->escapeJs($changeEmailAndPasswordTitle) ?>"
|
||||
}
|
||||
},
|
||||
"[data-container=new-password]": {
|
||||
"passwordStrengthIndicator": {
|
||||
"formSelector": "form.form-edit-account"
|
||||
}
|
||||
},
|
||||
"*": {
|
||||
"Magento_Ui/js/core/app": {
|
||||
"components": {
|
||||
"showPassword": {
|
||||
"component": "Magento_Customer/js/show-password",
|
||||
"passwordSelector": "#current-password,#password,#password-confirmation"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*
|
||||
* @var $block \Magento\Customer\Block\Account\Forgotpassword
|
||||
*/
|
||||
|
||||
// phpcs:disable Generic.Files.LineLength.TooLong
|
||||
|
||||
/** @var \Magento\Customer\Block\Account\Forgotpassword $block */
|
||||
/** @var \Magento\Customer\ViewModel\ForgotPasswordButton $forgotPasswordButtonViewModel */
|
||||
$forgotPasswordButtonViewModel = $block->getData('forgot_password_button_view_model');
|
||||
?>
|
||||
<form class="form password forget"
|
||||
action="<?= $block->escapeUrl($block->getUrl('*/*/forgotpasswordpost')) ?>"
|
||||
method="post"
|
||||
id="form-validate"
|
||||
data-mage-init='{"validation":{}}'>
|
||||
<fieldset class="fieldset" data-hasrequired="<?= $block->escapeHtmlAttr(__('* Required Fields')) ?>">
|
||||
<div class="field note"><?= $block->escapeHtml(__('Please enter your email address below to receive a password reset link.')) ?></div>
|
||||
<div class="field email required">
|
||||
<label for="email_address" class="label"><span><?= $block->escapeHtml(__('Email')) ?></span></label>
|
||||
<div class="control">
|
||||
<input type="email" name="email" alt="email" id="email_address" class="input-text" value="<?= $block->escapeHtmlAttr($block->getEmailValue()) ?>" data-mage-init='{"mage/trim-input":{}}' data-validate="{required:true, 'validate-email':true}">
|
||||
</div>
|
||||
</div>
|
||||
<?= $block->getChildHtml('form_additional_info') ?>
|
||||
</fieldset>
|
||||
<div class="actions-toolbar">
|
||||
<div class="primary">
|
||||
<button type="submit" class="action submit primary" id="send2" <?php if ($block->getButtonLockManager()->isDisabled('customer_forgot_password_form_submit')): ?> disabled="disabled" <?php endif; ?>><span><?= $block->escapeHtml(__('Reset My Password')) ?></span></button>
|
||||
</div>
|
||||
<div class="secondary">
|
||||
<a class="action back" href="<?= $block->escapeUrl($block->getLoginUrl()) ?>"><span><?= $block->escapeHtml(__('Go back')) ?></span></a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<?php // phpcs:ignore Magento2.Legacy.PhtmlTemplate ?>
|
||||
<script type="text/x-magento-init">
|
||||
{
|
||||
"*": {
|
||||
"Magento_Customer/js/block-submit-on-send": {
|
||||
"formId": "form-validate"
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
// phpcs:disable Generic.Files.LineLength.TooLong
|
||||
|
||||
/** @var \Magento\Customer\Block\Form\Login $block */
|
||||
?>
|
||||
<div class="block block-customer-login">
|
||||
<div class="block-content" aria-labelledby="block-customer-login-heading">
|
||||
<form class="form form-login"
|
||||
action="<?= $block->escapeUrl($block->getPostActionUrl()) ?>"
|
||||
method="post"
|
||||
id="login-form"
|
||||
data-mage-init='{"validation":{}}'>
|
||||
<?= $block->getBlockHtml('formkey') ?>
|
||||
<fieldset class="fieldset login" data-hasrequired="<?= $block->escapeHtml(__('* Required Fields')) ?>">
|
||||
<div class="field note"><?= $block->escapeHtml(__('If you have an account, sign in with your email address.')) ?></div>
|
||||
<div class="field email required">
|
||||
<label class="label" for="email"><span><?= $block->escapeHtml(__('Email')) ?></span></label>
|
||||
<div class="control">
|
||||
<input name="login[username]" value="<?= $block->escapeHtmlAttr($block->getUsername()) ?>"
|
||||
<?php if ($block->isAutocompleteDisabled()): ?> autocomplete="off"<?php endif; ?>
|
||||
id="email" type="email" class="input-text"
|
||||
title="<?= $block->escapeHtmlAttr(__('Email')) ?>"
|
||||
data-mage-init='{"mage/trim-input":{}}'
|
||||
data-validate="{required:true, 'validate-email':true}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="field password required">
|
||||
<label for="pass" class="label"><span><?= $block->escapeHtml(__('Password')) ?></span></label>
|
||||
<div class="control">
|
||||
<input name="login[password]" type="password"
|
||||
<?php if ($block->isAutocompleteDisabled()): ?> autocomplete="off"<?php endif; ?>
|
||||
class="input-text" id="pass"
|
||||
title="<?= $block->escapeHtmlAttr(__('Password')) ?>"
|
||||
data-validate="{required:true}">
|
||||
<span class="show-password"><svg t="1762488175339" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1543" width="32" height="32"><path d="M512 279.272727a401.314909 401.314909 0 0 0-372.363636 248.180364 403.409455 403.409455 0 0 0 744.727272 0A401.314909 401.314909 0 0 0 512 279.272727z m0 413.649455a165.469091 165.469091 0 0 1-170.030545-165.469091A165.469091 165.469091 0 0 1 512 362.030545a165.469091 165.469091 0 0 1 170.030545 165.422546A165.469091 165.469091 0 0 1 512 692.922182z m0-264.750546a98.443636 98.443636 0 0 0-100.957091 99.281455 101.143273 101.143273 0 0 0 202.333091 0A98.443636 98.443636 0 0 0 512 428.218182z" fill="#BBBBBB" p-id="1544"></path></svg></span>
|
||||
</div>
|
||||
</div>
|
||||
<?= $block->getChildHtml('form_additional_info') ?>
|
||||
<div class="actions-toolbar">
|
||||
<div class="primary"><button type="submit" class="action login primary" name="send" id="send2" <?php if ($block->getButtonLockManager()->isDisabled('customer_login_form_submit')): ?> disabled="disabled" <?php endif; ?>><span><?= $block->escapeHtml(__('Sign In')) ?></span></button></div>
|
||||
<div class="secondary"><a class="action remind" href="<?= $block->escapeUrl($block->getForgotPasswordUrl()) ?>"><span><?= $block->escapeHtml(__('Forgot Your Password?')) ?></span></a></div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
<?php // phpcs:ignore Magento2.Legacy.PhtmlTemplate ?>
|
||||
<script type="text/x-magento-init">
|
||||
{
|
||||
"*": {
|
||||
"Magento_Customer/js/block-submit-on-send": {
|
||||
"formId": "login-form"
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
require([
|
||||
'jquery'
|
||||
], function($){
|
||||
$('.show-password').click(function(){
|
||||
const passType = $('#pass').attr('type');
|
||||
if(passType == 'password'){
|
||||
$('.field.password .control .input-text').attr('type', 'text');
|
||||
} else {
|
||||
$('.field.password .control .input-text').attr('type', 'password');
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
/** @var \Magento\Customer\Block\Newsletter $block */
|
||||
?>
|
||||
<?= $block->getChildHtml('form_before') ?>
|
||||
<form class="form form-newsletter-manage" action="<?= $block->escapeUrl($block->getAction()) ?>" method="post" id="form-validate">
|
||||
<fieldset class="fieldset">
|
||||
<?= $block->getBlockHtml('formkey') ?>
|
||||
<legend class="legend"><span><?= $block->escapeHtml(__('Subscription option')) ?></span></legend><br>
|
||||
<div class="field choice">
|
||||
<input type="checkbox" name="is_subscribed" id="subscription" value="1" title="<?= $block->escapeHtmlAttr(__('General Subscription')) ?>"<?php if ($block->getIsSubscribed()) : ?> checked="checked"<?php endif; ?> class="checkbox">
|
||||
<label for="subscription" class="label"><span><?= $block->escapeHtml(__('General Subscription')) ?></span></label>
|
||||
</div>
|
||||
<?php /* Extensions placeholder */ ?>
|
||||
<?= $block->getChildHtml('customer.form.newsletter.extra') ?>
|
||||
</fieldset>
|
||||
<div class="actions-toolbar">
|
||||
<div class="primary"><button type="submit" title="<?= $block->escapeHtmlAttr(__('Save')) ?>" class="action save primary"><span><?= $block->escapeHtml(__('Save')) ?></span></button></div>
|
||||
<div class="secondary"><a class="action back" href="<?= $block->escapeUrl($block->getBackUrl()) ?>"><span><?= $block->escapeHtml(__('Back')) ?></span></a></div>
|
||||
</div>
|
||||
</form>
|
||||
<?php /* Extensions placeholder */ ?>
|
||||
<?= $block->getChildHtml('customer.form.newsletter.extra2') ?>
|
||||
@@ -0,0 +1,452 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
use Magento\Customer\Helper\Address;
|
||||
|
||||
/** @var \Magento\Customer\Block\Form\Register $block */
|
||||
/** @var \Magento\Framework\Escaper $escaper */
|
||||
/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
|
||||
|
||||
/** @var Magento\Customer\Helper\Address $addressHelper */
|
||||
$addressHelper = $block->getData('addressHelper');
|
||||
/** @var \Magento\Directory\Helper\Data $directoryHelper */
|
||||
$directoryHelper = $block->getData('directoryHelper');
|
||||
/** @var \Magento\Customer\ViewModel\Address\RegionProvider $regionProvider */
|
||||
$regionProvider = $block->getRegionProvider();
|
||||
$formData = $block->getFormData();
|
||||
/** @var \Magento\Customer\ViewModel\CreateAccountButton $createAccountButtonViewModel */
|
||||
$createAccountButtonViewModel = $block->getData('create_account_button_view_model');
|
||||
?>
|
||||
<?php $displayAll = $block->getConfig('general/region/display_all'); ?>
|
||||
<?= $block->getChildHtml('form_fields_before') ?>
|
||||
<?php /* Extensions placeholder */ ?>
|
||||
<?= $block->getChildHtml('customer.form.register.extra') ?>
|
||||
<div class="create-account-tab">
|
||||
<div class="tab wholesale active">经销商</div>
|
||||
<div class="tab person">个人</div>
|
||||
</div>
|
||||
<form class="form create account form-create-account"
|
||||
action="<?= $escaper->escapeUrl($block->getPostActionUrl()) ?>"
|
||||
method="post"
|
||||
id="form-validate"
|
||||
enctype="multipart/form-data"
|
||||
autocomplete="off">
|
||||
<?= /* @noEscape */ $block->getBlockHtml('formkey') ?>
|
||||
|
||||
<fieldset class="fieldset create info">
|
||||
<legend class="legend"><span><?= $escaper->escapeHtml(__('账号信息')) ?></span></legend><br>
|
||||
<input type="hidden" name="success_url" value="<?= $escaper->escapeUrl($block->getSuccessUrl()) ?>">
|
||||
<input type="hidden" name="error_url" value="<?= $escaper->escapeUrl($block->getErrorUrl()) ?>">
|
||||
<?= $block->getLayout()
|
||||
->createBlock(\Magento\Customer\Block\Widget\Name::class)
|
||||
->setObject($formData)
|
||||
->setForceUseCustomerAttributes(true)
|
||||
->toHtml() ?>
|
||||
|
||||
<div class="field required">
|
||||
<label for="email_address" class="label"><span><?= $escaper->escapeHtml(__('邮箱')) ?></span></label>
|
||||
<div class="control">
|
||||
<input type="email"
|
||||
name="email"
|
||||
autocomplete="email"
|
||||
id="email_address"
|
||||
value="<?= $escaper->escapeHtmlAttr($formData->getEmail()) ?>"
|
||||
title="<?= $escaper->escapeHtmlAttr(__('Email')) ?>"
|
||||
class="input-text"
|
||||
data-mage-init='{"mage/trim-input":{}}'
|
||||
data-validate="{required:true, 'validate-email':true}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="field required">
|
||||
<label for="mobile" class="label"><span><?= $escaper->escapeHtml(__('手机')) ?></span></label>
|
||||
<div class="control mobile-control">
|
||||
<input type="number"
|
||||
name="mobile"
|
||||
id="mobile"
|
||||
value="<?= $escaper->escapeHtmlAttr($formData->getMobile()) ?>"
|
||||
title="<?= $escaper->escapeHtmlAttr(__('手机')) ?>"
|
||||
class="input-text"
|
||||
data-mage-init='{"mage/trim-input":{}}'
|
||||
data-validate="{required:true, 'validate-mobile':true}">
|
||||
<button type="button" class="action primary get-validate-btn">获取验证码</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field required">
|
||||
<label for="validate-code" class="label"><span><?= $escaper->escapeHtml(__('验证码')) ?></span></label>
|
||||
<div class="control">
|
||||
<input type="text"
|
||||
name="validate-code"
|
||||
id="validate-code"
|
||||
value=""
|
||||
title="<?= $escaper->escapeHtmlAttr(__('验证码')) ?>"
|
||||
class="input-text"
|
||||
data-mage-init='{"mage/trim-input":{}}'
|
||||
data-validate="{required:true">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php $_dob = $block->getLayout()->createBlock(\Magento\Customer\Block\Widget\Dob::class) ?>
|
||||
<?php if ($_dob->isEnabled()): ?>
|
||||
<?= $_dob->setDate($formData->getDob())->toHtml() ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?php $_taxvat = $block->getLayout()->createBlock(\Magento\Customer\Block\Widget\Taxvat::class) ?>
|
||||
<?php if ($_taxvat->isEnabled()): ?>
|
||||
<?= $_taxvat->setTaxvat($formData->getTaxvat())->toHtml() ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?php $_gender = $block->getLayout()->createBlock(\Magento\Customer\Block\Widget\Gender::class) ?>
|
||||
<?php if ($_gender->isEnabled()): ?>
|
||||
<?= $_gender->setGender($formData->getGender())->toHtml() ?>
|
||||
<?php endif ?>
|
||||
</fieldset>
|
||||
<?php if ($block->getShowAddressFields()): ?>
|
||||
<?php $cityValidationClass = $addressHelper->getAttributeValidationClass('city'); ?>
|
||||
<?php $postcodeValidationClass = $addressHelper->getAttributeValidationClass('postcode'); ?>
|
||||
<?php $regionValidationClass = $addressHelper->getAttributeValidationClass('region'); ?>
|
||||
<fieldset class="fieldset address">
|
||||
|
||||
<?php $_company = $block->getLayout()->createBlock(\Magento\Customer\Block\Widget\Company::class) ?>
|
||||
<?php if ($_company->isEnabled()): ?>
|
||||
<?= $_company->setCompany($formData->getCompany())->toHtml() ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?php $_telephone = $block->getLayout()->createBlock(\Magento\Customer\Block\Widget\Telephone::class) ?>
|
||||
<?php if ($_telephone->isEnabled()): ?>
|
||||
<?= $_telephone->setTelephone($formData->getTelephone())->toHtml() ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?php $_fax = $block->getLayout()->createBlock(\Magento\Customer\Block\Widget\Fax::class) ?>
|
||||
<?php if ($_fax->isEnabled()): ?>
|
||||
<?= $_fax->setFax($formData->getFax())->toHtml() ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?php
|
||||
$_streetValidationClass = $addressHelper->getAttributeValidationClass('street');
|
||||
?>
|
||||
|
||||
<div class="field street required">
|
||||
<label for="street_1" class="label">
|
||||
<span>公司地址</span>
|
||||
</label>
|
||||
<div class="control">
|
||||
<input type="text"
|
||||
name="street[0]"
|
||||
value="<?= $escaper->escapeHtmlAttr($formData->getStreet(0)) ?>"
|
||||
title="<?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('street') ?>"
|
||||
id="street_1"
|
||||
class="input-text <?= $escaper->escapeHtmlAttr($_streetValidationClass) ?>">
|
||||
<div class="nested">
|
||||
<?php
|
||||
$_streetValidationClass = $_streetValidationClass !== null ?
|
||||
trim(str_replace('required-entry', '', $_streetValidationClass)) : '';
|
||||
$streetLines = $addressHelper->getStreetLines();
|
||||
?>
|
||||
<?php for ($_i = 2, $_n = $streetLines; $_i <= $_n; $_i++): ?>
|
||||
<div class="field additional">
|
||||
<label class="label" for="street_<?= /* @noEscape */ $_i ?>">
|
||||
<span><?= $escaper->escapeHtml(__('Address')) ?></span>
|
||||
</label>
|
||||
<div class="control">
|
||||
<input type="text"
|
||||
name="street[<?= /* @noEscape */ $_i ?>]"
|
||||
value="<?= $escaper->escapeHtml($formData->getStreetLine($_i - 1)) ?>"
|
||||
title="<?= $escaper->escapeHtmlAttr(__('Street Address %1', $_i)) ?>"
|
||||
id="street_<?= /* @noEscape */ $_i ?>"
|
||||
class="input-text <?= $escaper->escapeHtmlAttr($_streetValidationClass) ?>">
|
||||
</div>
|
||||
</div>
|
||||
<?php endfor; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field zip required">
|
||||
<label for="zip" class="label">
|
||||
<span>邮编</span>
|
||||
</label>
|
||||
<div class="control">
|
||||
<input type="text"
|
||||
name="postcode"
|
||||
value="<?= $escaper->escapeHtmlAttr($formData->getPostcode()) ?>"
|
||||
title="<?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('postcode') ?>"
|
||||
id="zip"
|
||||
class="input-text validate-zip-international
|
||||
<?= $escaper->escapeHtmlAttr($postcodeValidationClass) ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field personal-field">
|
||||
<label for="department" class="label"><span><?= $escaper->escapeHtml(__('课题组/部门')) ?></span></label>
|
||||
<div class="control">
|
||||
<input type="text"
|
||||
name="department"
|
||||
id="department"
|
||||
value=""
|
||||
title="<?= $escaper->escapeHtmlAttr(__('课题组/部门')) ?>"
|
||||
class="input-text"
|
||||
data-mage-init='{"mage/trim-input":{}}'>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field personal-field">
|
||||
<label for="research_fields" class="label"><span><?= $escaper->escapeHtml(__('研究方向(多选)')) ?></span></label>
|
||||
<div class="control">
|
||||
<select name="research_fields" class="research-select" multiple="multiple">
|
||||
<option value="">选择研究方向</option>
|
||||
<option value="细胞治疗">细胞治疗</option>
|
||||
<option value="免疫研究">免疫研究</option>
|
||||
<option value="抗体筛选">抗体筛选</option>
|
||||
<option value="多能干细胞">多能干细胞</option>
|
||||
<option value="间充质干细胞">间充质干细胞</option>
|
||||
<option value="神经科学">神经科学</option>
|
||||
<option value="造血干细胞">造血干细胞</option>
|
||||
<option value="类器官">类器官</option>
|
||||
<option value="其他">其他</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ($addressHelper->isVatAttributeVisible()): ?>
|
||||
<?php $_vatidValidationClass = $addressHelper->getAttributeValidationClass('vat_id'); ?>
|
||||
<div class="field taxvat">
|
||||
<label class="label" for="vat_id">
|
||||
<span><?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('vat_id') ?></span>
|
||||
</label>
|
||||
<div class="control">
|
||||
<input type="text"
|
||||
name="vat_id"
|
||||
value="<?= $escaper->escapeHtmlAttr($formData->getVatId()) ?>"
|
||||
title="<?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('vat_id') ?>"
|
||||
class="input-text <?= $escaper->escapeHtmlAttr($_vatidValidationClass) ?>"
|
||||
id="vat_id">
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php $addressAttributes = $block->getChildBlock('customer_form_address_user_attributes');?>
|
||||
<?php if ($addressAttributes): ?>
|
||||
<?php $addressAttributes->setEntityType('customer_address'); ?>
|
||||
<?php $addressAttributes->setFieldIdFormat('address:%1$s')->setFieldNameFormat('address[%1$s]');?>
|
||||
<?php $block->restoreSessionData($addressAttributes->getMetadataForm(), 'address');?>
|
||||
<?= $addressAttributes->setShowContainer(false)->toHtml() ?>
|
||||
<?php endif;?>
|
||||
<input type="hidden" name="create_address" value="1" />
|
||||
<input type="hidden" name="default_billing" value="1">
|
||||
<input type="hidden" name="default_shipping" value="1">
|
||||
</fieldset>
|
||||
|
||||
<?php endif; ?>
|
||||
<fieldset class="fieldset create account"
|
||||
data-hasrequired="<?= $escaper->escapeHtmlAttr(__('* Required Fields')) ?>">
|
||||
<legend class="legend"><span><?= $escaper->escapeHtml(__('登录信息')) ?></span></legend><br>
|
||||
|
||||
<div class="field password required">
|
||||
<label for="password" class="label"><span><?= $escaper->escapeHtml(__('密码')) ?></span></label>
|
||||
<div class="control">
|
||||
<input type="password" name="password" id="password"
|
||||
title="<?= $escaper->escapeHtmlAttr(__('密码')) ?>"
|
||||
class="input-text"
|
||||
data-password-min-length="<?=
|
||||
$escaper->escapeHtmlAttr($block->getMinimumPasswordLength()) ?>"
|
||||
data-password-min-character-sets="<?=
|
||||
$escaper->escapeHtmlAttr($block->getRequiredCharacterClassesNumber()) ?>"
|
||||
data-validate="{required:true, 'validate-customer-password':true}"
|
||||
autocomplete="off">
|
||||
<div id="password-strength-meter-container" data-role="password-strength-meter" aria-live="polite">
|
||||
<div id="password-strength-meter" class="password-strength-meter">
|
||||
<?= $escaper->escapeHtml(__('Password Strength')) ?>:
|
||||
<span id="password-strength-meter-label" data-role="password-strength-meter-label">
|
||||
<?= $escaper->escapeHtml(__('No Password')) ?>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="field confirmation required">
|
||||
<label for="password-confirmation" class="label">
|
||||
<span><?= $escaper->escapeHtml(__('确认密码')) ?></span>
|
||||
</label>
|
||||
<div class="control">
|
||||
<input type="password"
|
||||
name="password_confirmation"
|
||||
title="<?= $escaper->escapeHtmlAttr(__('确认密码')) ?>"
|
||||
id="password-confirmation"
|
||||
class="input-text"
|
||||
data-validate="{required:true, equalTo:'#password'}"
|
||||
autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($block->isNewsletterEnabled()): ?>
|
||||
<div class="field choice newsletter">
|
||||
<input type="checkbox"
|
||||
name="is_subscribed"
|
||||
title="<?= $escaper->escapeHtmlAttr(__('Sign Up for Newsletter')) ?>"
|
||||
value="1"
|
||||
id="is_subscribed"
|
||||
<?php if ($formData->getIsSubscribed()): ?>checked="checked"<?php endif; ?>
|
||||
class="checkbox">
|
||||
<label for="is_subscribed" class="label">
|
||||
<span><?= $escaper->escapeHtml(__('Sign Up for Newsletter')) ?></span>
|
||||
</label>
|
||||
</div>
|
||||
<?php /* Extensions placeholder */ ?>
|
||||
<?= $block->getChildHtml('customer.form.register.newsletter') ?>
|
||||
<?php endif ?>
|
||||
</fieldset>
|
||||
|
||||
<div class="actions-toolbar">
|
||||
<div class="primary">
|
||||
<button type="submit"
|
||||
class="action submit primary"
|
||||
title="<?= $escaper->escapeHtmlAttr(__('Create an Account')) ?>"
|
||||
id="send2"
|
||||
<?php if ($createAccountButtonViewModel->disabled()): ?> disabled="disabled" <?php endif; ?>>
|
||||
<span><?= $escaper->escapeHtml(__('Create an Account')) ?></span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="secondary">
|
||||
<a class="action back"
|
||||
href="<?= $escaper->escapeUrl($block->getBackUrl()) ?>">
|
||||
<span><?= $escaper->escapeHtml(__('Back')) ?></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<?php $ignore = /* @noEscape */ $_dob->isEnabled() ? '\'input[id$="full"]\'' : 'null';
|
||||
$scriptString = <<<script
|
||||
require([
|
||||
'jquery',
|
||||
'mage/mage'
|
||||
], function($){
|
||||
|
||||
var dataForm = $('#form-validate');
|
||||
var ignore = {$ignore};
|
||||
|
||||
dataForm.mage('validation', {
|
||||
script;
|
||||
if ($_dob->isEnabled()):
|
||||
$scriptString .= <<<script
|
||||
errorPlacement: function(error, element) {
|
||||
if (element.prop('id').search('full') !== -1) {
|
||||
var dobElement = $(element).parents('.customer-dob'),
|
||||
errorClass = error.prop('class');
|
||||
error.insertAfter(element.parent());
|
||||
dobElement.find('.validate-custom').addClass(errorClass)
|
||||
.after('<div class="' + errorClass + '"></div>');
|
||||
}
|
||||
else {
|
||||
error.insertAfter(element);
|
||||
}
|
||||
},
|
||||
ignore: ':hidden:not(' + ignore + ')'
|
||||
script;
|
||||
else:
|
||||
$scriptString .= <<<script
|
||||
ignore: ignore ? ':hidden:not(' + ignore + ')' : ':hidden'
|
||||
script;
|
||||
endif;
|
||||
$scriptString .= <<<script
|
||||
}).find('input:text').attr('autocomplete', 'off');
|
||||
});
|
||||
script;
|
||||
?>
|
||||
<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
|
||||
<?php if ($block->getShowAddressFields()): ?>
|
||||
<?php
|
||||
$regionJson = /* @noEscape */ $regionProvider->getRegionJson();
|
||||
$regionId = (int) $formData->getRegionId();
|
||||
$countriesWithOptionalZip = /* @noEscape */ $directoryHelper->getCountriesWithOptionalZip(true);
|
||||
?>
|
||||
<?php // phpcs:ignore Magento2.Legacy.PhtmlTemplate ?>
|
||||
<script type="text/x-magento-init">
|
||||
{
|
||||
"#country": {
|
||||
"directoryRegionUpdater": {
|
||||
"optionalRegionAllowed": <?= /* @noEscape */ $displayAll ? 'true' : 'false' ?>,
|
||||
"regionListId": "#region_id",
|
||||
"regionInputId": "#region",
|
||||
"postcodeId": "#zip",
|
||||
"form": "#form-validate",
|
||||
"regionJson": <?= /* @noEscape */ $regionJson ?>,
|
||||
"defaultRegion": <?= /* @noEscape */ $regionId ?>,
|
||||
"countriesWithOptionalZip": <?= /* @noEscape */ $countriesWithOptionalZip ?>
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
<?php // phpcs:ignore Magento2.Legacy.PhtmlTemplate ?>
|
||||
<script type="text/x-magento-init">
|
||||
{
|
||||
".field.password": {
|
||||
"passwordStrengthIndicator": {
|
||||
"formSelector": "form.form-create-account"
|
||||
}
|
||||
},
|
||||
"*": {
|
||||
"Magento_Customer/js/block-submit-on-send": {
|
||||
"formId": "form-validate"
|
||||
},
|
||||
"Magento_Ui/js/core/app": {
|
||||
"components": {
|
||||
"showPassword": {
|
||||
"component": "Magento_Customer/js/show-password",
|
||||
"passwordSelector": "#password,#password-confirmation"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
require([
|
||||
'jquery'
|
||||
], function($){
|
||||
// 经销商和个人切换
|
||||
$('.create-account-tab .tab').click(function(){
|
||||
$(this).addClass('active').siblings().removeClass('active');
|
||||
if($(this).hasClass('person')){
|
||||
$('.personal-field').show()
|
||||
} else {
|
||||
$('.personal-field').hide()
|
||||
}
|
||||
});
|
||||
|
||||
// 获取验证码
|
||||
$('.get-validate-btn').click(function(){
|
||||
const reg = /^1[3|4|5|6|7|8|9][0-9]\d{8}$/;
|
||||
const mobile = $('#mobile').val();
|
||||
if(!mobile){
|
||||
alert('请输入手机号!');
|
||||
return false;
|
||||
}
|
||||
if(reg.test(mobile)){
|
||||
const formKey = $('input[name="form_key"]').val();
|
||||
$.ajax({
|
||||
url: window.checkout.baseUrl + 'commerce_customer/sms/send',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: {'mobile': mobile, 'form_key':formKey},
|
||||
success: function (data) {
|
||||
console.log(data);
|
||||
if(data.error){
|
||||
alert('短信验证码发送失败!');
|
||||
} else {
|
||||
alert('短信验证码发送成功!');
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
alert('暂时无法发送验证码!');
|
||||
}
|
||||
});
|
||||
} else {
|
||||
alert('请输入正确的手机号!');
|
||||
}
|
||||
})
|
||||
|
||||
});
|
||||
</script>
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
// phpcs:disable Generic.Files.LineLength.TooLong
|
||||
//phpcs:disable Magento2.Legacy.PhtmlTemplate
|
||||
/** @var \Magento\Customer\Block\Account\Resetpassword $block */
|
||||
?>
|
||||
<form action="<?= $block->escapeUrl($block->getUrl('*/*/resetpasswordpost', ['_query' => ['id'=>$block->getRpCustomerId(),'token' => $block->getResetPasswordLinkToken()]])) ?>"
|
||||
method="post"
|
||||
<?php if ($block->isAutocompleteDisabled()): ?> autocomplete="off"<?php endif; ?>
|
||||
id="form-validate"
|
||||
class="form password reset"
|
||||
data-mage-init='{"validation":{}}'>
|
||||
<fieldset class="fieldset" data-hasrequired="<?= $block->escapeHtmlAttr(__('* Required Fields')) ?>">
|
||||
<div class="field password required" data-mage-init='{"passwordStrengthIndicator": {}}'>
|
||||
<label class="label" for="password"><span><?= $block->escapeHtml(__('New Password')) ?></span></label>
|
||||
<div class="control">
|
||||
<input type="password" class="input-text" name="password" id="password"
|
||||
data-password-min-length="<?= $block->escapeHtmlAttr($block->getMinimumPasswordLength()) ?>"
|
||||
data-password-min-character-sets="<?= $block->escapeHtmlAttr($block->getRequiredCharacterClassesNumber()) ?>"
|
||||
data-validate="{required:true, 'validate-customer-password':true}"
|
||||
autocomplete="off">
|
||||
<div id="password-strength-meter-container" data-role="password-strength-meter" aria-live="polite">
|
||||
<div id="password-strength-meter" class="password-strength-meter">
|
||||
<?= $block->escapeHtml(__('Password Strength')) ?>:
|
||||
<span id="password-strength-meter-label" data-role="password-strength-meter-label">
|
||||
<?= $block->escapeHtml(__('No Password')) ?>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field confirmation required">
|
||||
<label class="label" for="password-confirmation"><span><?= $block->escapeHtml(__('Confirm New Password')) ?></span></label>
|
||||
<div class="control">
|
||||
<input type="password" class="input-text" name="password_confirmation" id="password-confirmation" data-validate="{required:true,equalTo:'#password'}" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<div class="field choice" data-bind="scope: 'showPassword'">
|
||||
<!-- ko template: getTemplate() --><!-- /ko -->
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class="actions-toolbar">
|
||||
<div class="primary">
|
||||
<button type="submit" class="action submit primary"><span><?= $block->escapeHtml(__('Set a New Password')) ?></span></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<script type="text/x-magento-init">
|
||||
{
|
||||
"*": {
|
||||
"Magento_Ui/js/core/app": {
|
||||
"components": {
|
||||
"showPassword": {
|
||||
"component": "Magento_Customer/js/show-password",
|
||||
"passwordSelector": "#password,#password-confirmation"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
/** @var \Magento\Framework\View\Element\Template $block */
|
||||
?>
|
||||
<p><?= $block->escapeHtml(__('You have signed out and will go to our homepage in 5 seconds.')) ?></p>
|
||||
<script type="text/x-magento-init">
|
||||
{
|
||||
"*": {
|
||||
"Magento_Customer/js/logout-redirect": {
|
||||
"url": "<?= $block->escapeJs($block->escapeUrl($block->getUrl())) ?>"
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
/** @var \Magento\Customer\Block\Form\Login\Info $block */
|
||||
?>
|
||||
<?php if ($block->getRegistration()->isAllowed()) : ?>
|
||||
<div class="block block-new-customer">
|
||||
<div class="block-title">
|
||||
<strong id="block-new-customer-heading" role="heading" aria-level="2"><?= $block->escapeHtml(__('New Customers')) ?></strong>
|
||||
</div>
|
||||
<div class="block-content" aria-labelledby="block-new-customer-heading">
|
||||
<p><?= $block->escapeHtml(__('Creating an account has many benefits: check out faster, keep more than one address, track orders and more.')) ?></p>
|
||||
<div class="actions-toolbar">
|
||||
<div class="primary">
|
||||
<a href="<?= $block->escapeUrl($block->getCreateAccountUrl()) ?>" class="action create primary"><span><?= $block->escapeHtml(__('Create an Account')) ?></span></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
/** @var \Magento\Customer\Block\Widget\Company $block */
|
||||
?>
|
||||
<div class="field company <?= $block->isRequired() ? 'required' : '' ?>">
|
||||
<label for="company" class="label">
|
||||
<span>
|
||||
<?= $block->escapeHtml(__('公司名称')) ?>
|
||||
</span>
|
||||
</label>
|
||||
<div class="control">
|
||||
<?php
|
||||
$_validationClass = $block->escapeHtmlAttr(
|
||||
$this->helper(\Magento\Customer\Helper\Address::class)
|
||||
->getAttributeValidationClass('company')
|
||||
);
|
||||
?>
|
||||
<input type="text"
|
||||
name="company"
|
||||
id="company"
|
||||
value="<?= $block->escapeHtmlAttr($block->getCompany()) ?>"
|
||||
title="<?= $block->escapeHtmlAttr(__('Company')) ?>"
|
||||
class="input-text <?= $_validationClass ?: '' ?>"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
|
||||
/** @var \Magento\Customer\Block\Widget\Dob $block */
|
||||
|
||||
/*
|
||||
<?= $block->getLayout()->createBlock('Magento\Customer\Block\Widget\Dob')
|
||||
->setDate($block->getCustomer()->getDob())
|
||||
->toHtml() ?>
|
||||
|
||||
For checkout/onepage/billing.phtml:
|
||||
|
||||
<?= $block->getLayout()->createBlock('Magento\Customer\Block\Widget\Dob')
|
||||
->setDate($block->getCustomer()->getDob())
|
||||
->setFieldIdFormat('billing:%s')
|
||||
->setFieldNameFormat('billing[%s]')
|
||||
->toHtml() ?>
|
||||
|
||||
NOTE: Regarding styles - if we leave it this way, we'll move it to boxes.css. Alternatively we could calculate widths
|
||||
automatically using block input parameters.
|
||||
*/
|
||||
|
||||
$translatedCalendarConfigJson = $block->getTranslatedCalendarConfigJson();
|
||||
$fieldCssClass = 'field date field-' . $block->getHtmlId();
|
||||
$fieldCssClass .= $block->isRequired() ? ' required' : '';
|
||||
?>
|
||||
<div class="<?= $block->escapeHtmlAttr($fieldCssClass) ?>">
|
||||
<label class="label" for="<?= $block->escapeHtmlAttr($block->getHtmlId()) ?>">
|
||||
<span><?= $block->escapeHtml($block->getStoreLabel('dob')) ?></span>
|
||||
</label>
|
||||
<div class="control customer-dob">
|
||||
<?= $block->getFieldHtml() ?>
|
||||
<?php if ($_message = $block->getAdditionalDescription()): ?>
|
||||
<div class="note"><?= $block->escapeHtml($_message) ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/x-magento-init">
|
||||
{
|
||||
"*": {
|
||||
"Magento_Customer/js/validation": {}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php $scriptString = <<<code
|
||||
|
||||
require([
|
||||
'jquery',
|
||||
'jquery-ui-modules/datepicker'
|
||||
], function($){
|
||||
|
||||
//<![CDATA[
|
||||
$.extend(true, $, {
|
||||
calendarConfig: {$translatedCalendarConfigJson}
|
||||
});
|
||||
//]]>
|
||||
|
||||
});
|
||||
code;
|
||||
?>
|
||||
<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
/** @var \Magento\Customer\Block\Widget\Fax $block */
|
||||
?>
|
||||
|
||||
<div class="field fax <?= $block->isRequired() ? 'required' : '' ?>">
|
||||
<label for="fax" class="label">
|
||||
<span>
|
||||
<?= $block->escapeHtml(__('Fax')) ?>
|
||||
</span>
|
||||
</label>
|
||||
<div class="control">
|
||||
<?php
|
||||
$_validationClass = $block->escapeHtmlAttr(
|
||||
$this->helper(\Magento\Customer\Helper\Address::class)
|
||||
->getAttributeValidationClass('fax')
|
||||
);
|
||||
?>
|
||||
<input type="text"
|
||||
name="fax"
|
||||
id="fax"
|
||||
value="<?= $block->escapeHtmlAttr($block->getFax()) ?>"
|
||||
title="<?= $block->escapeHtmlAttr(__('Fax')) ?>"
|
||||
class="input-text <?= $_validationClass ?: '' ?>"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
/** @var \Magento\Customer\Block\Widget\Gender $block */
|
||||
?>
|
||||
<div class="field gender<?= $block->isRequired() ? ' required' : ''?>">
|
||||
<label class="label" for="<?= $block->escapeHtmlAttr($block->getFieldId('gender')) ?>"><span><?= $block->escapeHtml($block->getStoreLabel('gender')) ?></span></label>
|
||||
<div class="control">
|
||||
<select id="<?= $block->escapeHtmlAttr($block->getFieldId('gender')) ?>" name="<?= $block->escapeHtmlAttr($block->getFieldName('gender')) ?>" title="<?= $block->escapeHtmlAttr($block->getStoreLabel('gender')) ?>"<?php if ($block->isRequired()) : ?> class="validate-select" data-validate="{required:true}"<?php endif; ?>>
|
||||
<?php $options = $block->getGenderOptions(); ?>
|
||||
<?php $value = $block->getGender(); ?>
|
||||
<?php foreach ($options as $option) : ?>
|
||||
<option value="<?= $block->escapeHtmlAttr($option->getValue()) ?>"<?= ($option->getValue() == $value) ? ' selected="selected"' : '' ?>><?= $block->escapeHtml(__($option->getLabel())) ?></option>
|
||||
<?php endforeach;?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,140 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
/** @var \Magento\Customer\Block\Widget\Name $block */
|
||||
|
||||
/*
|
||||
<?= $block->getLayout()->createBlock('Magento\Customer\Block\Widget\Name')
|
||||
->setObject($block->getAddress())
|
||||
->toHtml() ?>
|
||||
|
||||
For checkout/onepage/shipping.phtml:
|
||||
|
||||
<?= $block->getLayout()->createBlock('Magento\Customer\Block\Widget\Name')
|
||||
->setObject($block->getAddress())
|
||||
->setFieldIdFormat('shipping:%s')
|
||||
->setFieldNameFormat('shipping[%s]')
|
||||
->toHtml() ?>
|
||||
*/
|
||||
|
||||
$prefix = $block->showPrefix();
|
||||
$middle = $block->showMiddlename();
|
||||
$suffix = $block->showSuffix();
|
||||
?>
|
||||
<?php if (($prefix || $middle || $suffix) && !$block->getNoWrap()): ?>
|
||||
<div class="field required fullname <?= $block->escapeHtmlAttr($block->getContainerClassName()) ?>">
|
||||
<label for="<?= $block->escapeHtmlAttr($block->getFieldId('firstname')) ?>" class="label">
|
||||
<span><?= $block->escapeHtml(__('Name')) ?></span>
|
||||
</label>
|
||||
<div class="control">
|
||||
<fieldset class="fieldset fieldset-fullname">
|
||||
<div class="fields">
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($prefix): ?>
|
||||
<div class="field field-name-prefix<?= $block->isPrefixRequired() ? ' required' : '' ?>">
|
||||
<label class="label" for="<?= $block->escapeHtmlAttr($block->getFieldId('prefix')) ?>">
|
||||
<span><?= $block->escapeHtml($block->getStoreLabel('prefix')) ?></span>
|
||||
</label>
|
||||
<div class="control">
|
||||
<?php if ($block->getPrefixOptions() === false): ?>
|
||||
<input type="text" id="<?= $block->escapeHtmlAttr($block->getFieldId('prefix')) ?>"
|
||||
name="<?= $block->escapeHtmlAttr($block->getFieldName('prefix')) ?>"
|
||||
value="<?= $block->escapeHtmlAttr($block->getObject()->getPrefix()) ?>"
|
||||
title="<?= $block->escapeHtmlAttr($block->getStoreLabel('prefix')) ?>"
|
||||
class="input-text
|
||||
<?= $block->escapeHtmlAttr($block->getAttributeValidationClass('prefix')) ?>"
|
||||
<?= $block->isPrefixRequired() ? ' data-validate="{required:true}"' : '' ?>>
|
||||
<?php else: ?>
|
||||
<select id="<?= $block->escapeHtmlAttr($block->getFieldId('prefix')) ?>"
|
||||
name="<?= $block->escapeHtmlAttr($block->getFieldName('prefix')) ?>"
|
||||
title="<?= $block->escapeHtmlAttr($block->getStoreLabel('prefix')) ?>"
|
||||
class="<?= $block->escapeHtmlAttr($block->getAttributeValidationClass('prefix')) ?>"
|
||||
<?= $block->isPrefixRequired() ? ' data-validate="{required:true}"' : '' ?> >
|
||||
<?php foreach ($block->getPrefixOptions() as $_option): ?>
|
||||
<option value="<?= $block->escapeHtmlAttr(__($_option)) ?>"
|
||||
<?php if ($block->getObject()->getPrefix() == $_option): ?>
|
||||
selected="selected"<?php endif; ?>>
|
||||
<?= $block->escapeHtml(__($_option)) ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="field field-name-firstname required">
|
||||
<label class="label" for="<?= $block->escapeHtmlAttr($block->getFieldId('firstname')) ?>">
|
||||
<span>经销商名称</span>
|
||||
</label>
|
||||
<div class="control">
|
||||
<input type="text" id="<?= $block->escapeHtmlAttr($block->getFieldId('firstname')) ?>"
|
||||
name="<?= $block->escapeHtmlAttr($block->getFieldName('firstname')) ?>"
|
||||
value="<?= $block->escapeHtmlAttr($block->getObject()->getFirstname()) ?>"
|
||||
title="<?= $block->escapeHtmlAttr($block->getStoreLabel('firstname')) ?>"
|
||||
class="input-text
|
||||
<?= $block->escapeHtmlAttr($block->getAttributeValidationClass('firstname')) ?>"
|
||||
<?= ($block->getAttributeValidationClass('firstname') == 'required-entry') ? '
|
||||
data-validate="{required:true}"' : '' ?>>
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($middle): ?>
|
||||
<?php $isMiddlenameRequired = $block->isMiddlenameRequired(); ?>
|
||||
<div class="field field-name-middlename<?= $isMiddlenameRequired ? ' required' : '' ?>">
|
||||
<label class="label" for="<?= $block->escapeHtmlAttr($block->getFieldId('middlename')) ?>">
|
||||
<span><?= $block->escapeHtml($block->getStoreLabel('middlename')) ?></span>
|
||||
</label>
|
||||
<div class="control">
|
||||
<input type="text" id="<?= $block->escapeHtmlAttr($block->getFieldId('middlename')) ?>"
|
||||
name="<?= $block->escapeHtmlAttr($block->getFieldName('middlename')) ?>"
|
||||
value="<?= $block->escapeHtmlAttr($block->getObject()->getMiddlename()) ?>"
|
||||
title="<?= $block->escapeHtmlAttr($block->getStoreLabel('middlename')) ?>"
|
||||
class="input-text
|
||||
<?= $block->escapeHtmlAttr($block->getAttributeValidationClass('middlename')) ?>"
|
||||
<?= $isMiddlenameRequired ? ' data-validate="{required:true}"' : '' ?>>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($suffix): ?>
|
||||
<div class="field field-name-suffix<?= $block->isSuffixRequired() ? ' required' : '' ?>">
|
||||
<label class="label" for="<?= $block->escapeHtmlAttr($block->getFieldId('suffix')) ?>">
|
||||
<span><?= $block->escapeHtml($block->getStoreLabel('suffix')) ?></span>
|
||||
</label>
|
||||
<div class="control">
|
||||
<?php if ($block->getSuffixOptions() === false): ?>
|
||||
<input type="text" id="<?= $block->escapeHtmlAttr($block->getFieldId('suffix')) ?>"
|
||||
name="<?= $block->escapeHtmlAttr($block->getFieldName('suffix')) ?>"
|
||||
value="<?= $block->escapeHtmlAttr($block->getObject()->getSuffix()) ?>"
|
||||
title="<?= $block->escapeHtmlAttr($block->getStoreLabel('suffix')) ?>"
|
||||
class="input-text
|
||||
<?= $block->escapeHtmlAttr($block->getAttributeValidationClass('suffix')) ?>"
|
||||
<?= $block->isSuffixRequired() ? ' data-validate="{required:true}"' : '' ?>>
|
||||
<?php else: ?>
|
||||
<select id="<?= $block->escapeHtmlAttr($block->getFieldId('suffix')) ?>"
|
||||
name="<?= $block->escapeHtmlAttr($block->getFieldName('suffix')) ?>"
|
||||
title="<?= $block->escapeHtmlAttr($block->getStoreLabel('suffix')) ?>"
|
||||
class="<?= $block->escapeHtmlAttr($block->getAttributeValidationClass('suffix')) ?>"
|
||||
<?= $block->isSuffixRequired() ? ' data-validate="{required:true}"' : '' ?>>
|
||||
<?php foreach ($block->getSuffixOptions() as $_option): ?>
|
||||
<option value="<?= $block->escapeHtmlAttr(__($_option)) ?>"
|
||||
<?php if ($block->getObject()->getSuffix() == $_option): ?>
|
||||
selected="selected"<?php endif; ?>>
|
||||
<?= $block->escapeHtml(__($_option)) ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (($prefix || $middle || $suffix) && !$block->getNoWrap()): ?>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
/** @var \Magento\Customer\Block\Widget\Taxvat $block */
|
||||
?>
|
||||
<div class="field taxvat<?= $block->isRequired() ? ' required' : ''; ?>">
|
||||
<label class="label" for="<?= $block->escapeHtmlAttr($block->getFieldId('taxvat')) ?>"><span><?= $block->escapeHtml($block->getStoreLabel('taxvat')) ?></span></label>
|
||||
<div class="control">
|
||||
<input type="text" id="<?= $block->escapeHtmlAttr($block->getFieldId('taxvat')) ?>" name="<?= $block->escapeHtmlAttr($block->getFieldName('taxvat')) ?>" value="<?= $block->escapeHtmlAttr($block->getTaxvat()) ?>" title="<?= $block->escapeHtmlAttr($block->getStoreLabel('taxvat')) ?>" class="input-text <?= $block->escapeHtmlAttr($this->helper(\Magento\Customer\Helper\Address::class)->getAttributeValidationClass('taxvat')) ?>" <?= $block->isRequired() ? ' data-validate="{required:true}"' : '' ?>>
|
||||
</div>
|
||||
</div>
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
/** @var \Magento\Customer\Block\Widget\Telephone $block */
|
||||
?>
|
||||
|
||||
<div class="field telephone <?= $block->isRequired() ? 'required' : '' ?>">
|
||||
<label for="telephone" class="label">
|
||||
<span>
|
||||
<?= $block->escapeHtml(__('电话号码')) ?>
|
||||
</span>
|
||||
</label>
|
||||
<div class="control">
|
||||
<input type="tel"
|
||||
name="telephone"
|
||||
id="telephone"
|
||||
value="<?= $block->escapeHtmlAttr($block->getTelephone()) ?>"
|
||||
title="<?= $block->escapeHtmlAttr(__('Phone Number')) ?>"
|
||||
class="input-text <?= $block->escapeHtmlAttr(
|
||||
$block->getAttributeValidationClass('telephone')
|
||||
) ?>"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user