New "date/radio/checkbox" user preference

Moderator: crythias

Locked
jmontoya
Znuny newbie
Posts: 9
Joined: 26 Apr 2012, 13:59
Znuny Version: 3.0.1
Real Name: Julio Montoya
Company: BeezNest

New "date/radio/checkbox" user preference

Post by jmontoya »

Hello there,
I'm want to add some new user preferences in otrs 3.0.
I'm using this:
I created a file here: Kernel/Config/Files/test.xml

and I added this:

Code: Select all

<ConfigItem Name="CustomerPreferencesGroups###UserExtra" Required="0" Valid="1">
        <Description Translatable="1">This is a test</Description>
        <Group>Usager</Group>
        <SubGroup>Frontend::Customer::Preferences</SubGroup>
        <Setting>
            <Hash>
                <Item Key="Module">Kernel::Output::HTML::PreferencesGeneric</Item>
                <Item Key="Column">User Profile</Item>
                <Item Key="Label" Translatable="1">Test1</Item>
                <Item Key="Key" Translatable="1">Test1</Item> 
                <Item Key="Data">
                    <Hash>
                        <Item Key="yes">yes</Item>
                        <Item Key="no">non</Item>
                    </Hash>
                </Item>
                <Item Key="DataSelected">yes</Item>
                <Item Key="PrefKey">user_can_have_tss</Item>
                <Item Key="Prio">4000</Item>
                <Item Key="Active">1</Item>
            </Hash>
        </Setting>
    </ConfigItem>
If I go to the otrs/customer.pl -> User preferences I see the new select option

How can I change that script in order to use checkboxes, radio and a date fields?

Regards!
jmontoya
Znuny newbie
Posts: 9
Joined: 26 Apr 2012, 13:59
Znuny Version: 3.0.1
Real Name: Julio Montoya
Company: BeezNest

Re: New "date/radio/checkbox" user preference

Post by jmontoya »

how about a text field?
jmontoya
Znuny newbie
Posts: 9
Joined: 26 Apr 2012, 13:59
Znuny Version: 3.0.1
Real Name: Julio Montoya
Company: BeezNest

Re: New "date/radio/checkbox" user preference

Post by jmontoya »

To add a Text field you have to add this:

Code: Select all

                <Item Key="Block">Input</Item>
testing the others fields ...
jmontoya
Znuny newbie
Posts: 9
Joined: 26 Apr 2012, 13:59
Znuny Version: 3.0.1
Real Name: Julio Montoya
Company: BeezNest

Re: New "date/radio/checkbox" user preference

Post by jmontoya »

I added a new "generic" output called PreferenceGenericDate in order to use dates, I have to add only this in the setting:

Code: Select all

                <Item Key="Module">Kernel::Output::HTML::PreferencesGenericDate</Item>
jmontoya
Znuny newbie
Posts: 9
Joined: 26 Apr 2012, 13:59
Znuny Version: 3.0.1
Real Name: Julio Montoya
Company: BeezNest

Re: New "date/radio/checkbox" user preference

Post by jmontoya »

I could replace checkboxes and radios for a select multiple/simple
jmontoya
Znuny newbie
Posts: 9
Joined: 26 Apr 2012, 13:59
Znuny Version: 3.0.1
Real Name: Julio Montoya
Company: BeezNest

Re: New "date/radio/checkbox" user preference

Post by jmontoya »

To be able to use a select "multiple" just add this:

Code: Select all

                <Item Key="Multiple">yes</Item>
yacine12
Znuny newbie
Posts: 78
Joined: 18 Apr 2012, 19:20
Znuny Version: 3.2.1
Company: Méditel
Location: Morroco

Re: New "date/radio/checkbox" user preference

Post by yacine12 »

Hi,
I will ask you for this test,
when you added test.xml ,you re not midified another file ? to spicifie this root to be watched in the customer.pl ?
Best Regards,
Yacine BELGHARD
Software Ingineer
Locked