martes, 27 de septiembre de 2011

Tips & Tricks: Make activation comment mandatory

With this tip, you can make everybody to write a comment when they send an activation request, though I cannot guarantee that comment would be meaningful!

Step 1. Set property required=true in activation dialog.



Step 2. Add the following code to the saveOnClick property of the dialog.

if(document.getElementById('comment').value != '')  {window.close();opener.mgnl.workflow.WorkflowWebsiteTree.submitActivation($('mgnlFormMain'));} else {alert('Must write a comment for activation.');}