Disable Browser auto complete on TimeUnits input box

Using the here described method, you can add a few simple lines of Java Script to disable the Browser auto complete function on the time units input box.

The problem is, when you are required to fill in the time spent on a ticket, the auto complete dropdown will conceal the submit button and you have to click somewhere else before you can submit your response:

TimeUnits

Or you could accidentally select a wrong time by trying to click submit while the dropdown is still up.

When you follow my guide to register your own Java Script file in OTRS you can simply add the following code to disable auto complete on the time units input:

$( document ).ready(function() {
    if ( $('#TimeUnits').length )
    {
        $('#TimeUnits').autocomplete({ disabled: true });
    }
});

If you’d prefer to keep the auto complete but still want the Submit button clickable you could shrink the time units input box by removing the W50pc class from it.

$( document ).ready(function() {
    if ( $('#TimeUnits').length )
    {
        $('#TimeUnits').removeClass('W50pc');
    }
});

Enjoy our OTRS

Stephan