-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
173 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace Magenizr\ResetUiBookmarks\Plugin\Block\Adminhtml\User\Edit\Tab; | ||
|
||
class ResetUiBookmarks | ||
{ | ||
/** | ||
* Add fieldset for reset ui bookmarks | ||
* | ||
* @param \Magento\User\Block\User\Edit\Tab\Main $subject | ||
* @param \Closure $proceed | ||
* @return mixed | ||
*/ | ||
public function aroundGetFormHtml( | ||
\Magento\User\Block\User\Edit\Tab\Main $subject, | ||
\Closure $proceed | ||
) { | ||
$form = $subject->getForm(); | ||
if (is_object($form)) { | ||
$fieldset = $form->getElement('base_fieldset'); | ||
$userId = 0; | ||
|
||
foreach ($fieldset->getElements() as $element) { | ||
|
||
if ($element->getId() === 'user_id') { | ||
$userId = $element->getValue(); | ||
} | ||
} | ||
|
||
$fieldset = $form->addFieldset('magenizr_resetuibookmarks', ['legend' => __('Bookmarks')]); | ||
|
||
$fieldset->addField( | ||
'reset_ui_bookmarks', | ||
'label', | ||
[ | ||
'container_id' => 'reset_ui_bookmarks', | ||
'after_element_html' => $subject->getLayout() | ||
->getBlock('magenizr.resetuibookmarks.system.account') | ||
->setData('userId', $userId) | ||
->toHtml() | ||
] | ||
); | ||
|
||
$subject->setForm($form); | ||
} | ||
|
||
return $proceed(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0"?> | ||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> | ||
<type name="Magento\User\Block\User\Edit\Tab\Main"> | ||
<plugin name="admin_user_image" type="Magenizr\ResetUiBookmarks\Plugin\Block\Adminhtml\User\Edit\Tab\ResetUiBookmarks" sortOrder="1"/> | ||
</type> | ||
</config> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
"Reset UI Bookmarks","UI Bookmarks zurücksetzen" | ||
"This will reset your UI bookmarks such as state of filters, column positions, grid sorting, pagination and so on.","Damit werden benutzerdefinierte Filtereinstellungen zurückgesetzt. Zum Beispiel die Positionen der Spalten in Tabellen und Sortierungen." | ||
"This will reset UI bookmarks such as state of filters, column positions, grid sorting, pagination and so on.","Damit werden benutzerdefinierte Filtereinstellungen zurückgesetzt. Zum Beispiel die Positionen der Spalten in Tabellen und Sortierungen." | ||
"Your UI Bookmarks were cleared successfully.","Deine UI Bookmarks wurden erfolgreich zurückgesetzt." | ||
"We were unable to submit your request. Please try again!","Es ist ein Fehler aufgetreten. Bitte versuche es noch einmal." | ||
"No UI Bookmarks found for user (%1).","Keine UI Bookmarks für Benutzer (%1) gefunden." | ||
"All Bookmarks","Alle Bookmarks" | ||
"Saved Filters Only","Nur gespeicherte Filter" | ||
"Keep Saved Filters","Gespeicherte Filter behalten" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
"Reset UI Bookmarks","Reset UI Bookmarks" | ||
"This will reset your UI bookmarks such as state of filters, column positions, grid sorting, pagination and so on.","This will reset your UI bookmarks such as state of filters, column positions, grid sorting, pagination and so on." | ||
"This will reset UI bookmarks such as state of filters, column positions, grid sorting, pagination and so on.","This will reset UI bookmarks such as state of filters, column positions, grid sorting, pagination and so on." | ||
"Your UI Bookmarks were cleared successfully.","Your UI Bookmarks were cleared successfully." | ||
"We were unable to submit your request. Please try again.","We were unable to submit your request. Please try again." | ||
"No UI Bookmarks found for user (%1).","No UI Bookmarks found for user (%1)." | ||
"All Bookmarks","All Bookmarks" | ||
"Saved Filters Only","Saved Filters Only" | ||
"Keep Saved Filters","Keep Saved Filters" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
"Reset UI Bookmarks","Réinitialiser UI Bookmarks " | ||
"This will reset your UI bookmarks such as state of filters, column positions, grid sorting, pagination and so on.","Cela réinitialisera vos signets d'interface utilisateur tels que l'état des filtres, les positions des colonnes, le tri des tables, la pagination, etc." | ||
"This will reset UI bookmarks such as state of filters, column positions, grid sorting, pagination and so on.","Cela réinitialisera vos signets d'interface utilisateur tels que l'état des filtres, les positions des colonnes, le tri des tables, la pagination, etc." | ||
"Your UI Bookmarks were cleared successfully.","Vos signets d'interface utilisateur ont été effacés avec succès." | ||
"We were unable to submit your request. Please try again.","Nous n'avons pas pu soumettre votre demande. Veuillez réessayer." | ||
"No UI Bookmarks found for user (%1).","Aucun signet d'interface utilisateur trouvé pour l'utilisateur administrateur (%1)." | ||
"All Bookmarks","Tous les signets" | ||
"Saved Filters Only","Filtres enregistrés uniquement" | ||
"Keep Saved Filters","Conserver les filtres enregistrés" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-2columns-left" | ||
xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> | ||
<head> | ||
<css src="Magenizr_ResetUiBookmarks::css/style.css"/> | ||
</head> | ||
<body> | ||
<referenceContainer name="left"> | ||
<block class="Magento\User\Block\User\Edit\Tabs" name="adminhtml.user.edit.tabs"> | ||
<block class="Magento\Backend\Block\Template" name="magenizr.resetuibookmarks.system.account" template="Magenizr_ResetUiBookmarks::system/account/resetuibookmarks.phtml"/> | ||
</block> | ||
</referenceContainer> | ||
</body> | ||
</page> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters