Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
**Steps to Activate**
1. Open the portals you want to disable copy/paste operation in "sp_portal" table.
2. Open the theme attached to the portal.
In the theme under "JS Includes" relatd list, create new JS include and select the UI script you created. Go to your portal and try to copy/paste in any catalog item field or any text field on portal.The operation will be prevented with the alert message.

**Use Case**
1. Many high security organizations like banks do not want the users to copy paste account number or passwords to ensure safety.
2. Many input form want the users to re-enter the password or username without copying from other fields.

This UI script is applied through portal theme , so it will be specific to portals using that theme. It will not have instance wide affect.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
Disable Copy Paste on Portal Pages.
UI Type : Service Portal/Mobile.
*/
document.addEventListener('copy', function(e) { //event listner for copy.
alert("Copy Operation is prevented on this page."); // alert for copy
e.preventDefault(); // prevent copy
});

document.addEventListener('paste', function(e) { //event listner for paste.
alert("Paste Operation is prevented on this page."); //alert for paste
e.preventDefault(); // prevent paste
});
Loading