Set size of text fields

Moderator: crythias

Locked
aph
Znuny superhero
Posts: 646
Joined: 20 Jun 2014, 12:11
Znuny Version: 3.3.9, 4.x, 5.x

Set size of text fields

Post by aph »

I have a few text fields on one of the process masks. How can I increase the default length of these fields. The textarea type of dynamic fields allow me to select number of lines and number of columns. The text fields however do not have a property for default length
OTRS 3.3.x (private/testing) on Windows Server 2008 with MSSQL database.
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
aph
Znuny superhero
Posts: 646
Joined: 20 Jun 2014, 12:11
Znuny Version: 3.3.9, 4.x, 5.x

Re: Set size of text fields

Post by aph »

Any ideas on this one?
OTRS 3.3.x (private/testing) on Windows Server 2008 with MSSQL database.
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
aph
Znuny superhero
Posts: 646
Joined: 20 Jun 2014, 12:11
Znuny Version: 3.3.9, 4.x, 5.x

Re: Set size of text fields

Post by aph »

Can the length of text fields on masks not be changed?
EDIT: On inspecting the elements of the rendered page, I noticed the following line

Code: Select all

<input id=DynamicField_XXXX class="W50pc" type="text title="xxxxxxxx" name="DynamicField_xxxx" name="DynamicField_xxxx" value=""></input>
If I change class="W50pc" to say "W95pc", the length of the textbox increases. Where can I make the setting permanent in CSS?
OTRS 3.3.x (private/testing) on Windows Server 2008 with MSSQL database.
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
RStraub
Znuny guru
Posts: 2210
Joined: 13 Mar 2014, 09:16
Znuny Version: 6.0.14
Real Name: Rolf Straub

Re: Set size of text fields

Post by RStraub »

What do you mean with permanent?

CSS files are overwritten just like the template files on updates. You'd need a custom folder and a modified copy of the file you want to manipulate.

W50pc is defined in:

Code: Select all

~otrs/var/httpd/htdocs/skins/Agent/default/css/Core.Default.css

as

.W50pc {
    width: 50%;
}
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
aph
Znuny superhero
Posts: 646
Joined: 20 Jun 2014, 12:11
Znuny Version: 3.3.9, 4.x, 5.x

Re: Set size of text fields

Post by aph »

RStraub wrote:What do you mean with permanent?
I tested the changes using the Firefox's Inspect Element functionality. There I changed for example the class to W95pc. What I would like is that the form uses the W95pc to display the dynamic fields instead of W50pc.
I have created a custom skin, which basically is the copy of the default skin folder and I made certain changes to the Core.Form.css.
Where can I define the class used to display dynamic fields (text) in forms such as Activity dialog?
OTRS 3.3.x (private/testing) on Windows Server 2008 with MSSQL database.
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
RStraub
Znuny guru
Posts: 2210
Joined: 13 Mar 2014, 09:16
Znuny Version: 6.0.14
Real Name: Rolf Straub

Re: Set size of text fields

Post by RStraub »

In the according template file.

e.g. AgentTicketPhone.tt (or .dtl pre 4.x).
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
Locked