Monday, May 22, 2006

Removing the BC Checkbox in ARS 6.0 and ARS 6.3

When you select a date for a "Date" field (not Date/Time), there is a BC checkbox that appears. Some people find the BC checkbox irrelevant and would like to remove it. Here's how to do it so that it no longer appears in the midtier.

ARS 6.0
Locate the JSP file for the Date Popup dialog. It is \apps\shared\ar_date_popup.jsp
It is always a good practice to make a back up copy.


Edit the file and remove these lines. This just removes the appearance of the BC checkbox, not the data itself. If you do this, every date will be in AD because the user will not see the BC checkbox in order to check it. It goes without saying that if you upgrade the midtier, this file will be restored to its original state. Before patching the midtier, make a backup copy of your modified file.




/****** BC *****/
document.write(" vinput type="'\" name="'\" era="=">\" ");
<% } %>

document.write("onClick=\"onEraClick();\"> %<%= bc %> ");




ARS 6.3
In 6.3, BMC changed the midtier code, so there is a different process.
There are references to displaying the BC checkbox in two files. I'm only dealing with IE here so I'm only fixing these two. For Mozilla, you're on your own. I've just done this and tested it and it works. Caution - if you comment out more lines than this, you're going to get errors that may prevent your page from displaying so be careful.

Apologies for the appearance of the code - this blog does not really allow me to paste HTML/JSP code samples properly.

Look for files in \Resources\IE\Javascript
ClientCoreAcc.js
Comment Out (with /* and */) these lines



if (this.mShowBC) {
htmlVal += ""; name="'\" value="'\" type=" htmlVal < artb="">

ClientCore.js
Comment Out (with /* and */ ) these lines


htmlVal += "";

htmlVal +=" " + getLocalizedMessage("BC") + "";



}








No comments: