Showing posts with label midtier. Show all posts
Showing posts with label midtier. Show all posts

Monday, November 06, 2006

Fun with Javascript

Are your users complaining that they do not see their requests or have the right permissions when they log in with their network username and password to your midtier? Could be that while the username was recognized and authenticated by AREA LDAP, it doesn't match the value on the Submitter field for their requests. Why? Because people often use mixed-case lettering when typing their login names (i.e. "JSmith" vs. "jsmith"), but Remedy only recognizes an exact, case-sensitive, match between the current user and the Submitter field. Even on case-insensitive databases like Microsoft SQL!

You're not likely to convince people to type in all lowercase if they are not accustomed to it, and to make matters worse, AREA LDAP is happy to authenticate them no matter how they log in. If you are using the self-help module of ITSM, you may soon have a single user with Help Desk Cases entered under three different usernames.

The solution is to force an lowercase entry on the login page.

The solution is really very simple - simply add this to HTML code where the text box for the Login is defined. You will want to add this where you see the "input type = text NAME =username" code. For reasons beyond my imagining, the Blogger technology that runs my blog will not allow me to enter HTML code without having it converted.

You are going to add this code to the tag. What it says is - convert anything entered into this field into lowercase.

onChange="javascript:this.value=this.value.toLowerCase();"

Just keep in mind that anytime you change one of the JSP files, like login.jsp, you will have to make those changes again every time you install a patch or upgrade.

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") + "";



}