Skip to content

Commit 9fdaaf6

Browse files
andimovslopukhov
authored andcommitted
MC-16258: [final] Pop-up message in case of changing option to NO
1 parent 24343e3 commit 9fdaaf6

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

app/code/Magento/CatalogUrlRewrite/etc/adminhtml/system.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828
<label>Create Permanent Redirect for URLs if URL Key Changed</label>
2929
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
3030
</field>
31-
<field id="generate_rewrites_on_save" translate="label" type="select" sortOrder="6" showInDefault="1" showInWebsite="0" showInStore="0">
31+
<field id="generate_rewrites_on_save" translate="label" type="select" sortOrder="6" showInDefault="1" showInWebsite="0" showInStore="0" canRestore="1">
3232
<label>Generate URL Rewrites for Products in Categories</label>
3333
<backend_model>Magento\CatalogUrlRewrite\Model\TableCleaner</backend_model>
3434
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
3535
<comment>
36-
<![CDATA[<strong style="color:red">Warning!</strong> Turning this option off will result in permanent removal of category/product URL rewrites without an ability to restore them back.]]>
36+
<![CDATA[<strong style="color:red">Warning!</strong> Turning this option off will result in permanent removal of category/product URL rewrites without an ability to restore them.]]>
3737
</comment>
3838
<frontend_class>generate_rewrites_on_save</frontend_class>
3939
</field>

app/code/Magento/CatalogUrlRewrite/i18n/en_US.csv

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@
66
"Use Categories Path for Product URLs","Use Categories Path for Product URLs"
77
"Create Permanent Redirect for URLs if URL Key Changed","Create Permanent Redirect for URLs if URL Key Changed"
88
"Generate URL Rewrites for Products in Categories","Generate URL Rewrites for Products in Categories"
9-
"Turn off automatic generation of products with categories path URL rewrites?","Turn off automatic generation of products with categories path URL rewrites?"
10-
"Turning off automatic generation of products with categories path URL rewrites will result in permanent removal of all the currently existing “category/product” type URL rewrites without an ability to restore them back. This may potentially cause unresolved “category/product” type URL conflicts which you have to resolve by creating a URL rewrite manually.","Turning off automatic generation of products with categories path URL rewrites will result in permanent removal of all the currently existing “category/product” type URL rewrites without an ability to restore them back. This may potentially cause unresolved “category/product” type URL conflicts which you have to resolve by creating a URL rewrite manually."
9+
"Turn off "category/products" URL rewrites?","Turn off "category/products" URL rewrites?"
10+
"Turning off automatic generation of "category/products" URL rewrites will result in permanent removal of all the currently existing “category/product” type URL rewrites without an ability to restore them back. This may potentially cause unresolved “category/product” type URL conflicts which you have to resolve by creating a URL rewrite manually.","Turning off automatic generation of "category/products" URL rewrites will result in permanent removal of all the currently existing “category/product” type URL rewrites without an ability to restore them back. This may potentially cause unresolved “category/product” type URL conflicts which you have to resolve by creating a URL rewrite manually."
11+
"Turning this option off will result in permanent removal of category/product URL rewrites without an ability to restore them.","Turning this option off will result in permanent removal of category/product URL rewrites without an ability to restore them."

app/code/Magento/Config/view/adminhtml/templates/system/config/edit.phtml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -391,11 +391,9 @@ require([
391391
jQuery('select.generate_rewrites_on_save').on('change', function(event){
392392
if (this.value == 0) {
393393
confirmation({
394-
title: $t('Turn off automatic generation of products with categories path URL rewrites?'),
395-
content: $t('Turning off automatic generation of products with categories path URL rewrites will ' +
396-
'result in permanent removal of all the currently existing “category/product” type URL rewrites ' +
397-
'without an ability to restore them back. This may potentially cause unresolved “category/product”' +
398-
' type URL conflicts which you have to resolve by creating a URL rewrite manually.'),
394+
title: $t('Turn off "category/products" URL rewrites?'),
395+
content: $t('Turning off automatic generation of "category/products" URL rewrites will result in permanent removal of all the currently existing “category/product” type URL rewrites without an ability to restore them back. ' +
396+
'This may potentially cause unresolved “category/product” type URL conflicts which you have to resolve by creating a URL rewrite manually.'),
399397
actions: {
400398
cancel: function () {
401399
jQuery('select.generate_rewrites_on_save').val(1);

0 commit comments

Comments
 (0)