Contribution Date
Technology
Contribution Project
Contribution Details
As suggested in #60 point 3 we have implemented an workaround to revert the block to its previous version when user discard the changes of layout by clicking already available discard changes button. In order to do this we have done following changes,
- In ConfigureBlockFormBase, when user update a reusable block, just before update is saved we stored a copy of block in a temporary storage.
- In DiscardLayoutChangesForm , on submit we have checked if any of the reusable block has its previous state stored, if yes then we have reverted the block to that stored state with new revision.
- On Save layout we have clear all the temporarily stored block if any for that node.
please find the patch for the same agains 9.1.x and 8.9.x branch.
Contribution Issue Link
Contribution Link
Files count
4
Patches count
2