3
votes

I am working in Sitecore 7 and want to customise the comments textbox. I need following functionality:

  1. Instead of Single line, I want to replace it with multiline.
  2. Is it possible to have rich text box instead of single line to allow users to put more meaningful comments and those are visible in History too.
2
This may be useful as a PoC: nttdatasitecore.com/Blog/2013/October/… - jammykam

2 Answers

1
votes

You have to modify a lot to do it. When you approve button is called this command :

<command name="item:workflow" type="Sitecore.Shell.Framework.Commands.Workflow,Sitecore.Kernel"/>

 with some parameters 

Inside this class you have next method :

 protected void Run(ClientPipelineArgs args)
  {
   ...
  where you find next lines of code that is called to show single line input  : 
   ...
  if (!flag1 && flag2 && !flag3)
  {
    SheerResponse.Input("Enter a comment:", "");
    args.WaitForPostBack();
  }
0
votes

Yes, this is possible, but you'll have to essentially recreate and replace some basic functionality to do it. And worse... it will require use of SheerUI, which is not documented anywhere from Sitecore that I know of. You have to figure it out by disassembling existing code. If you look at Sitecore's implementation of say, the Approve action, you'll see there is a SheerUI call to get the comment text. (not looking at it right now, so I don't know exactly where this is) You'll need to replace this with a SheerUI call to load your own custom dialog. How do you do this? Well... man, wouldn't documentation on this be nice?