Previously I blogged about Approvals for moving content in the Episerver page tree. This allowed us as developers to prevent users from moving content pages around in the tree without someone else signing the request off.
The approach works fine, however there is one shortcoming in this approach. That is that the default move confirmation message is still displayed after a user moves a page in the tree:
So this post adds to the previous post and shows how its possible to remove the move confirmation message when using approvals for moving content in the Episerver page tree.
http://<your site>/EPiServer/CMS/<UI version installed>/ClientResources/epi-cms/widget/ContentTreeModelConfirmation.js.
One you have the original save a copy here in your solution:
Next up merge the following into the module.config in the root of your solution to override where Episerver looks for this widget:
Modify ContentTreeModelConfirmation.js by commeting the following line (note: the rest of the file is removed for brevity):
// START: Customsied confirmation dialog pop up // Plain move //confirmation = _showConfirmation(moveTitle, description); // END: Customsied confirmation dialog pop up
This simple modification prevents the move confirmation messsage from being displayed but continues to show the warning about the change needing approval.
Now when moving a page the confirmation default confirmation message isn't shown:
A quick word of warning. This approach overrides built in Episerver UI components. You should take care during upgrades to ensure that the the epi-cms/widget/ContentTreeModelConfirmation doesn't change. If it does then you will need to re-apply this change and this is the reason the change is clearly commented in the change above.