diff --git a/vendor/magento/module-contact/view/frontend/layout/contact_index_index.xml b/vendor/magento/module-contact/view/frontend/layout/contact_index_index.xml index 078c1a4ff562..9fb4fea6c773 100644 --- a/vendor/magento/module-contact/view/frontend/layout/contact_index_index.xml +++ b/vendor/magento/module-contact/view/frontend/layout/contact_index_index.xml @@ -12,6 +12,9 @@ + + Magento\Framework\View\Element\ButtonLockManager + diff --git a/vendor/magento/module-contact/view/frontend/templates/form.phtml b/vendor/magento/module-contact/view/frontend/templates/form.phtml index 99e61e8249da..54bb9e78287c 100644 --- a/vendor/magento/module-contact/view/frontend/templates/form.phtml +++ b/vendor/magento/module-contact/view/frontend/templates/form.phtml @@ -80,7 +80,11 @@ $viewModel = $block->getViewModel();
-
diff --git a/vendor/magento/module-customer/ViewModel/CreateAccountButton.php b/vendor/magento/module-customer/ViewModel/CreateAccountButton.php deleted file mode 100644 index 8fa8718fe37e..000000000000 --- a/vendor/magento/module-customer/ViewModel/CreateAccountButton.php +++ /dev/null @@ -1,26 +0,0 @@ - Magento\Customer\Block\DataProviders\AddressAttributeData Magento\Customer\ViewModel\Address\RegionProvider - Magento\Customer\ViewModel\CreateAccountButton + Magento\Framework\View\Element\ButtonLockManager diff --git a/vendor/magento/module-customer/view/frontend/layout/customer_account_edit.xml b/vendor/magento/module-customer/view/frontend/layout/customer_account_edit.xml index e89aa5ab624d..3dd38d61aee0 100644 --- a/vendor/magento/module-customer/view/frontend/layout/customer_account_edit.xml +++ b/vendor/magento/module-customer/view/frontend/layout/customer_account_edit.xml @@ -21,6 +21,9 @@ + + Magento\Framework\View\Element\ButtonLockManager + diff --git a/vendor/magento/module-customer/view/frontend/layout/customer_account_forgotpassword.xml b/vendor/magento/module-customer/view/frontend/layout/customer_account_forgotpassword.xml index 7c8a6991e5a8..7fcf612de0c0 100644 --- a/vendor/magento/module-customer/view/frontend/layout/customer_account_forgotpassword.xml +++ b/vendor/magento/module-customer/view/frontend/layout/customer_account_forgotpassword.xml @@ -18,7 +18,7 @@ - Magento\Customer\ViewModel\ForgotPasswordButton + Magento\Framework\View\Element\ButtonLockManager diff --git a/vendor/magento/module-customer/view/frontend/layout/customer_account_login.xml b/vendor/magento/module-customer/view/frontend/layout/customer_account_login.xml index 8fb51eeb6650..90cd080cf2f6 100644 --- a/vendor/magento/module-customer/view/frontend/layout/customer_account_login.xml +++ b/vendor/magento/module-customer/view/frontend/layout/customer_account_login.xml @@ -16,7 +16,7 @@ - Magento\Customer\ViewModel\LoginButton + Magento\Framework\View\Element\ButtonLockManager diff --git a/vendor/magento/module-customer/view/frontend/templates/form/edit.phtml b/vendor/magento/module-customer/view/frontend/templates/form/edit.phtml index 6734e9ad30a4..342f1ea23cdf 100644 --- a/vendor/magento/module-customer/view/frontend/templates/form/edit.phtml +++ b/vendor/magento/module-customer/view/frontend/templates/form/edit.phtml @@ -115,8 +115,11 @@ use Magento\Customer\Block\Widget\Name;
-
diff --git a/vendor/magento/module-customer/view/frontend/templates/form/forgotpassword.phtml b/vendor/magento/module-customer/view/frontend/templates/form/forgotpassword.phtml index 2c6615828394..1455fdbbd9f1 100644 --- a/vendor/magento/module-customer/view/frontend/templates/form/forgotpassword.phtml +++ b/vendor/magento/module-customer/view/frontend/templates/form/forgotpassword.phtml @@ -9,8 +9,6 @@ // 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'); ?>
getData('forgot_password_button_view_mo
- +
escapeHtml(__('Go back')) ?> diff --git a/vendor/magento/module-customer/view/frontend/templates/form/login.phtml b/vendor/magento/module-customer/view/frontend/templates/form/login.phtml index 0cc3dd5973b2..15500f4241ff 100644 --- a/vendor/magento/module-customer/view/frontend/templates/form/login.phtml +++ b/vendor/magento/module-customer/view/frontend/templates/form/login.phtml @@ -7,8 +7,6 @@ // phpcs:disable Generic.Files.LineLength.TooLong /** @var \Magento\Customer\Block\Form\Login $block */ -/** @var \Magento\Customer\ViewModel\LoginButton $loginButtonViewModel */ -$loginButtonViewModel = $block->getData('login_button_view_model'); ?> diff --git a/vendor/magento/module-newsletter/view/frontend/layout/default.xml b/vendor/magento/module-newsletter/view/frontend/layout/default.xml index 32a08359333c..6a2835862096 100644 --- a/vendor/magento/module-newsletter/view/frontend/layout/default.xml +++ b/vendor/magento/module-newsletter/view/frontend/layout/default.xml @@ -11,7 +11,11 @@ - + + + Magento\Framework\View\Element\ButtonLockManager + + diff --git a/vendor/magento/module-newsletter/view/frontend/templates/subscribe.phtml b/vendor/magento/module-newsletter/view/frontend/templates/subscribe.phtml index 768c97ef316f..554cc4e16bd6 100644 --- a/vendor/magento/module-newsletter/view/frontend/templates/subscribe.phtml +++ b/vendor/magento/module-newsletter/view/frontend/templates/subscribe.phtml @@ -33,7 +33,10 @@
diff --git a/vendor/magento/module-review/view/frontend/layout/catalog_product_view.xml b/vendor/magento/module-review/view/frontend/layout/catalog_product_view.xml index a6b46f8f25a7..b714bac3a7ab 100644 --- a/vendor/magento/module-review/view/frontend/layout/catalog_product_view.xml +++ b/vendor/magento/module-review/view/frontend/layout/catalog_product_view.xml @@ -23,6 +23,9 @@ 30 + + Magento\Framework\View\Element\ButtonLockManager + diff --git a/vendor/magento/module-review/view/frontend/layout/checkout_cart_configure.xml b/vendor/magento/module-review/view/frontend/layout/checkout_cart_configure.xml index 8a853cdd2e40..815d7ee1f3ad 100644 --- a/vendor/magento/module-review/view/frontend/layout/checkout_cart_configure.xml +++ b/vendor/magento/module-review/view/frontend/layout/checkout_cart_configure.xml @@ -11,6 +11,7 @@ + Magento\Framework\View\Element\ButtonLockManager diff --git a/vendor/magento/module-review/view/frontend/layout/wishlist_index_configure.xml b/vendor/magento/module-review/view/frontend/layout/wishlist_index_configure.xml index 8a853cdd2e40..815d7ee1f3ad 100644 --- a/vendor/magento/module-review/view/frontend/layout/wishlist_index_configure.xml +++ b/vendor/magento/module-review/view/frontend/layout/wishlist_index_configure.xml @@ -11,6 +11,7 @@ + Magento\Framework\View\Element\ButtonLockManager diff --git a/vendor/magento/module-review/view/frontend/templates/form.phtml b/vendor/magento/module-review/view/frontend/templates/form.phtml index 6b00bf681c1e..1a01bfd387cd 100644 --- a/vendor/magento/module-review/view/frontend/templates/form.phtml +++ b/vendor/magento/module-review/view/frontend/templates/form.phtml @@ -74,7 +74,12 @@
- +
diff --git a/vendor/magento/module-send-friend/view/frontend/layout/sendfriend_product_send.xml b/vendor/magento/module-send-friend/view/frontend/layout/sendfriend_product_send.xml index 4d6f3d8c628b..0f76607a4ab7 100644 --- a/vendor/magento/module-send-friend/view/frontend/layout/sendfriend_product_send.xml +++ b/vendor/magento/module-send-friend/view/frontend/layout/sendfriend_product_send.xml @@ -14,6 +14,9 @@
+ + Magento\Framework\View\Element\ButtonLockManager + diff --git a/vendor/magento/module-send-friend/view/frontend/templates/send.phtml b/vendor/magento/module-send-friend/view/frontend/templates/send.phtml index bcfc243a4364..2e3058cae896 100644 --- a/vendor/magento/module-send-friend/view/frontend/templates/send.phtml +++ b/vendor/magento/module-send-friend/view/frontend/templates/send.phtml @@ -40,7 +40,8 @@ escapeHtml(__('Email')) ?>
- @@ -71,7 +72,8 @@
@@ -88,7 +90,9 @@
- +
@@ -103,7 +107,8 @@
getMaxRecipients()): ?> renderStyleAsTag("display: none;", 'div#max-recipient-message') ?> @@ -122,7 +127,11 @@
diff --git a/vendor/magento/framework/View/Element/ButtonLockInterface.php b/vendor/magento/framework/View/Element/ButtonLockInterface.php new file mode 100644 index 000000000000..e65ce3f245a8 --- /dev/null +++ b/vendor/magento/framework/View/Element/ButtonLockInterface.php @@ -0,0 +1,28 @@ +buttonLockPool = $buttonLockPool; + } + + /** + * Returns true if the button has to be disabled. + * + * @param string $buttonCode + * @return bool + * @throws \Magento\Framework\Exception\InputException + */ + public function isDisabled(string $buttonCode): bool + { + $result = array_filter($this->buttonLockPool, function ($item) use ($buttonCode) { + return $item->getCode() === $buttonCode && $item->isDisabled(); + }); + + return !empty($result); + } +}